Skip to content

pythoninthegrass/cooling_centers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oklahoma Cooling Centers

Originally a fork of Oklahoma Cooling Centers, now it's a standalone repo that aims to aggregate all public cooling centers in the United States.

Shoutout to Alex Ayon for the original local implementation and general idea! 🎉

Minimum Requirements

Recommended Requirements

Quickstart

This is just for the map portion. The backend is still in development.

# create virtual environment
python3 -m venv .venv

# activate virtual environment
source .venv/bin/activate

# install dependencies
python3 -m pip install -r requirements.txt

# run script
./make_map.py

# open map in browser
open ./docs/index.html

# deactivate virtual environment
deactivate

Development

Read PDF

  • ImageMagick is a problem child for pdftotree on macOS. Run the following to use gen_csv.py:
# install imagemagick v6
brew uninstall imagemagick
brew install imagemagick@6
brew unlink imagemagick
brew link imagemagick@6 --force

# ~/.bashrc
export BREW_PREFIX=$(brew --prefix)
export MAGICK_HOME="$BREW_PREFIX/opt/imagemagick@6"
  • Run ./bin/gen_csv.py to generate ./csv/cooling_centers_2024.csv

Geocoding

  • Open a free Google Cloud Platform account and setup the Geocoding API
  • Fill out .env with your API key
  • Run ./bin/geocode.py to append latitude_longitude and prepend city_county to a CSV file
    • Needs to be in the csv directory
    • Named with state abbreviation and year (e.g., ok_cooling_centers_2024.csv)
    • Can be set in .env as CSV_FILE

TODO

See TODO.md for more details.

About

Python project to aggregate US Cooling centers

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors 2

  •  
  •