Chamber

Part of the Parliament by the numbers

Pick the legislature (19 = the current one).

▶ Use this app

data space «parlamento» — this micro app reads and writes the suite’s shared data space.

What it records

  • Legislature
  • A word in the title, e.g. «budget»

The other micro apps in the same suite

How it works

This is a Reactive app: a plain text document that your browser turns into a working app — forms, live data, tables, statistics and even charts, with nothing to install or configure.

  1. Use it right away. Hit “Use this app”: it opens right in your browser, ready to go, with data saved only on your device.
  2. Your data stays yours. Everything is stored locally on your device, kept separate for each app: no account, no server, nothing to set up.
  3. Make it your own. The text below is the entire app: copy it, tweak fields, views and words, and your changes become interactive instantly.
  4. Share it as a file. An app is a simple file: save it, export it or share it with a link; and with encrypted collaboration several people edit the same data in real time.
The app’s source
# 📗 Chamber

## The votes

Pick the legislature (19 = the current one).

::input[leg]{value="19" placeholder="Legislature"}

::od-query{into="riepilogo" sql="SELECT esito AS esito, count(*) AS n FROM camera_votazioni WHERE legislatura = TRY_CAST('{#leg}' AS INTEGER) AND esito IS NOT NULL GROUP BY esito"}

::chart-pie{data="riepilogo" label="esito" value="n" height="14rem"}

### The latest votes

::od-query{into="voti" sql="SELECT data AS data, titolo AS titolo, esito AS esito, favorevoli AS favorevoli, contrari AS contrari, astenuti AS astenuti FROM camera_votazioni WHERE legislatura = TRY_CAST('{#leg}' AS INTEGER) AND titolo IS NOT NULL ORDER BY data DESC LIMIT 30" limit="30"}

:::table{path="voti" headers="Date,Title,Outcome,For,Against,Abstained" pagesize="10"}
{data} | {titolo} | {esito} | {favorevoli} | {contrari} | {astenuti}
:::

### Search a bill

::input[q]{placeholder="A word in the title, e.g. «budget»"}

::od-query{into="atti" sql="SELECT titolo AS titolo, data AS data, primo_firmatario AS primo_firmatario, iniziativa AS iniziativa, url AS url FROM camera_atti WHERE legislatura = TRY_CAST('{#leg}' AS INTEGER) AND titolo ILIKE '%' || '{#q}' || '%' ORDER BY data DESC LIMIT 20" limit="20"}

:::cards{path="atti" search="false"}
**{titolo}**
{primo_firmatario} · {iniziativa} · {data}
[Official record]({url})
:::