A project for the 2021 Sustainable Communities Web Challenge. Generates Environmental Footprint "Nutrition Labels" for communities in the USA.
The CI process publishes new builds to: https://zctaimpacts.abrie.dev
You are able to visit the live site for a UI, or query it using the API:
curl -X POST -H "Content-Type: application/json" -d '{"statefp":17,"countyfp":31}' https://localhost:5000/query/county/impacts
There are two options: Docker, or from source. Both options require API keys and a local copy of the database.
The finished database is about 220 megabytes, and must be built from scratch. A utility script is provided:
cd backend/utils
- Execute
./build.sh
- Copy the resulting file
out/db.spatialite
file tobackend/instance
The app queries the Census.gov API for County Business Patterns information. This app needs an API key do that.
- Get one here.
- Copy
backend/secrets.json
tobackend/instance
and your your API key to it.
docker run -v{/full/path/to/instance/folder}:/backend/instance abriedev/zctaimpacts
will serve on port 80.
- Install backend dependencies:
cd backend && python -m pip install --upgrade pip
- Start the backend:
cd backend && make serve
- Install frontend dependencies:
yarn
- Start the frontend:
cd frontend && yarn start
- Access the site through
https://localhost:3000