Catalog ›Public data ›Your municipality in numbers — a portrait from official data › Your municipality
Your municipality
Part of the Your municipality in numbers
Enter the **ISTAT code** (six digits): e.g. `058091` Rome, `015146` Milan, `037006` Bologna, `063049` Naples.
data space «comune-in-cifre» — this micro app reads and writes the suite’s shared data space.
What it records
- Municipality's ISTAT code
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.
- Use it right away. Hit “Use this app”: it opens right in your browser, ready to go, with data saved only on your device.
- Your data stays yours. Everything is stored locally on your device, kept separate for each app: no account, no server, nothing to set up.
- Make it your own. The text below is the entire app: copy it, tweak fields, views and words, and your changes become interactive instantly.
- 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
# 🔎 Your municipality
## Find your municipality
Enter the **ISTAT code** (six digits): e.g. `058091` Rome, `015146` Milan,
`037006` Bologna, `063049` Naples.
::input[comune]{value="037006" placeholder="Municipality's ISTAT code"}
::od-query{into="profilo" sql="SELECT p.comune AS comune, p.popolazione AS popolazione, r.reddito_medio AS reddito_medio, i.eta_media AS eta_media, i.perc_stranieri AS perc_stranieri, i.indice_vecchiaia AS indice_vecchiaia FROM istat_popolazione p LEFT JOIN mef_redditi r ON r.codice_istat = p.codice_istat LEFT JOIN istat_indicatori i ON i.codice_istat = p.codice_istat WHERE p.codice_istat = '{#comune}'"}
:::cards{path="profilo" search="false"}
### {comune}
**{popolazione}** inhabitants — average income **{reddito_medio} €**, average age **{eta_media}** years, foreign residents **{perc_stranieri}%**, old-age index **{indice_vecchiaia}** (over-65s per 100 under-15s).
:::
::od-query{into="servizi" sql="SELECT (SELECT count(*) FROM farmacie WHERE codice_istat = '{#comune}') AS farmacie, (SELECT count(*) FROM scuole WHERE codice_istat = '{#comune}') AS scuole"}
:::cards{path="servizi" search="false"}
🏥 **{farmacie}** pharmacies · 🏫 **{scuole}** state schools
:::
::od-query{into="ambiente" sql="SELECT percentuale_rd AS percentuale_rd, anno AS anno FROM rifiuti WHERE codice_istat = '{#comune}' ORDER BY anno DESC LIMIT 1"}
:::cards{path="ambiente" search="false"}
♻️ Separate waste collection **{percentuale_rd}%** (year {anno})
:::
::od-query{into="economia" sql="SELECT unita_locali AS unita_locali, addetti AS addetti, anno AS anno FROM imprese WHERE codice_istat = '{#comune}' ORDER BY anno DESC LIMIT 1"}
:::cards{path="economia" search="false"}
🏢 **{unita_locali}** active local units, **{addetti}** employees (year {anno})
:::
::od-query{into="voto" sql="SELECT affluenza AS affluenza, lista_vincente AS lista_vincente, percentuale_vincente AS percentuale_vincente FROM elezioni WHERE codice_istat = '{#comune}'"}
:::cards{path="voto" search="false"}
🗳️ Turnout **{affluenza}%** — top list **{lista_vincente}** ({percentuale_vincente}%) — 2022 general election
:::
::od-query{into="invalsiComune" sql="SELECT round(avg(punteggio_medio), 1) AS punteggio_medio, anno AS anno FROM invalsi WHERE codice_istat = '{#comune}' GROUP BY anno"}
:::cards{path="invalsiComune" search="false"}
📊 Average INVALSI test score **{punteggio_medio}** (year {anno}, municipalities above the student threshold)
:::
::od-query{into="veicoliComune" sql="SELECT autovetture AS autovetture, totale AS totale FROM aci_veicoli WHERE codice_istat = '{#comune}'"}
:::cards{path="veicoliComune" search="false"}
🚗 **{autovetture}** cars, **{totale}** registered vehicles in total (ACI)
:::
Income is the average per taxpayer (MEF, latest available year); age, foreign
residents and old-age index are ISTAT figures as of 1 January. The waste,
business, election, INVALSI and vehicle cards only appear if the municipality
has that data available (INVALSI and election data don't cover every
municipality; vehicles are counted where they are REGISTERED, not where their
owners live — large rental/leasing fleets concentrate in a few cities).