Skip to content

codeforamerica/nsb-mobile

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

We want to make it very easy for neighborhood organizations to collect good
information about the things they care about, like property condition,
vacancy, points of interest, and more.

This repository is part of a toolkit we’re building:

  • A mobile data collection app (this product)
  • A paper-based survey that’s easy to scan & automatically process
  • A small server to store and
    retrieve the results
  • A survey builder tool (coming soon)

The toolkit is very much in prototype stage. None of the tools here are
production ready yet, nor are they easy to deploy — we’re working towards
that.

Interested in helping out? Contact detroit@codeforamerica.org for more details.
Bug reports, questions, and pull requests are all welcome.

This repository

The HTML app in this repo is loaded by data collectors in the field on mobile
phones. It submits data to the survey API.

Running the app

This app is static HTML pages + javscript. You can run the app off any web
server, including github pages.

You will need to configure some parts:

  • In survey.html, change the action of the form to match the endpoint of your
    API server
  • In settings.js:
    • update the BASEURL to point to the endpoint of your API server
    • set the SURVEYID to match the survey ID from the API server
    • Set the locale, and set the map tilejson URL to match

To run using our new thing that isn’t documented yet:

There’s a Makefile that supports building a publish directory and syncing that
directory to S3. The Makefile depends on `recess`, `uglify-js`, and `s3cmd`.
You can install s3cmd on a Mac with `brew install s3cmd`. To sync to S3, you must
first run `s3cmd —configure` and supply the appropriate keys.

Build with `make` or `make build`. Deploy with `make publish`.

The maps

The maps used in this app are rendered with TileMill. They use street data
from OpenStreetMap and parcel data from local municipalities (right now,
Detroit).

Here are the basic steps we followed — please feel free to contact us with
questions about the details:

  1. Download street data from the Metrio city extracts.
    You’ll want the “9.2 MB osm2pgsql shapefiles.”
  2. Get a shapefile with parcel data from your local municipality.
  3. Use TileMill to create and style map that combines those two data sources.
    You can get started with the TileMill tutorial
  4. Export the map as MBTiles
  5. Upload the map to the MapBox hosted service
  6. Use the TileJSON URL in this app.

In the future, we are hoping to render the parcel maps entirely in the browser

About

Neighborhood Survey Builder Mobile

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%