This repo contains scripts and data for the extraction of ISTAT social services supply and expenditure data for Italian municipalities/provinces/regions.
The data is updated to 2022 and was downloaded in November 2025.
This repository does NOT track with git the large data files. However, the process should be reproducible upon downloading the input files (see instructions below)
This is an example of what Istat calls cube, i.e. a collection of indicators related to a topic which can be slices according to several dimensions: FREQ, REF_AREA, INDICATOR, BENEFICIARIES, DATA_TYPE, YEAR, etc.
BL_DCIS_SPESESERSOC1.zip(382MB) - key dataBL_DCIS_SPESESERSOC1_DSD.xml(8.3MB) - metadata
-
Visit ISTAT repository IStatDAta here: link
-
[OR] Navigate to
IstatData -> Categorie -> Assistenza e previdenza -> Servizi sociali e socio-educativi -> Interventi e servizi sociali dei comuni -
Select and download the bulk zip folder
Interventi e servizi sociali dei comuni - BULKDOWNLOAD -
Place the
.zipand.XMLfiles in the project root directory
- I saved in
/Users/luisamimmi/Github/istat_servsoc. Inside, there is a shell script that allows me to download all the data by province.
-
Then, use the Quarto markdown file
extract_data.qmdas guidance to extract partial datasets from the bulk data. (The actual work is done by the shell scriptextract_region_data.sh). -
(As output) Extracted data will be saved to a designated subdirectory under:
- I extracted the data for all the provinces of Emilia-Romagna (and some chose coparison areas) and copied them into
data/data_in/ISTAT_SERVSOC/serv_soc_ER_x_prov_serie/data/data_in/ISTAT_SERVSOC/serv_soc_territ/
- [git Tracked]
- `extract_data.qmd` - Main analysis notebook
- `extract_region.sh` - Shell script for extracting regional data
- `istat_servsoc.Rproj` - R project file
- [Not git tracked]
- `BL_DCIS_SPESESERSOC1_DSD.xm` (input)
- `BL_DCIS_SPESESERSOC1.zip` (input)
- `extracted_data/` (output)
- `serv_soc_ER_x_prov_serie/` (output)
- `serv_soc_Lombardia_x_prov_serie/` (output)