Open turicas opened 6 years ago
i can try this one
If input data has a column identifying the city with an IBGE id
it will be possible to use coordinates from this file.
A "cities" file could added to the Google Sheets file as an auxiliary tab. At "Casos" tab the coordinates could be fetched using VLOOKUP searching for ibge_city_id
, so we don't need to georeference at the front-end.
@turicas are the lat, lng codes going to be populated in the spreadsheet ?
@ellisonleao yes! In the "case" spreadsheet. :) I can populate it, we need to change the models to load it and then use it on the frontend.
@turicas ok, can you add a fixture sample as well so i can test on my side, please?
I made a copy of the table and added a mechanism to generate coordinates of the cases from city codes:
https://docs.google.com/spreadsheets/d/1UlkevRSDmnqMDxaE_mjNqxf_y-paGd6qbYAIpgVBL-g/edit?usp=sharing
hey @vgeorge, thanks for the help. Looks like the lat and lng fields are going to be a in a single column, splitted by ,
. E.g: 12.23,-5.234
. The current code that i am using is parsing in that way.
The approach in #14 is probably better but here is an example on how to achieve this with geopy
and folium
. The folium
map can be saved as a stand-alone HTML.
http://nbviewer.jupyter.org/gist/ocefpaf/3bb0a42943aad9560642e0088df936f8
@ellisonleao I've changed the file, now the coordinates are stored in a lonlat
field.
@ellisonleao I don't have write access to the official doc, someone has to add the changes there.
We have city and state, so we can geolocate these points and then use LeaftLet to show a simple map. Example here.