Skip to content

TheLens/school-zone-maps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

Create a virtual environment.

mkvirtualenv --python=`which python3` school-zones

Make sure your virtual environment is activated.

workon school-zones

Install dependencies.

pip install -r requirements.txt

Configure environment variables. You can store these in ~/.virtualenvs/postactivate, ~/.virtualenvs/school-zones/bin/postactivate, ~/.env or anywhere else in your PATH.

# Amazon Web Services
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=

# Google Geocoding service
export GOOGLE_GEOCODING_API_KEY=

Data conversion

Download the survey results as a CSV file from Google Sheets. Save to data/results.csv.

In the top-level directory, run Make to convert data/results.csv to www/markers.json. This might require some fine tuning to scripts/process.py, depending on how data/results.csv is formatted.

make

Development

While designing the map, run a local server to preview your changes.

# Python 2
python -m SimpleHTTPServer

# Python 3
python -m http.server

Open a new tab in your web browser and navigate to http://localhost:8000.

Deployment

Run make deploy to upload the contents in www/ to an S3 bucket. Make sure to edit scripts/s3.sh first and update the new bucket name.

make deploy

Publication

Use an iframe to post the map within an article.

<iframe src="http://projects.thelensnola.org/school-zones/PROJECT_SLUG/map.html" frameborder="0">

About

Geocoding and mapping school zone lights observations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •