Skip to content

πŸ“ˆ Choropleth visualisation of Caribou Coffee stores by US states and counties.

Notifications You must be signed in to change notification settings

jamesalexatkin/caribou-visualiser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Caribou Coffee Stores Map

Choropleth visualisation of Caribou coffee stores in the US.

By State (View full size)

By County (View full size)

πŸ™‹ What is this?

This project allows for the visualisation of the number of Caribou Coffee stores in the United States by states and counties. The resulting visualisation is in the form of a choropleth, or shaded map. Darker regions represent a higher number of coffee stores.

The maps are produced by folium, a Python library capable of rendering maps in HTML files.

πŸƒβ€β™€οΈ Running the code

I have included code both to generate a dataset and visualise a dataset.

πŸ“Š Generating a dataset

Dataset generation is performed by scraping the Caribou website to find store locations and matching these up with US counties. Counties are searched using the Google Maps API and a valid key must be provided. The path to a file containing only the API key as string should be passed to the script as an argument. The region type is either states or counties.

The script can be run as follows:

python dataset_generator.py <FILE CONTAINING API KEY> <REGION_TYPE>

The dataset produced is output as a CSV file.

βœ’οΈ Visualisation

If you wish to use a readymade dataset, one can be found in the datasets folder, or else you can follow the previous steps to create your own.

The Caribou dataset must be passed to the visualiser script as an argument. The region type is either states or counties.

The script can be run as follows:

python visualiser.py <CARIBOU DATASET> <REGION_TYPE>

πŸ’» Technology

This project was written in Python 3.8.0 and tested on Windows 10 Home.

πŸ™ Acknowledgements

The dataset of US counties used is provided under datasets courtesy of Eric Celeste. These were originally taken from the US Census Bureau.

About

πŸ“ˆ Choropleth visualisation of Caribou Coffee stores by US states and counties.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages