hackforwesternmass / frcog-private-wells

2 stars 0 forks source link

FRCOG Town Well Mapping

This document contains instructions for setting up a process to get private well data from the MA DEP, updating it via the web or via Android device, and mapping it.

You can view a map of the well locations here.

Setting up a New Town

These instructions are for getting a new town online. This process is only necessary once--when DEP first sends the well data spreadsheet for a new town.

Upload Well Data From DEP

 =if(NOT(AE2=""),CONCATENATE(AF2,",",AG2),IF(NOT(V2=""),CONCATENATE(V2,",",W2),AI2))

Create the Fusion Table

This is a one-time setup process for converting the town’s well data into a Fusion Table.

Test the Fusion Table Geocoding

Before going any further, make sure the fusion table is working and is able to create a map based on the addresses and coordinates you’ve imported.

Get the Fusion Table ID

Each Google fusion table has a unique id. You’ll need to copy the id of this table to use later.

Add the Update Script to the Town Spreadsheet

Now that you’ve created a fusion table based on the town spreadsheet, go back to the spreadsheet and add a script that will send future spreadsheet updates (for example, information coming from the field) to the fusion table.This is a one-time step.

2. Updating Data

There are two ways to update a town’s well data:

Updating the Google Spreadsheet

Assuming the initial setup of the town’s Google spreadsheet was done correctly (see above):

Updating via Android device

See these instructions for using Memento.

Miscellaneous Notes

One-Time Setup

Options for taking multiple fusion tables (one for each town) into a single map:

Option 1: use layers to create a new map

https://support.google.com/fusiontables/answer/2592769?hl=en&ref_topic=2592807

sample code:

http://gmaps-samples.googlecode.com/svn/trunk/fusiontables/multiple_layers_per_map.html

wizard:

http://fusion-tables-api-samples.googlecode.com/svn/trunk/FusionTablesLayerWizard/src/index.html

Option 2: merge tables into one table, then map

https://support.google.com/fusiontables/answer/171254?hl=en&ref_topic=2572284

Note that there is a limit of 8 tables to merge onto a single map.

Other resources:

http://michelleminkoff.com/2011/08/21/how-to-combine-multiple-fusion-tables-into-one-map/

Developer Notes

How the Data Update Function menu works

There is a code library in the “FRCOG Library” spreadsheet in “MA Wells”.  Open it, then open the script editor.

There are instructions at the top of the file to save a version and update library version usage which you must follow.

The Google spreadsheet columns names must match the column names in the Memento template. These column names are stored in the Well Data Column Headers spreadsheet (for easy copy & paste) and are also below:

WELL_COMPLETION_ID WELL_LOCATION WELL_STREET_NUMBER WELL_STREET_NAME PROPERTY_OWNER WELL_SUB_NAME OWNER_ADDRESS OWNER_STREET_NUMBER OWNER_STREET_NAME OWNER_CITY ASSESSORS_LOT ASSESSORS_MAP BOH_DATE_ISSUED DEPTH_TO_BEDROCK BOH_PERMIT WC_DATE COMMENTS FIRM WELL_TYPE SUPERVISING_DRILLER WC_DEPTH LATITUDE LONGITUDE LATD LATM LONGD LONGM FIELD_NOTES DATE_CORRECTED ignore_this_field FIELD_LOCATION Corrected_Latitude Corrected_Longitude well_town well_address geocode

Current Limitations/Known Issues/TODOs