Skip to content

epiprocess 0.1.0

Compare
Choose a tag to compare
@dshemetov dshemetov released this 15 Nov 22:21

Implemented core functionality, vignettes

  • Classes
    • epi_df: specialized tbl_df for geotemporal epidemiological time
      series data, with optional metadata recording other key columns (e.g.,
      demographic breakdowns) and as_of what time/version this data was
      current/published. Associated functions:
      • as_epi_df converts to an epi_df, guessing the geo_type,
        time_type, other_keys, and as_of if not specified.
      • as_epi_df.tbl_ts and as_tsibble.epi_df automatically set
        other_keys and key&index, respectively.
      • epi_slide applies a user-supplied computation to a sliding/rolling
        time window and user-specified groups, adding the results as new
        columns, and recycling/broadcasting results to keep the result size
        stable. Allows computation to be provided as a function, purrr-style
        formula, or tidyeval dots. Uses slider underneath for efficiency.
      • epi_cor calculates Pearson, Kendall, or Spearman correlations
        between two (optionally time-shifted) variables in an epi_df within
        user-specified groups.
      • Convenience function: is_epi_df.
    • epi_archive: R6 class for version (patch) data for geotemporal
      epidemiological time series data sets. Comes with S3 methods and regular
      functions that wrap around this functionality for those unfamiliar with R6
      methods. Associated functions:
      • as_epi_archive: prepares an epi_archive object from a data frame
        containing snapshots and/or patch data for every available version of
        the data set.
      • as_of: extracts a snapshot of the data set as of some requested
        version, in epi_df format.
      • epix_slide, <epi_archive>$slide: similar to epi_slide, but for
        epi_archives; for each requested ref_time_value and group, applies
        a time window and user-specified computation to a snapshot of the data
        as of ref_time_value.
      • epix_merge, <epi_archive>$merge: like merge for epi_archives,
        but allowing for the last version of each observation to be carried
        forward to fill in gaps in x or y.
      • Convenience function: is_epi_archive.
  • Additional functions
    • growth_rate: estimates growth rate of a time series using one of a few
      built-in methods based on relative change, linear regression,
      smoothing splines, or trend filtering.
    • detect_outlr: applies one or more outlier detection methods to a given
      signal variable, and optionally aggregates the outputs to create a
      consensus result.
    • detect_outlr_rm: outlier detection function based on a
      rolling-median-based outlier detection function; one of the methods
      included in detect_outlr.
    • detect_outlr_stl: outlier detection function based on a seasonal-trend
      decomposition using LOESS (STL); one of the methods included in
      detect_outlr.

New Contributors

Full Changelog: https://github.com/cmu-delphi/epiprocess/commits/v0.1.0