Skip to content

Commit

Permalink
Merge pull request #6 from fhdsl/update-dataset-readme
Browse files Browse the repository at this point in the history
Update information about datasets and data dictionaries
  • Loading branch information
avahoffman authored Jul 8, 2024
2 parents 92145e5 + 2973ba7 commit a88a55d
Show file tree
Hide file tree
Showing 26 changed files with 945 additions and 201 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Authors@R:
c(person(given = "Elizabeth",
family = "Humphries",
role = c("aut", "cre"),
email = "ehumphri@fredhutch.org"),
email = "emarellahumphries@gmail.com"),
person(given = "Ava",
family = "Hoffman",
role = c("aut"),
Expand Down
107 changes: 80 additions & 27 deletions R/CO_heat_ER.R
Original file line number Diff line number Diff line change
@@ -1,55 +1,108 @@
#' Colorado Heat-related Emergency Room Visits (Age Adjusted) Data
#' Age-adjusted heat-related ER visits between 2011 and 2022, as reported by the state of Colorado
#'
#' A dataset used in the DaSEH Short Course. More here..
#' A dataset used in the DaSEH Short Course. This data is gathered by the Colorado Environmental Public Health Tracking program.
#'
#' @source Created using data downloaded from x.
#' @format A data frame with 2340 rows and 7 columns.
#' \describe{
#' \item{county}{CO county which reported the datapoint}
#' \item{rate}{Age-adjusted rate of heat-related ER visits}
#' \item{lower95cl}{Lower 95\% confidence limit for the age-adjusted rate}
#' \item{upper95cl}{Upper 95\% confidence limit for the age-adjusted rate}
#' \item{visits}{Total number of heat-related ER visits}
#' \item{year}{Year between 2011 and 2022}
#' \item{gender}{Gender, with the option of 'female', 'male', and 'both genders'}
#'}
#'
#' @examples
#' data(CO_heat_ER)
#' @seealso \code{\link{dasehr-package}}
#'
#' @source Created using data downloaded from the Colorado Environmental Public Health Tracking program website.
"CO_heat_ER"


#' Colorado Heat-related Emergency Room Visits (Age Adjusted) by Age Data

#' Statewide heat-related ER visits between 2011 and 2022 by age category, as reported by the state of Colorado.
#'
#' A dataset used in the DaSEH Short Course. More here..
#' A dataset used in the DaSEH Short Course. This data is gathered by the Colorado Environmental Public Health Tracking program.
#'
#' @source Created using data downloaded from x.
#' @format A data frame with 216 rows and 7 columns.
#' \describe{
#' \item{YEAR}{Year between 2011 and 2022}
#' \item{GENDER}{Gender, with the option of 'female', 'male', and 'both genders'}
#' \item{AGE}{Age category, with the options of '0-4 years old', '5-14 years old', '15-34 years old', '35-64 years old', '65+ years old', and 'All ages'}
#' \item{RATE}{Rate of heat-related ER visits}
#' \item{L95CL}{Lower 95\% confidence limit of the rate estimate}
#' \item{U95CL}{Upper 95\% confidence limit of the rate estimate}
#' \item{VISITS}{Number of heat-related ER visits}
#'}
#'
#' @examples
#' data(CO_heat_ER_byage)
#' @seealso \code{\link{dasehr-package}}
#'
#' @source Created using data downloaded from the Colorado Environmental Public Health Tracking program website.
"CO_heat_ER_byage"


#' Colorado Heat-related Emergency Room Visits (Age Adjusted) by Gender Data

#' Subset of county-level age-adjusted heat-related ER visits between 2011 and 2022 by age category broken down by gender, as reported by the state of Colorado.
#'
#' A dataset used in the DaSEH Short Course. More here..
#' A dataset used in the DaSEH Short Course. This data is gathered by the Colorado Environmental Public Health Tracking program.
#'
#' @source Created using data downloaded from x.
#' @format A data frame with 240 rows and 7 columns.
#' \describe{
#' \item{county}{CO county which reported the datapoint}
#' \item{rate}{Age-adjusted rate of heat-related ER visits}
#' \item{lower95cl}{Lower 95\% confidence limit for the age-adjusted rate}
#' \item{upper95cl}{Upper 95\% confidence limit for the age-adjusted rate}
#' \item{visits}{Total number of heat-related ER visits}
#' \item{year}{Year between 2011 and 2022}
#' \item{gender}{Gender, with the option of 'female', 'male', and 'both genders'}
#'}
#'
#' @examples
#' data(CO_heat_ER_bygender)
#' @seealso \code{\link{dasehr-package}}
#'
#' @source Created using data downloaded from the Colorado Environmental Public Health Tracking program website.
"CO_heat_ER_bygender"


#' Colorado Heat-related Emergency Room Visits (Age Adjusted) Data.
#' Long-formatted dataset of age-adjusted heat-related ER visits between 2011 and 2022 for Boulder and Denver counties, as reported by the state of Colorado.
#'
#' A dataset used in the DaSEH Short Course. This data is gathered by the Colorado Environmental Public Health Tracking program.
#'
#' A dataset used in the DaSEH Short Course. This data is in long, or "tidy",
#' form. More here..
#' @format A data frame with 24 rows and 3 columns.
#' \describe{
#' \item{county}{CO county, with the option of 'Boulder' or 'Denver'}
#' \item{rate}{Age-adjusted rate of heat-related ER visits}
#' \item{year}{Year between 2011 and 2022}
#'}
#'
#' @source Created using data downloaded from x.
#' @seealso \code{\link{dasehr-package}}
#'
#' @examples
#' data(CO_heat_ER_long)
#' @source Created using data downloaded from the Colorado Environmental Public Health Tracking program website.
"CO_heat_ER_long"


#' Colorado Heat-related Emergency Room Visits (Age Adjusted) Data.
#' Wide-formatted dataset of age-adjusted heat-related ER visits between 2011 and 2022 for Boulder and Denver counties, as reported by the state of Colorado.
#'
#' A dataset used in the DaSEH Short Course. This data is in wide form. More
#' here..
#' A dataset used in the DaSEH Short Course. This data is gathered by the Colorado Environmental Public Health Tracking program.
#'
#' @source Created using data downloaded from x.
#' @format A data frame with 2 rows and 13 columns.
#' \describe{
#' \item{county}{CO county, with the option of 'Boulder' or 'Denver'}
#' \item{2011}{Age-adjusted rate for 2011}
#' \item{2012}{Age-adjusted rate for 2012}
#' \item{2013}{Age-adjusted rate for 2013}
#' \item{2014}{Age-adjusted rate for 2014}
#' \item{2015}{Age-adjusted rate for 2015}
#' \item{2016}{Age-adjusted rate for 2016}
#' \item{2017}{Age-adjusted rate for 2017}
#' \item{2018}{Age-adjusted rate for 2018}
#' \item{2019}{Age-adjusted rate for 2019}
#' \item{2020}{Age-adjusted rate for 2020}
#' \item{2021}{Age-adjusted rate for 2021}
#' \item{2022}{Age-adjusted rate for 2022}
#'}
#'
#' @examples
#' data(CO_heat_ER_wide)
#' @seealso \code{\link{dasehr-package}}
#'
#' @source Created using data downloaded from the Colorado Environmental Public Health Tracking program website.
"CO_heat_ER_wide"

5 changes: 2 additions & 3 deletions R/calenviroscreen.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@
#' \item{HousingBurdenPctl}{Housing burden percentile}
#'}
#'
#' @source Created by Elizabeth Humphries using data downloaded from the CalEnviroScreen website
#' @seealso \code{\link{dasehr-package}}
#'
#' @examples
#' data(calenviroscreen)
#' @source Created by Elizabeth Humphries using data downloaded from the CalEnviroScreen website.
"calenviroscreen"
28 changes: 14 additions & 14 deletions R/covid_wastewater.R
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#' SARS-CoV-2 Wastewater Data
#'
#' A dataset used in the DaSEH Short Course. More here..
#' A dataset used in the DaSEH Short Course. Data collected by the National Wastewater Surveillance System.
#'
#' @format A data frame with x rows and x columns.
#' \describe{
#' \item{reporting_jurisdiction}{}
#' \item{sample_location}{}
#' \item{key_plot_id}{}
#' \item{county_names}{}
#' \item{population_served}{}
#' \item{date_start}{}
#' \item{date_end}{}
#' \item{rna_pct_change_15d}{}
#' \item{pos_PCR_prop_15d}{}
#' \item{percentile}{}
#' \item{sampling_prior}{}
#' \item{first_sample_date}{}
#' \item{reporting_jurisdiction}{The CDC Epidemiology and Laboratory Capacity (ELC) jurisdiction, most frequently a state, reporting these data (2-letter abbreviation)}
#' \item{sample_location}{Sample collection location in the wastewater system, whether at a wastewater treatment plant (or other community level treatment infrastructure such as community-scale septic) or upstream in the wastewater system.}
#' \item{key_plot_id}{A unique identifier for the geographic area served by this sampling site, called a sewershed. This is an underscore-separated concatenation of the fields 'wwtp_jurisdiction', 'wwtp_id', and, if 'sample_location' is "upstream", then also 'sample_location_specify', and sample_matrix.}
#' \item{county_names}{The county and county-equivalent names}
#' \item{population_served}{Estimated number of persons served by this sampling site (i.e., served by this wastewater treatment plant or, if 'sample_location' is "upstream", then by this upstream location).}
#' \item{date_start}{The start date of the interval over which the metric is calculated. Intervals are inclusive of start and end dates.}
#' \item{date_end}{The end date of the interval over which metric is calculated. Intervals are inclusive of start and end dates.}
#' \item{rna_pct_change_15d}{The percent change in SARS-CoV-2 RNA levels over the 15-day interval defined by 'date_start' and 'date_end'. Percent change is calculated as the modeled change over the interval, based on linear regression of log-transformed SARS-CoV-2 levels. SARS-CoV-2 RNA levels are wastewater concentrations that have been normalized for wastewater composition.}
#' \item{pos_PCR_prop_15d}{Proportion of positive PCR tests over the 15 day period.}
#' \item{percentile}{This metric shows whether SARS-CoV-2 virus levels at a site are currently higher or lower than past historical levels at the same site. 0\% means levels are the lowest they have been at the site; 100\% means levels are the highest they have been at the site. Public health officials watch for increasing levels of the virus in wastewater over time and use this data to help make public health decisions.}
#' \item{sampling_prior}{Indicates whether the site was collecting wastewater samples before or on December 1, 2021}
#' \item{first_sample_date}{The first date samples were collected at a site.}
#'}
#'
#' @source Created using data downloaded from x.
#' @source Created using data downloaded from \url{https://data.cdc.gov/Public-Health-Surveillance/NWSS-Public-SARS-CoV-2-Wastewater-Metric-Data/2ew6-ywp6/about_data}.
#'
#' @examples
#' data(covid_wastewater)
Expand Down
39 changes: 25 additions & 14 deletions R/dasehr-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,42 @@
#'
#' @details
#'
#' Here is a list of the datasets. They are already stored as objects when you
#' load the package.
#'Here is a list of the datasets. They are already stored as objects when you
#'load the package.
#'
#' * `calenviroscreen`: Description here
#' * `calenviroscreen`: CalEnviroScreen4.0 data. This dataset was gathered by the California Office of Environmental Health Hazard Assessment. CalEnviroScreen ranks census tracts in California based on potential exposures to pollutants, adverse environmental conditions, socioeconomic factors and the prevalence of certain health conditions. Read more at \url{https://calenviroscreen-oehha.hub.arcgis.com/}.
#'
#' * `CO_heat_ER_byage`: Description here
#' * `CO_heat_ER_byage`: Age-group breakdown of heat-related ER visits between 2011 and 2022, as reported by the state of Colorado. This data is gathered by the Colorado Environmental Public Health Tracking program. Read more at \url{https://coepht.colorado.gov/heat-related-illness}
#'
#' * `CO_heat_ER_bygender`: Description here
#' * `CO_heat_ER_bygender`: Gender and county-level breakdown of age-adjusted heat-related ER visits between 2011 and 2022, as reported by the state of Colorado. This data is gathered by the Colorado Environmental Public Health Tracking program. Read more at \url{https://coepht.colorado.gov/heat-related-illness}.
#'
#' * `CO_heat_ER_wide`: Description here
#' * `CO_heat_ER_wide`: Boulder and Denver counties' age-adjusted heat-related ER visits between 2011 and 2022, as reported by the state of Colorado. This data is gathered by the Colorado Environmental Public Health Tracking program. Read more at \url{https://coepht.colorado.gov/heat-related-illness}.
#'
#' * `CO_heat_ER`: Description here
#' * `CO_heat_ER`: Age-adjusted heat-related ER visits between 2011 and 2022, as reported by the state of Colorado. This data is gathered by the Colorado Environmental Public Health Tracking program. Read more at \url{https://coepht.colorado.gov/heat-related-illness}.
#'
#' * `covid_wastewater`: Description here
#' * `covid_wastewater`: SARS-CoV-2 levels in wastewater June 2020 - May 2024, as tracked by the National Wastewater Surveillance System. Read more at \url{https://data.cdc.gov/Public-Health-Surveillance/NWSS-Public-SARS-CoV-2-Wastewater-Metric-Data/2ew6-ywp6/about_data}.
#'
#' * `er_CO_statewide`: Description here
#' * `er_CO_statewide`: Age-adjusted statewide heat-related ER visits between 2011 and 2022, as reported by the state of Colorado. This data is gathered by the Colorado Environmental Public Health Tracking program. Read more at \url{https://coepht.colorado.gov/heat-related-illness}.
#'
#' * `er_visits_by_CO_county`: Description here
#' * `er_CO_county`: Age-adjusted county-level heat-related ER visits between 2011 and 2022, as reported by the state of Colorado. This data is gathered by the Colorado Environmental Public Health Tracking program. Read more at \url{https://coepht.colorado.gov/heat-related-illness}.
#'
#' * `haa5`: Description here
#' * `haa5`: Haloacetic acid exposure for populations on public water systems in the state of Washington for 1999-2020. This dataset was collected by the Washington Tracking Network. Read more at \url{https://doh.wa.gov/data-and-statistical-reports/washington-tracking-network-wtn/drinking-water}.
#'
#' * `nitrate`: Description here
#' * `nitrate`: Nitrate exposure for populations on public water systems in the state of Washington for 1999-2020, divided by quarter. This dataset was collected by the Washington Tracking Network. Read more at \url{https://doh.wa.gov/data-and-statistical-reports/washington-tracking-network-wtn/drinking-water}.
#'
#' * `yearly_co2_emissions`: Description here
#' * `yearly_co2_emissions`: Estimated yearly CO2 emissions by country, 1751-2014. Data borrowed from the Open Case Studies project \url{https://www.opencasestudies.org/ocs-bp-co2-emissions/}. Data originally gathered by the Carbon Dioxide Information Analysis Center (CDIAC). Read more at \url{https://data.ess-dive.lbl.gov/portals/CDIAC}.
#'
#' @seealso \code{\link{calenviroscreen}}
#' @seealso \code{\link{CO_heat_ER_byage}}
#' @seealso \code{\link{CO_heat_ER_bygender}}
#' @seealso \code{\link{CO_heat_ER_wide}}
#' @seealso \code{\link{CO_heat_ER}}
#' @seealso \code{\link{covid_wastewater}}
#' @seealso \code{\link{er_CO_statewide}}
#' @seealso \code{\link{er_CO_county}}
#' @seealso \code{\link{haa5}}
#' @seealso \code{\link{nitrate}}
#' @seealso \code{\link{yearly_co2_emissions}}
#'

#' @keywords internal
"_PACKAGE"
39 changes: 28 additions & 11 deletions R/er_CO.R
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
#' Colorado Statewide Heat-related Emergency Room Visits (Age Adjusted) Data.
#' Statewide age-adjusted heat-related ER visits between 2011 and 2022, as reported by the state of Colorado. No breakdown by county, gender, or age category.
#'
#' A dataset used in the DaSEH Short Course. Data is in "long" form. More here..
#' A dataset used in the DaSEH Short Course. This data is gathered by the Colorado Environmental Public Health Tracking program.
#'
#' @source Created using data downloaded from x.
#' @format A data frame with 12 rows and 5 columns.
#' \describe{
#' \item{rate}{Age-adjusted rate of heat-related ER visits}
#' \item{lower95cl}{Lower 95\% confidence limit for the age-adjusted rate}
#' \item{upper95cl}{Upper 95\% confidence limit for the age-adjusted rate}
#' \item{visits}{Total number of heat-related ER visits}
#' \item{year}{Year between 2011 and 2022}
#'}
#'
#' @examples
#' data(er_CO_statewide)
#' @seealso \code{\link{dasehr-package}}
#'
#' @source Created using data downloaded from the Colorado Environmental Public Health Tracking program website
"er_CO_statewide"


#' Colorado Heat-related Emergency Room Visits (Age Adjusted) Data
#' County-level age-adjusted heat-related ER visits between 2011 and 2022, as reported by the state of Colorado. Contains a subset of Colorado counties.
#'
#' A dataset used in the DaSEH Short Course. This data is gathered by the Colorado Environmental Public Health Tracking program.
#'
#' A dataset used in the DaSEH Short Course. Data is in "long" form. More here..
#' @format A data frame with 205 rows and 6 columns.
#' \describe{
#' \item{county}{Colorado county reporting the data}
#' \item{rate}{Age-adjusted rate of heat-related ER visits}
#' \item{lower95cl}{Lower 95\% confidence limit for the age-adjusted rate}
#' \item{upper95cl}{Upper 95\% confidence limit for the age-adjusted rate}
#' \item{visits}{Total number of heat-related ER visits}
#' \item{year}{Year between 2011 and 2022}
#'}
#'
#' @source Created using data downloaded from x.
#' @seealso \code{\link{dasehr-package}}
#'
#' @examples
#' data(er_visits_by_CO_county)
"er_visits_by_CO_county"
#' @source Created using data downloaded from the Colorado Environmental Public Health Tracking program website
"er_CO_county"
24 changes: 19 additions & 5 deletions R/haa5.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
#' HAA5 Exposure for Washington State Public Water Systems Data
#' Haloacetic acid (HAA5) exposure for populations on public water systems in the state of Washington for 1999-2020.
#'
#' A dataset used in the DaSEH Short Course. More here..
#' A dataset used in the DaSEH Short Course. Data collected by the Washington Tracking Network.
#'
#' @source Created using data downloaded from x.
#' @format A data frame with 33 rows and 11 columns.
#' \describe{
#' \item{year}{Year}
#' \item{pop_on_sampled_PWS}{Total population served by all sampled public water systems}
#' \item{pop_0-15µg/L}{Population served by public water system with 0 - 15 ug/L HAA5}
#' \item{pop_>15-30µg/L}{Population served by public water system with 15 - 30 ug/L HAA5}
#' \item{pop_>30-45µg/L}{Population served by public water system with 30 - 45 ug/L HAA5}
#' \item{pop_>45-60µg/L}{Population served by public water system with 45 - 60 ug/L HAA5}
#' \item{pop_>60-75µg/L}{Population served by public water system with 60 - 75 ug/L HAA5}
#' \item{pop_>75µg/L}{Population served by public water system more than 75 ug/L HAA5}
#' \item{pop_on_PWS_with_non-detects}{Population served by public water system with no detectable HAA5}
#' \item{pop_exposed_to_exceedances}{Population exposed to HAA5 that exceeds recommended limit}
#' \item{perc_pop_exposed_to_exceedances}{Percentage of the total population exposed to HAA5 that exceeds recommended limits}
#'}
#'
#' @examples
#' data(haa5)
#' @seealso \code{\link{dasehr-package}}
#'
#' @source Created using data downloaded from \url{https://doh.wa.gov/data-and-statistical-reports/washington-tracking-network-wtn/drinking-water}.
"haa5"
Loading

0 comments on commit a88a55d

Please sign in to comment.