ACT-covid-resources / Indiana-COVID-19-Tracker

Collects and processes data and creates static charts for the Indiana-COVID-19-Website.

Home Page:https://ercbk.github.io/Indiana-COVID-19-Website/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

---
output: 
   github_document
---


```{r, setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE,
                      warning = FALSE,
                      message = FALSE,
                      out.width = "100%",
                      collapse = TRUE)

library(readr)
library(glue)
library(dplyr)
library(gt)
library(gtsummary)
```

# Indiana COVID-19 Tracker  
![Noon Update](https://github.com/ercbk/Indiana-COVID-19-Tracker/workflows/Noon%20Update/badge.svg)
![Evening Update](https://github.com/ercbk/Indiana-COVID-19-Tracker/workflows/Evening%20Update/badge.svg)
[![DOI](https://zenodo.org/badge/253142394.svg)](https://zenodo.org/badge/latestdoi/253142394)


This repository collects and processes datasets for [Indiana-COVID-19-Website](https://github.com/ercbk/Indiana-COVID-19-Website). It also has creates charts for the ["Static Charts"](https://ercbk.github.io/Indiana-COVID-19-Website/static.html) tab of the Indiana COVID-19 Tracker website.  


The changelog for the entire Indiana COVID-19 Tracker project is located in [NEWS.md](https://github.com/ercbk/Indiana-COVID-19-Tracker/blob/master/NEWS.md).  


The data files described in this dictionary are in the [data](https://github.com/ercbk/Indiana-COVID-19-Tracker/tree/master/data) directory of this repository and the [data](https://github.com/ercbk/Indiana-COVIDcast-Dashboard/tree/master/data) directory of the Indiana-COVIDcast-Dashboard repository.  

## Datasets 

```{r, asis=TRUE}

data_dict_tbl <- tibble(
  file_name = c("age-cases-heat.rds",
                "age-death-line.rds",
                "age-hosp-line.rds",
                "beds-vents-complete.csv",
                "hosp-msas-line.rds",
                "hosp-react-tab.rds",
                "ind-age-complete.csv",
                "ind-race-complete.csv",
                "median-age-bubble.rds",
                "mort-hosp-line.rds",
                "msa-cases100-posrate-historic.csv",
                "dash-ci-line.rds",
                "illinois-tests-complete.csv",
                "ind-tests-complete.csv",
                "mich-tests-complete.csv",
                "wis-tests-complete.csv"),
  
  table_name = c("Historical Weekly COVID-19 Cases by Age for Indianan",
                 "Historical Weekly COVID-19 Deaths by Age Group for Indiana",
                 "Historical Daily COVID-19 Hospital Admissions by Age Group for Indiana",
                 "Historical Daily ICU Beds and Ventilators for Indiana",
                 "Historical State Hospital Staff Shortages, Hospital Mortality Rate, Hospital Admissions and Ages Skewness of Admissions for Indiana",
                 "Local Hospital Capacity for Indiana",
                 "Historical Daily Tests, Cases and Deaths by Age for Indiana",
                 "Historical Daily Cases and Deaths by Race for Indiana",
                 "Historical Weekly Median Age of Cases, Weekly Tests and Deaths for Indiana",
                 "Historical Daily Hospital Admissions and Deaths for Indiana",
                 "Historical Weekly Positivity Rates and Daily Cases per 100,000 Indiana Residents",
                 "Historical Daily Values of Delphi Research Groups Combined Indicator for Indiana",
                 "Historical Weekly COVID-19 Statistics and Counts for Illinois Counties",
                 "Historical Daily COVID-19 Test Results for Indiana Counties",
                 "Historical Daily COVID-19 Test Results for Michigan Counties",
                 "Historical Daily COVID-19 Test Results for Wisconsin Counties"),
  
  chart_name = c("Weekly COVID-19 Cases by Age",
                 "Weekly COVID-19 Deaths by Age Group",
                 "State Hospital Mortality, Staffing Shortages, Admissions",
                 "Hospitalizations, ICU Beds and Ventilator Availablity",
                 "State Hospital Mortality, Staffing Shortages, Admissions",
                 "Local Hospital Capacity",
                 "Weekly COVID-19 Deaths by Age Group",
                 "",
                 "Median Age of Weekly COVID-19 Cases, Weekly Tests and Deaths",
                 "State Hospital Mortality, Staffing Shortages, Admissions",
                 "Carnegie Mellon’s COVIDcast for Indiana",
                 "Carnegie Mellon’s COVIDcast for Indiana",
                 "Carnegie Mellon’s COVIDcast for Indiana",
                 "Carnegie Mellon’s COVIDcast for Indiana",
                 "Carnegie Mellon’s COVIDcast for Indiana",
                 "Carnegie Mellon’s COVIDcast for Indiana"),
  
  chart_url = c("https://ercbk.github.io/Indiana-COVID-19-Website/demographics.html#cases-by-age",
                "https://ercbk.github.io/Indiana-COVID-19-Website/demographics.html#deaths-by-age",
                "https://ercbk.github.io/Indiana-COVID-19-Website/hospitals.html#state-hospital-mortality-staffing-shortages-admissions",
                "https://ercbk.github.io/Indiana-COVID-19-Website/static.html#Hospitalizations,_ICU_Beds_and_Ventilator_Availability",
                "https://ercbk.github.io/Indiana-COVID-19-Website/hospitals.html#state-hospital-mortality-staffing-shortages-admissions",
                "https://ercbk.github.io/Indiana-COVID-19-Website/hospitals.html#local-hospital-capacity",
                "https://ercbk.github.io/Indiana-COVID-19-Website/demographics.html#deaths-by-age",
                "",
                "https://ercbk.github.io/Indiana-COVID-19-Website/demographics.html#median-age-of-cases-tests-deaths",
                "https://ercbk.github.io/Indiana-COVID-19-Website/hospitals.html#state-hospital-mortality-staffing-shortages-admissions",
                "https://ercbk.github.io/Indiana-COVIDcast-Dashboard/#dashboard",
                "https://ercbk.github.io/Indiana-COVIDcast-Dashboard/#dashboard",
                "https://ercbk.github.io/Indiana-COVIDcast-Dashboard/#dashboard",
                "https://ercbk.github.io/Indiana-COVIDcast-Dashboard/#dashboard",
                "https://ercbk.github.io/Indiana-COVIDcast-Dashboard/#dashboard",
                "https://ercbk.github.io/Indiana-COVIDcast-Dashboard/#dashboard"),
  
  data_url = c("https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Historical_Weekly_COVID-19_Cases_by_Age_for_Indiana",
               "https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Historical_Weekly_COVID-19_Deaths_by_Age_Group_for_Indiana",
               "https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Historical_Daily_COVID-19_Hospital_Admissions_by_Age Group_for_Indiana",
               "https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Historical_Daily_ICU_Beds_and_Ventilators_for_Indiana",
               "https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Historical_State_Hospital_Staff_Shortages,_Hospital_Mortality_Rate,_Hospital_Admissions_and_Ages_Skewness_of_Admissions_for_Indiana",
               "https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Local_Hospital_Capacity_for_Indiana",
               "https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Historical_Daily_Tests,_Cases_and_Deaths_by_Age_for_Indiana",
               "https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Historical_Daily_Cases_and_Deaths_by_Race_for_Indiana",
               "https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Historical_Weekly_Median_Age_of_Cases,_Weekly_Tests_and_Deaths_for_Indiana",
               "https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Historical_Daily_Hospital_Admissions_and_Deaths_for_Indiana",
               "https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Historical_Weekly_Positivity_Rates_and_Daily_Cases_per_100,000_Indiana_Residents",
               "https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Historical_Daily_Values_of_Delphi_Research_Groups_Combined_Indicator_for_Indiana",
               "https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Historical_Weekly_COVID-19_Statistics_and_Counts_for_Illinois_Counties",
               "https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Historical_Daily_COVID-19_Test_Results_for_Indiana_Counties",
               "https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Historical_Daily_COVID-19_Test_Results_for_Michigan_Counties",
               "https://raw.githack.com/ercbk/Indiana-COVID-19-Tracker/master/data-dictionary.html#Historical_Daily_COVID-19_Test_Results_for_Wisconsin_Counties")
) %>% 
  mutate(chart_html = purrr::map2(chart_url, chart_name, ~htmltools::a(href = .x, .y)),
         chart_link = purrr::map(chart_html, ~gt::html(as.character(.x))),
         dict_html = purrr::map(data_url, ~htmltools::a(href = .x, "link")),
         dict_link = purrr::map(dict_html, ~gt::html(as.character(.x)))) %>% 
  select(file_name, table_name, chart_link, dict_link) %>% 
  gt() %>% 
  cols_label(file_name = "File Name",
             table_name = "Table",
             chart_link = "Chart",
             dict_link = "Data Dictionary") %>% 
  # doesn't work for github_document
  cols_width(vars(file_name) ~ px(200)) %>%
  cols_align("left") %>% 
  tab_options(table.align = "left") %>% 
  as_raw_html()

data_dict_tbl

```



About

Collects and processes data and creates static charts for the Indiana-COVID-19-Website.

https://ercbk.github.io/Indiana-COVID-19-Website/


Languages

Language:HTML 87.5%Language:R 12.5%