-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regional data for Brazil #190
base: master
Are you sure you want to change the base?
Conversation
Deploy preview for frosty-benz-8c81bf ready! Built without sensitive environment variables with commit 9725178 |
nice :) there was a request/suggestion about a month ago: #92 ... i have two comments about your pull request. after the first load i thought you maybe forgot to reset the display when switching to brazil as the expected brazilian states havent shown up - but it just took a "little" longer. but if you take a look at the following info it makes sense: and a general question to you and others following and reading. i already asked that in #149 (comment) how to proceed if the number of countries with state data increases (brazil and the US are the first with dedicated csv files compared to the johns hopkins one))? might become a quite extensive if statement if more countries come in ;) cc @aatishb |
Hello, thanks for your reply! It's a pretty large file indeed, as it shows individual data for every city in Brazil with confirmed covid-19 cases, and it'll only get larger. I can see how this would be a problem. There's an option to download the CSV compressed in .gz. Are the libs we're using in this project able to unzip it? People in Brazil are familiar with the state abbreviations. Just like in the US, most of the time (such as when writing our addresses) we use them rather than the full names. I can hardcode the name of the states and map the abbreviations to them. But that leads us to your last point... As you mentioned, there are only two countries so far not included in the original CSV (USA and Brazil) and we're already getting a significant amount of specific code. Do you think it's time to do some refactoring to make it less messy to add new regional data from other countries? |
Adding my 2 cents here. The gzip'ed file is still 2 MB, which is still a lot of info (in comparison with the JHU dataset, currently amount 400 KB). The issue seems to be with the server (configuration), as (just looking at the feedback from Firefox) it isn't serving gzipped content despite requests for it. About the abbreviations, here's my thoughts on them: while anyone from Brazil might recognize the abbreviations, it's helpful to remind that anyone from around the world can check the info for Brazil and having then to check what the abbreviations mean (in another site) is annoying. So, the issue becomes whether to "hardcode" the state's names for clarity. This is I think something that will become clearer as soon as the push for internationalization begins and most text ends up on several localized files. |
I've commited the full state names, but something happened during checking and it was cancelled. I'll give this new CSV a try tonight, thank you very much! |
@MrSpiffyClean it worked like a charm! It's much lighter and loads instantly. Thanks for the tip! |
I have used data from Brasil.io, which is a volunteer-task force that gathers from government authorities (city halls, state governments and federal government) and present them in more friendly formats than the official government websites. They update their database daily. More info (in PT-BR) is available here:
https://brasil.io/covid19/
The CSV link I used, which is updated daily, is here:
https://brasil.io/dataset/covid19/caso_full/?format=csv
They also have a JSON API and a GitHub repository: https://github.com/turicas/covid19-br