Skip to content

Script to create an animated data visualisation for categorical timeseries data - GIF choropleth map with annotations.

Notifications You must be signed in to change notification settings

VictoriaDerks/choropleth_ldn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

choropleth_ldn

Simple script to create a chloropleth map of London with categorical timeseries data.

The script in main.py creates a gif of the most frequent animal types rescued by the London Fire Brigade over the years, by borough. This is what that looks like:

rescues per borough GIF

It also performs some cleaning of the dataset, i.e.:

  • removing boroughs that are not part of Greater London.
  • replacing animal entries that are "Unknown - ..." e.g. "Unknown - Heavy Livestock Animal" to just "Unknown".

As a quick note, there are better ways to create gifs that don't involve saving down individual frames. However, I wanted to be able to look at the frames on their own as well.

How to run

Install the required libraries by running pip install -r requirements.txt or conda install --file requirements.txt.

Create a folder called fig. This is where the script saves individual frames and the final gif.

Then run main.py.

Data sources

London Fire Brigade Animal Rescue Dataset: https://data.london.gov.uk/dataset/animal-rescue-incidents-attended-by-lfb (originally downloaded in 09/2021)

London Borough Map: https://data.london.gov.uk/dataset/statistical-gis-boundary-files-london

Acknowledgements

Special thanks to Ben Dexter Cooley for his excellent articles on creating chloropleth maps and GIFs in python.

(article on maps, article on gifs)

About

Script to create an animated data visualisation for categorical timeseries data - GIF choropleth map with annotations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages