Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vgrichina/mtv-projects
Mountain View, CA – Map of active construction projects
https://github.com/vgrichina/mtv-projects
geodata google-maps mountain-view open-data open-government opendata opengov
Last synced: 16 days ago
JSON representation
Mountain View, CA – Map of active construction projects
- Host: GitHub
- URL: https://github.com/vgrichina/mtv-projects
- Owner: vgrichina
- Created: 2017-03-04T08:55:15.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-18T08:03:03.000Z (over 6 years ago)
- Last Synced: 2024-12-22T01:26:43.400Z (about 1 month ago)
- Topics: geodata, google-maps, mountain-view, open-data, open-government, opendata, opengov
- Language: HTML
- Homepage: https://vgrichina.github.io/mtv-projects/
- Size: 25.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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.aspData 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
- Python 2.7.x
- [requests](http://docs.python-requests.org/en/master/)
- [geopy](https://pypi.python.org/pypi/geopy)
- [poppler](https://poppler.freedesktop.org), `pdftotext` utility specifically### Download data
```
python download.py
```### Preprocess data
Create `secrets.sh` file with following contents:
```
export GOOGLE_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](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.