codeforkansascity / I-Got-Mine

Connecting KCMO residents with free sexual health resources offered by the City
http://igotmineinkc.org
MIT License
6 stars 8 forks source link

Google spreadsheet: Add script to calculate longitude/latitude values from address #106

Open tangospring opened 8 years ago

tangospring commented 8 years ago

The geocoding can be done with Google spreadsheet add-on. Description here: https://chrome.google.com/webstore/detail/geocode-cells/pkocmaboheckpkcbnnlghnfccjjikmfc?hl=en

or with this macro: https://vilimpoc.org/blog/2013/07/11/google-spreadsheet-geocoding-macro/

or automatically [detailed copy/paste instructions]: http://www.digital-geography.com/geocoding-google-spreadsheets-the-simpler-way/

tangospring commented 8 years ago

Hi Paul, do you still want to write this script?

manaflow commented 7 years ago

I wrote an automatic script for entering new addresses. Only problem is that it would reload all longitude and latitude values when a new address was added. So instead I added the macro to the spreadsheet. I added a backup of the locations to the spreadsheet while I worked on it. It is there just in case.

The code for the auto input is still available. Using this code: Place in G2. = ARRAYFORMULA (if(E2:E<>"",ARRAYFORMULA (getLatRange(E2:E)),""))

Place in F2. = ARRAYFORMULA (if(E2:E<>"",ARRAYFORMULA (getLonRange(E2:E)),""))

Can also Change E2 to E70 in the above and only run for new addresses onward. There is a limit on how many calls to geocoding, so the macro solution may be better.