A Python package and CLI toolkit to reproduce the Infodemic Risk Index (IRI) maps from the paper:
Gallotti, R., Valle, F., Castaldo, N., Sacco, P., & De Domenico, M.
Assessing the risks of ‘infodemics’ in response to COVID-19 epidemics.
Nature Human Behaviour (2020).
https://doi.org/10.1038/s41562-020-00994-6
This project uses the modern pyproject.toml format. To install locally in editable (development) mode:
pip install -e .This package contains utilities to visualize the Infodemic Risk Index across multiple spatial resolutions:
| Region | Script | Output |
|---|---|---|
| World | generater_map_world.py |
plots/risk_WORLD_top.png |
| USA | generate_map_usa.py |
plots/risk_USA_states_top.png |
| EU + IT | generate_map_eu_it.py |
plots/risk_EU_nuts1_top.png, plots/risk_ITA_nuts2_top.png |
Once installed with pip install -e ., you can run:
cd scripts
python name_of_script.pyThese will:
- Load shapefiles and data from the correct project-relative locations
- Generate updated PNG visualizations of the IRI
- Save them into the
plots/folder
Input CSV data used for world-level mapping:
country_infodemics_summary.csv
Contains shapefiles used for all geographic regions:
ne_10m_admin_0_countries/– World countries (ISO-3)NUTS_RG_01M_2013_4326/– Europe NUTS regionsUSA/,EU/,IT/– Country-specific boundaries
Figures generated by the scripts will be saved here.
If you use this code, please cite the original paper:
Gallotti, R. et al., Nature Human Behaviour (2020).
https://doi.org/10.1038/s41562-020-00994-6
MIT License – see LICENSE file for details.