-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
By now I think we could get them when processing the spreadsheet — unless until we find a better solution. My rational for that is that converting city names to geo-coordinates is a task that looks like more proper for machines (
Not at this point, but we can implement it later ; )
Suggestion: the headline of One more suggestion: I see no need for |
* upstream/master: (25 commits) Add codecov.yml Add meta tags for social media Add codcov Python package Enhance visibility for footer logos Format Python code with Black Strong the order Fix when sort (reverse) Run black Add paragraph Randomize stories inside each case Round robin cases by aggressor_side Add agressor_side to Case fix footer Mobile styles Typo: gray -> grey Add success message to clear cache script Fix quotes on Google Analytics code Move other project links to about page Add about page Add tag color ...
* upstream/master: Add Docker for production Small tweak for big displays Simplify font-size add font math thanks to https://css-tricks.com/snippets/css/fluid-typography/ Transform flex istead of changing to block on footer style
* upstream/master: Use HTTP in metatags Fix og:image (full URL) Fix og:image Makes Sanic enforce HTTPS Change FOSS messge at the bottom Remove Agência Pública's spreadsheet link
* upstream/master: Add sample spreadsheet Cleanup Refactor Data class Escape HTML chars
@cuducos the changes you've asked are already made, i am just waiting for the new spreadsheet template so i can update the data model and add the markers on frontend. Also, i am not sure if it would be better to squash all commits into a single one at the end. |
@ellisonleao you can just add a column called "latlon" to "Casos" spreadsheet and collect data from there (it's going to be a |
* upstream/master: Add links to the about page Format Python code with Black Update methodology
@turicas are we going to use |
@ellisonleao I think the best would be "," because: |
@cuducos @turicas i've added the markers code and the serialization of the latlon field. What extra information do you think we need on the maps page? Right now there is only the map and the button for the cases form. One probably issue is that we will need to group the cases by city/state in order for all them to show if we have multiple cases in the same city. Maybe a property function in the |
I think this sounds like a good way of implementing it. I tried to run your branch but it throws a |
* master: limit story description. Ref #24 Force close Redis connections Replace aiocache by aioredis Remove REDIS_DB envvar
- adding latlon column on cases fixtur
# serializing latitude and longitude | ||
data["latlng"] = data["latlng"].strip() or "" | ||
data["latlng"] = data["latlng"].split(",") | ||
data["latlng"] = list(map(float, data["latlng"])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is slightly more readable, what do you think?
data["latlng"] = list(map(float, data["latlng"])) | |
data["latlng"] = [float(coord) for coord in data["latlng"]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW if this column is empty this line breaks the app… we might need something for this edge case ; )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! I've started by adding some try/exceptions for ValueError
exceptions but i am not sure what you guys prefer.
actually i am not sure right now if adding a function over there will be the best. Is there a unique element that we can use as the aggregator for same city cases (latlng, city, etc) ? What about just adding that logic to aggregate the cases by city in the map route function for now? |
hi guys I made a dashboard with map and some informations. I will appreciate your feedback. cya |
Ref #5
Questions:
serialize_cases
function?I've opened the pull request with some already things changed, which includes:
/map
route