The sectors

Part of the Workplace safety

The 2024 reports in the chosen province, by insurance sector: industry and services, agriculture, the State account (schools and public administration).

▶ Use this app

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

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
# 🏭 The sectors

## Where injuries happen

The 2024 reports in the chosen province, by insurance sector: industry and
services, agriculture, the State account (schools and public administration).

::od-query{into="settori" sql="SELECT gestione AS gestione, sum(infortuni) AS infortuni FROM inail_infortuni WHERE sigla = '{#prov}' AND anno = 2024 GROUP BY gestione ORDER BY infortuni DESC"}

::chart-pie{data="settori" label="gestione" value="infortuni" height="16rem"}

And the gender split, on the same data:

::od-query{into="genere" sql="SELECT CASE genere WHEN 'M' THEN 'Uomini' WHEN 'F' THEN 'Donne' ELSE genere END AS genere, sum(infortuni) AS infortuni FROM inail_infortuni WHERE sigla = '{#prov}' AND anno = 2024 GROUP BY 1 ORDER BY 2 DESC"}

::chart-pie{data="genere" label="genere" value="infortuni" height="14rem"}