This project looked at the link between the prevalence of asthma in 500 American cities and the Air Quality Index of the county those cities are in.
If you wish to replicate the map and figure, you will need to download files. The links are also in the Main.py file:
- Health data from the 500 cities project
- Air quality data for many US counties
- List of cities and the info on their county
- Shapefile of the counties.
The shapefile needs to be uploaded to Mapshaper and then saved as a GEOjson. Take these four files and put them in a subdirectory named /data You can now use the script, which should generate a jpg file for the figure and a html file for the map
On this map, we see the Median Air Quality Index of about 1000 USA counties, from best (in light yellow) to worst (in dark red). Each green, yellow and red dots represent one of 476 cities found in the 500 cities database. The cities with the lowest prevalence are in green, and those with the highest, in red.
This plot shows how the air quality (horizontal axis) and smoking prevalence (vertical axis) are linked with asthma prevalence. It seems that air quality is almost uncorrelated to asthma prevalence, whereas smoking is clearly linearly correlated.