Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rafaelmmoreira
Copy link

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

@netlify
Copy link

netlify bot commented May 20, 2020

Deploy preview for frosty-benz-8c81bf ready!

Built without sensitive environment variables with commit 9725178

https://deploy-preview-190--frosty-benz-8c81bf.netlify.app

@rpkoller
Copy link
Contributor

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:
Bildschirmfoto 2020-05-20 um 12 07 48
the csv is >8mb in size without any compression. people on slower connections might struggle and get in doubt if everything is behaving as expected. :/ is there perhaps a way to require a gzip compression for the loading of the csv file by any chance for brazil.io to shrink the amount of bandwidth?
and the other point are brazilians usually familiar with the abbreviations
of their state names?
Bildschirmfoto 2020-05-20 um 12 14 31
i know the csv contains only the abbreviations of the state names but would it be reasonable to display the full name? or maybe suggest to provide the full name upstream in the csv on brazil.io?

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

@rafaelmmoreira
Copy link
Author

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?
https://data.brasil.io/dataset/covid19/_meta/list.html

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?

@MrSpiffyClean
Copy link
Contributor

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.
This being said, looking around a bit it seems there is a way to just select the states with this link, which yields the following csv, which is around 140 KB, much more manageable, and seems to have just the state info.

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.

@rafaelmmoreira
Copy link
Author

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!

@rafaelmmoreira
Copy link
Author

@MrSpiffyClean it worked like a charm! It's much lighter and loads instantly. Thanks for the tip!

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

Successfully merging this pull request may close these issues.

None yet

3 participants