MarEichler / covid19_app

https://mareichler.shinyapps.io/covid19/
1 stars 0 forks source link

COVID-19 App

Updated version of the covid19 repository that was started in Spring 2020.

Data

Dynamic Data

COVID-19 data is updated daily. The app pulls the data from John's Hopkins (Cases/Deaths) and OWID (Vaccines) stores the data. The data is saved so the pull will only update once a day (beneficial since the pull takes a long time).

Static Data

There are 5 'static' data files that do NOT need to be updated daily. If running the app from scratch, only need to create these files one time.

File Description
shp_cnty.RDS Shape file of United States at the county level (not currently used in app, may use later)
Source: {urbnmapr} package
pop_state.RDS Population count at the state level
Source: US Census file
pop_cnty.RDS Population count at the county level (not currently used in app, may use later)
Source: US Census file
shp_hex.RDS Hex map shape file of United States
Source: MarEichler/us_hex_map, which used NPR code to create hex map points
shp_hex_centers.RDS Center points for each hex item
Source: MarEichler/us_hex_map
box::use(prep/static_data)
static_data$save_static_data() 
#> SUCCESS [2022-03-03 14:39:30] Saved shp_cnty.RDS
#> SUCCESS [2022-03-03 14:39:30] Saved pop_state.RDS
#> SUCCESS [2022-03-03 14:39:30] Saved pop_cnty.RDS
#> SUCCESS [2022-03-03 14:39:30] Saved shp_hex.RDS
#> SUCCESS [2022-03-03 14:39:30] Saved shp_hex_centers.RDS

R and Package Information

R version 4.1.1 (2021-08-10) -- "Kick Things"

Package Version Information
{box} 1.1.0 Create box modules
{data.table} 1.14.0 Manage/Manipulate data (much faster than base R or tribbles)
{DescTools} 0.99.43 Use RoundTo() to create axis breaks for trend chart
{DT} 0.19 Display data tables
{shinycssloaders} 1.0.0 Loading animations for plots
{shinyWidgets} 0.6.2 Additional widgets, pickerInput()
{logger} 0.2.0 Build-in log messages
{scales} 1.1.1 Scaling for visualizations, percent()/comma()
{shiny} 1.7.0 R Shiny Applications
{urbnmapr} 0.0.0.9002 Pull county shape files (not currently used in app)
{vroom} 1.5.4 Read in large data quickly
base R[^1]
{stats} 4.1.1 Create quantile breaks with quantile()
{datasets} 4.1.1 state.abb- list of 50 state abbreviations
Core tidyverse[^2]
{tidyverse} {dplyr} 1.0.7 Data manipulation
{tidyverse} {ggplot2} 3.3.5 Create hex map and trends chart
{tidyverse} {readr} 2.0.1 Read in smaller csv files
{tidyverse} {tibble} 3.1.4 Create tibbles for meta data (like variables and their names)
{tidyverse} {tidyr} 1.1.3 Use drop_na() for creating data frame to plot
tidyverse
{tidyverse} {lubridate} 1.7.10 Create/Manage date variables
{tidyverse} {glue} 1.5.1 Combine text and R code to crate string of text
{tidyverse} {magrittr} 1.5.1 Pipe Operator, %>%

[^1]: Packages are automatically loaded in each R session so you don't need to install or import; however within box modules these packages need to be imported with box::use().

[^2]: All tidyverse packages can be installed using installed using install.packages("tidyverse") but core tidyverse packages can also be imported together using library("tidyverse"). For box modules refer to each specific package in the box::use() statement instead.