gadenbuie / covid19-florida

Florida COVID19 Data parsed from Florida DOH Dashboard and PDF reports
https://covid19-florida.garrickadenbuie.com/
31 stars 8 forks source link

Exclude Florida residents not physically in Florida? #14

Open gadenbuie opened 4 years ago

gadenbuie commented 4 years ago

The Total Cases number on the dashboard includes Florida residents tested or isolated outside of Florida.

It's possible to exclude these people at the county level using the data from Florida_COVID19_Cases (FeatureServer) and removing the c_fl_res_out column from the total.

library(tidyverse)
read_csv("https://github.com/gadenbuie/covid19-florida/raw/master/data/covid-19-florida_arcgis_summary.csv", guess_max = 1e5) %>% 
  filter(timestamp > "2020-04-14 00:00:00") %>% 
  group_by(timestamp) %>% 
  summarize(
    t_positive = sum(t_positive), 
    t_positive_2 = sum(t_positive_2), 
    c_in_fl = sum(c_fl_res + c_not_fl_res)
  )
#> # A tibble: 4 x 4
#>   timestamp           t_positive t_positive_2 c_in_fl
#>   <dttm>                   <dbl>        <dbl>   <dbl>
#> 1 2020-04-14 07:00:17      21019        21019   21011
#> 2 2020-04-14 12:00:37      21376        21367   21359
#> 3 2020-04-14 19:01:19      21629        21628   21620
#> 4 2020-04-15 07:00:37      21629        21628   21620