Skip to content

vgrichina/mtv-projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mountain View, CA – Map of active construction projects

This isn't official information, it is based on official development project list available here: http://mountainview.gov/depts/comdev/planning/activeprojects/list.asp

Data is scraped from PDF files and may contain inaccuracies. Please consult linked PDF files for accurate official information.

Your contributions are welcome -- please fork and submit pull requests.

Hacking on

index.html contains map frontend code itself. Change it if you want to change the way information is displayed.

data/projects.json contains scraped data. It is generated by combination of download.py and preprocess.py

download.py downloads pdfs from Mountain View website into data/ folder. It also converts them to text and parses using parse.py module. Results are written to data/projects.json.

preprocess.py prepares data/projects.json for use on map. It tries to parse addresses from project titles and geocodes them using Google Maps API.

Running locally

Requirements

Download data

python download.py

Preprocess data

Create secrets.sh file with following contents:

export GOOGLE_API_KEY=<your API KEY>

API key can be obtained here https://console.developers.google.com/apis/credentials

python preprocess.py

Run local web server

python -m SimpleHTTPServer 8000

This will start webserver available on http://localhost:8000. It is important to open web page from server as JS cannot load data if you open it locally from file system.