API for geospatial and time aggregation across multiple open datasets.
This project is funded by the NSF Computer and Information Science and Engineering (CISE) Directorate through a grant to the Urban Center for Computation and Data (UrbanCCD) at the Computation Institute of the University of Chicago and Argonne National Laboratory. It is maintained by UrbanCCD and was prototyped by DataMade.
-
Install requirements
-
Get the Plenario source:
git clone [email protected]:UrbanCCD-UChicago/plenario.git
- Start up Vagrantfile
cd plenario
vagrant up
- Wait for Vagrant to finish its output and exit with this message
Open http://localhost:5000/ on your host browser
- Get the Plenario source:
git clone [email protected]:UrbanCCD-UChicago/plenario.git
Install support libraries for Python:
cd plenario
pip install -r requirements.txt
Create a PostgreSQL database for Plenario. (If you aren't already running
PostgreSQL, we recommend installing version 9.3 or
later.) The following command creates the default database, plenario_test
.
This corresponds with the DB_NAME
setting in your plenario/settings.py
file
and can be modified.
createdb plenario_test
Make sure your local database has the PostGIS extension:
psql plenario_test
plenario_test=# CREATE EXTENSION postgis;
You'll need the ogr2ogr utility - part of the gdal package. We use it to import and export shape datasets.
OSX
brew install gdal --with-postgresql
Ubuntu/Debian
sudo apt-get install gdal-bin
Next, create your own settings.py
:
cp plenario/settings.py.example plenario/settings.py
You will want to change, at the minimum, the following settings.py
fields:
-
DATABASE_CONN
: edit this field to reflect your PostgreSQL username, server hostname, port, and database name. -
DEFAULT_USER
: change the username, email and password on the administrator account you will use on Plenario locally.
Before running the server, Redis needs to be running.
- To start Redis locally (in the background):
redis-server &
Initialize the plenario database by running python init_db.py
.
Finally, run the server:
python runserver.py
Once the server is running, navigate to http://localhost:5001/ . From
the homepage, click 'Login' to log in with the username and password
from settings.py
. Once logged in, go to 'Add a dataset' under the
'Admin' menu to add your own datasets.
Thanks to the maintainers of these open source projects we depend on.
- PostgreSQL - database version 9.3 or greater
- PostGIS - spatial database for PostgreSQL
- Flask - a microframework for Python web applications
- SQL Alchemy - Python SQL toolkit and Object Relational Mapper
- psycopg2 - PostgreSQL adapter for the Python
- GeoAlchemy 2 - provides extensions to SQLAlchemy for working with spatial databases
- GDAL - geospatial data mungeing
- Redis - key-value cache
- Gunicorn - WSGI server
Thanks for the following services that have given us free academic/open source accounts.
- Sentry - exception and task monitoring
- Code Climate - static analysis
- JetBrains - open source license for PyCharm and WebStorm IDEs
- Charlie Catlett
- Brett Goldstein
- Will Engler
- Jesus Bracho
Join us on Gitter for technical help with the Plenario API,
The plenario/tests folder includes a suite of API tests split across the /points and /shapes directories. To run the tests using with nose, use the command 'nosetests tests' from the /plenario directory
If something is not behaving intuitively, it is a bug, and should be reported. Report it here: https://github.com/UrbanCCD-UChicago/plenario/issues
Pull requests make us very happy. If you're interested in contributing, come chat with us on Gitter to discuss what you'd like to do. Then follow common best practices to send us a PR.
Copyright (c) 2014 University of Chicago and DataMade. Released under the MIT License.