Some time ago, I got interested in chronic illnesses, their implications in the quality of life, and how they distribute across my country. So, I downloaded the results from the national survey of quality of life (ENCAVI) and used Folium to visualize it.
To make the code available to others, I created a Jupyter notebook that loads and modifies the data from the survey, loads a GeoJSON file with the country’s regions, and finally generates a single or a dual map with selected variables. You can find the repository containing the notebook here .
To use it, simply run all the cells of the notebook and play around with the variables.
For example, to generate a single map showing the prevalence of
asthma in each region, we can do:
To generate dual maps, the process is really similar.
For example, to compare
has_hypertension in each region, we can do: