A função get_corona_minsaude()
extrai os dados oficiais do Ministério da Saúde.
dados_ms <- get_corona_minsaude()
## Baixando dados do Min. da Saúde...
## Rows: 1,759,617
## Columns: 17
## Delimiter: ";"
## chr [ 4]: regiao, estado, municipio, nomeRegiaoSaude
## dbl [10]: coduf, codmun, codRegiaoSaude, semanaEpi, populacaoTCU2019, casosAcumulado, cas...
## lgl [ 2]: Recuperadosnovos, emAcompanhamentoNovos
## date [ 1]: data
##
## Use `spec()` to retrieve the guessed column specification
## Pass a specification to the `col_types` argument to quiet this message
## salvando minsaude_2021-02-03.csv em outputs
head(dados_ms)
## # A tibble: 6 x 17
## regiao estado municipio coduf codmun codRegiaoSaude nomeRegiaoSaude data
## <chr> <chr> <chr> <dbl> <dbl> <dbl> <chr> <date>
## 1 Brasil <NA> <NA> 76 NA NA <NA> 2020-02-25
## 2 Brasil <NA> <NA> 76 NA NA <NA> 2020-02-26
## 3 Brasil <NA> <NA> 76 NA NA <NA> 2020-02-27
## 4 Brasil <NA> <NA> 76 NA NA <NA> 2020-02-28
## 5 Brasil <NA> <NA> 76 NA NA <NA> 2020-02-29
## 6 Brasil <NA> <NA> 76 NA NA <NA> 2020-03-01
## # … with 9 more variables: semanaEpi <dbl>, populacaoTCU2019 <dbl>,
## # casosAcumulado <dbl>, casosNovos <dbl>, obitosAcumulado <dbl>,
## # obitosNovos <dbl>, Recuperadosnovos <dbl>, emAcompanhamentoNovos <dbl>,
## # `interior/metropolitana` <dbl>
Aqui está o exemplo usando a função get_corona_br()
que extrai os dados do portal Brasil I/O https://brasil.io/, usando a API contendo os boletins informativos e casos de COVID-19 no Brasil.
dados_br <- get_corona_br(by_uf = TRUE)
##
## ── Column specification ────────────────────────────────────────────────────────
## cols(
## city = col_character(),
## city_ibge_code = col_double(),
## date = col_date(format = ""),
## epidemiological_week = col_double(),
## estimated_population = col_double(),
## estimated_population_2019 = col_double(),
## is_last = col_logical(),
## is_repeated = col_logical(),
## last_available_confirmed = col_double(),
## last_available_confirmed_per_100k_inhabitants = col_double(),
## last_available_date = col_date(format = ""),
## last_available_death_rate = col_double(),
## last_available_deaths = col_double(),
## order_for_place = col_double(),
## place_type = col_character(),
## state = col_character(),
## new_confirmed = col_double(),
## new_deaths = col_double()
## )
## salvando corona_brasil.csv em outputs
head(dados_br)
## # A tibble: 6 x 18
## city city_ibge_code date epidemiological… estimated_popul…
## <chr> <dbl> <date> <dbl> <dbl>
## 1 <NA> 35 2020-02-25 202009 46289333
## 2 <NA> 35 2020-02-26 202009 46289333
## 3 <NA> 35 2020-02-27 202009 46289333
## 4 <NA> 35 2020-02-28 202009 46289333
## 5 <NA> 35 2020-02-29 202009 46289333
## 6 <NA> 35 2020-03-01 202010 46289333
## # … with 13 more variables: estimated_population_2019 <dbl>, is_last <lgl>,
## # is_repeated <lgl>, last_available_confirmed <dbl>,
## # last_available_confirmed_per_100k_inhabitants <dbl>,
## # last_available_date <date>, last_available_death_rate <dbl>,
## # last_available_deaths <dbl>, order_for_place <dbl>, place_type <chr>,
## # state <fct>, new_confirmed <dbl>, new_deaths <dbl>
dados_jhu <- get_corona_jhu()
## Baixando dados atualizados ...
## salvando corona_jhu.csv em outputs
head(dados_jhu)
## fips admin2 province_state country_region last_update lat
## 1 NA Afghanistan 2021-02-03 05:22:52 33.93911
## 2 NA Albania 2021-02-03 05:22:52 41.15330
## 3 NA Algeria 2021-02-03 05:22:52 28.03390
## 4 NA Andorra 2021-02-03 05:22:52 42.50630
## 5 NA Angola 2021-02-03 05:22:52 -11.20270
## 6 NA Antigua and Barbuda 2021-02-03 05:22:52 17.06080
## long confirmed deaths recovered active combined_key incident_rate
## 1 67.70995 55121 2405 47798 4918 Afghanistan 141.5961
## 2 20.16830 79934 1398 48377 30159 Albania 2777.6079
## 3 1.65960 107841 2898 73732 31211 Algeria 245.9257
## 4 1.52180 10017 102 9252 663 Andorra 12964.4729
## 5 17.87390 19900 468 18232 1200 Angola 60.5484
## 6 -61.79640 249 7 179 63 Antigua and Barbuda 254.2684
## case_fatality_ratio
## 1 4.363128
## 2 1.748943
## 3 2.687290
## 4 1.018269
## 5 2.351759
## 6 2.811245