Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Create a map using LeaftLet #5

Open
turicas opened this issue Oct 9, 2018 · 11 comments
Open

Create a map using LeaftLet #5

turicas opened this issue Oct 9, 2018 · 11 comments

Comments

@turicas
Copy link
Contributor

turicas commented Oct 9, 2018

We have city and state, so we can geolocate these points and then use LeaftLet to show a simple map. Example here.

@ellisonleao
Copy link
Contributor

i can try this one

@vgeorge
Copy link

vgeorge commented Oct 10, 2018

If input data has a column identifying the city with an IBGE id it will be possible to use coordinates from this file.

@vgeorge
Copy link

vgeorge commented Oct 10, 2018

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.

@ellisonleao
Copy link
Contributor

@turicas are the lat, lng codes going to be populated in the spreadsheet ?

@turicas
Copy link
Contributor Author

turicas commented Oct 11, 2018

@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.

@ellisonleao
Copy link
Contributor

@turicas ok, can you add a fixture sample as well so i can test on my side, please?

@vgeorge
Copy link

vgeorge commented Oct 12, 2018

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

@ellisonleao
Copy link
Contributor

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.

@ocefpaf
Copy link

ocefpaf commented Oct 13, 2018

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

@vgeorge
Copy link

vgeorge commented Oct 14, 2018

@ellisonleao I've changed the file, now the coordinates are stored in a lonlat field.

@vgeorge
Copy link

vgeorge commented Oct 14, 2018

@ellisonleao I don't have write access to the official doc, someone has to add the changes there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants