new_from_cum_by_fip: For each subset (place), use cumulative case data to...

View source: R/new_from_cum_by_fip.R

new_from_cum_by_fipR Documentation

For each subset (place), use cumulative case data to calculate new cases per day

Description

Problem if more than one place has NA as FIPS code. covidDownload handled that before calling this. Assumes dates are consecutive (no breaks) but need not be sorted by date beforehand. If there is a gap, the new cases is the change from the prior date, whether that was one day prior or longer. In other words, it is new cases since the last available date for that location.

Usage

new_from_cum_by_fip(cum, fip, date)

Arguments

cum

Cumulative cases as of date

fip

place, such as FIPS code from Census

date

Dates that can be sorted, ideally with no gaps in dates for a given place


ejanalysis/covidcountyshinyapp documentation built on Aug. 31, 2022, 7:46 a.m.