|
|
- # api.seattlematrix.org
-
- API to help make public data easier to access. Idea started with need for King County, WA COVID-19 data in API format while only having an excel file for source data.
-
- ## Development Setup
-
- ### Datastore
-
- I am using Postgresql for the datastore due to what I read about concurrancy over mysql, figured that would be good for an API. During development using a container on my machine.
-
- ```bash
- docker run --rm --name pg-docker -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres:11
- ```
-
- You can use this command to connect to the postgresql instance in the container.
-
- ```bash
- docker ps # to find the CONTAINER ID
- docker exec -it 05b3a3471f6f bash
- ```
-
- From the shell login to the db and setup initial user and database
-
- ```bash
- psql -U postgres
- ```
-
- Create your creds.py from the creds_sample.py
-
- ```bash
- cp creds_sample.py creds.py
- ```
-
- Edit creds.py with correct info for your db.
-
- More info coming soon on using the scripts in database/ to create tables and load them with data.
-
- ### Development Env.
-
- Project is using Python 3.7
-
- In the project we use [pipenv](https://pipenv.pypa.io/en/latest/) when developing.
-
- ```bash
- pipenv install && pipenv shell
- ```
- ### Production
-
- When running on Debian server libpq-dev is required, this is postgresl library.
-
- ```bash
- sudo apt-get install libpq-dev
- ```
-
- ### Data Available
-
- - King County, Washington COVID-19 Data
- - [King County, WS Covid-19 by ZipCode](https://api.seattlematrix.org/v1/kingcounty/covid-19/zipcode/all)
- - sample source url https://www.kingcounty.gov/depts/health/covid-19/data/~/media/depts/health/communicable-diseases/documents/C19/data/covid-data-extract-geography-august-24.ashx
|