Open Data Community Indicators Platform
API
OpenAPI Schema
Documentation (
Swagger UI |
Redoc)
- Python (^3.8)
- PostgreSQL (^11)
- Postgis
- pip
- Probably a bunch of other stuff I mistakenly take for granted. Let me know.
- Create a Postgres database with the PostGIS extension added.
- Clone this code
git clone https://github.com/WPRDC/neighborhood-simulacra
- Enter the project directory
cd neighborhood-simulacrum
- Create a virtual environment and activate it (docs)
# make it
$ python3 -m venv env
# activate it
$ . env/bin/activate
- Install required python packages
$ pip install -r requirements.txt
-
Modify
profiles/local_settings.py.example
based on the instructions therein. -
Configure the database using the projects migrations.
$ ./manage.py migrate
-
Follow the extra initialization instructions in
init/
to set up the tile server and CKAN connection. -
Run your server! 🚀
$ ./manage.py runserver
Your api will be available at http://localhost:8000/api
Your admin interface will be available at http://localhost:8000/admin
The web framework that the project is built on.
We use the tools from DRF to define our web API.
Since we deal with a lot of geographic data, we use a lot of the geographic tools in Django.
Django polymorphic provides utility classes for standardizing interfaces to polymorphic data models.