library(coronavirusbrazil)
data("spatial_br_states")
head(spatial_br_states)
#> id name uf codigo regiao geometry date cases deaths
#> 1 AC Acre AC 12 Norte -70.470805, -9.213489 2020-04-12 77 2
#> 2 AL Alagoas AL 27 Nordeste -36.622412, -9.514914 2020-04-12 48 3
#> 3 AM Amazonas AM 13 Norte -64.652360, -4.153635 2020-04-12 1206 62
#> 4 AP Amapá AP 16 Norte -51.955126, 1.443783 2020-04-12 230 5
#> 5 BA Bahia BA 29 Nordeste -41.72199, -12.47407 2020-04-12 673 21
#> 6 CE Ceará CE 23 Nordeste -39.617645, -5.090845 2020-04-12 1676 74
#> new_cases new_deaths death_rate percent_case_increase percent_death_increase
#> 1 5 0 0.02597403 6.944444 0.00000
#> 2 0 0 0.06250000 0.000000 0.00000
#> 3 156 9 0.05140962 14.857143 16.98113
#> 4 37 2 0.02173913 19.170984 66.66667
#> 5 38 0 0.03120357 5.984252 0.00000
#> 6 94 7 0.04415274 5.941846 10.44776
#> log_cases log_deaths
#> 1 1.886491 0.3010300
#> 2 1.681241 0.4771213
#> 3 3.081347 1.7923917
#> 4 2.361728 0.6989700
#> 5 2.828015 1.3222193
#> 6 3.224274 1.8692317mapview::mapview(spatial_br_states,
map = leaflet::leaflet() %>% leaflet::addTiles(),
zcol="cases", cex="log_cases",
layer.name="Casos",
label=paste0(spatial_br_states$uf, ": ", spatial_br_states$cases))data("spatial_br_cities")
head(spatial_br_cities)
#> Simple feature collection with 6 features and 6 fields
#> geometry type: POINT
#> dimension: XY
#> bbox: xmin: -66.8972 ymin: -19.1551 xmax: -34.8984 ymax: -1.72183
#> CRS: NA
#> date city cases deaths geometry log_cases
#> 1 2020-04-12 Abaeté 1 0 POINT (-45.4444 -19.1551) 0.0000000
#> 2 2020-04-10 Abaetetuba 2 0 POINT (-48.8788 -1.72183) 0.3010300
#> 3 2020-04-12 Abreu e Lima 10 0 POINT (-34.8984 -7.90072) 1.0000000
#> 4 2020-04-11 Açailândia 1 0 POINT (-47.5004 -4.94714) 0.0000000
#> 5 2020-04-11 Acrelândia 9 0 POINT (-66.8972 -9.82581) 0.9542425
#> 6 2020-04-12 Açu 8 0 POINT (-36.914 -5.58362) 0.9030900
#> log_deaths
#> 1 -Inf
#> 2 -Inf
#> 3 -Inf
#> 4 -Inf
#> 5 -Inf
#> 6 -Infmapview::mapview(spatial_br_cities,
map = leaflet::leaflet() %>% leaflet::addTiles(),
zcol="cases", cex="log_cases",
layer.name="Casos",
label=paste0(spatial_br_cities$city, ": ", spatial_br_cities$cases))