Skip to content

Commit

Permalink
Merge pull request #19 from ssi-dk:telkamp7/issue18
Browse files Browse the repository at this point in the history
Telkamp7/issue18
  • Loading branch information
telkamp7 committed Nov 3, 2023
2 parents ae18a07 + f5ad48f commit 1d40228
Show file tree
Hide file tree
Showing 23 changed files with 83 additions and 477 deletions.
10 changes: 6 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
Package: aedseo
Title: Automated and Early Detection of Seasonal Epidemic Onset
Version: 0.0.0.9000
Authors@R:
Authors@R: c(
person("Kasper", "Schou Telkamp", ,"ksst@ssi.dk", role = c("aut", "cre"),
comment = c(ORCID = "0009-0001-5126-0190"))
comment = c(ORCID = "0009-0001-5126-0190")),
person("Statens Serum Institut, SSI", role = c("cph", "fnd"))
)
Description: A powerful tool for automating the early detection of seasonal epidemic onsets in time series data. It offers the ability to estimate growth rates for consecutive time intervals and calculate the Sum of Cases (SoC) within those intervals. It is particularly useful for epidemiologists, public health professionals, and researchers seeking to identify and respond to seasonal epidemics in a timely fashion.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
URL: https://github.com/telkamp7/aedseo, https://telkamp7.github.io/aedseo/
BugReports: https://github.com/telkamp7/aedseo/issues
URL: https://github.com/ssi-dk/aedseo, https://ssi-dk.github.io/aedseo/
BugReports: https://github.com/ssi-dk/aedseo/issues
Suggests:
ISOweek,
kableExtra,
Expand Down
19 changes: 18 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# aedseo (development version)

* Initial CRAN submission.
# aedseo 0.1

## Features

- Added the `aedseo` function, which automates the early detection of seasonal epidemic onsets by estimating growth rates for consecutive time intervals and calculating the Sum of Cases (sum_of_cases).

- Introduced `autoplot` and `plot` methods for visualizing `aedseo` and `aedseo_tsd` objects. These functions allow you to create insightful ggplot2 plots for your data.

- Included the `fit_growth_rate` function, enabling users to fit growth rate models to time series observations.

- Introduced the `predict` method for `aedseo` objects, which allows you to predict observations for future time steps given
the growth rates.

- Added the `summary` method for `aedseo` objects, providing a comprehensive summary of the results.

- Introduced the `tsd` function, allowing users to create S3 `aedseo_tsd` (time-series data) objects from observed data and corresponding dates.

Please note that this is the initial CRAN release of the aedseo package, and we look forward to adding more features and improvements in future updates. We appreciate your feedback and contributions to make this package even more useful for early detection of seasonal epidemics.
4 changes: 2 additions & 2 deletions R/aedseo.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Automated and Early Detection of Seasonal Epidemic Onset
#'
#' @description
#' `r lifecycle::badge("experimental")`
#' `r lifecycle::badge("stable")`
#'
#' This function performs automated and early detection of seasonal epidemic
#' onsets (aedseo) on a time series dataset. It estimates growth rates for
Expand All @@ -17,7 +17,7 @@
#' @param family A character string specifying the family for modeling.
#' Choose between "poisson," or "quasipoisson".
#'
#' @return A tibble containing:
#' @return A `aedseo` object containing:
#' - 'reference_time': The time point for which the growth rate is estimated.
#' - 'observed': The observed value in the reference time point.
#' - 'growth_rate': The estimated growth rate.
Expand Down
2 changes: 1 addition & 1 deletion R/autoplot.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Create a complete ggplot appropriate to a particular data type
#'
#' @description
#' `r lifecycle::badge("experimental")`
#' `r lifecycle::badge("stable")`
#'
#' This function generates a complete ggplot object suitable for
#' visualizing time series data in an `aedseo_tsd` object. It creates a line
Expand Down
2 changes: 1 addition & 1 deletion R/fit_growth_rate.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Fit a growth rate model to time series observations.
#'
#' @description
#' `r lifecycle::badge("experimental")`
#' `r lifecycle::badge("stable")`
#'
#' This function fits a growth rate model to time series observations and
#' provides parameter estimates along with confidence intervals.
Expand Down
2 changes: 1 addition & 1 deletion R/plot.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Create a complete ggplot appropriate to a particular data type
#'
#' @description
#' `r lifecycle::badge("experimental")`
#' `r lifecycle::badge("stable")`
#'
#' This function generates a complete ggplot object suitable for
#' visualizing time series data in an `aedseo_tsd` object. It creates a line
Expand Down
2 changes: 1 addition & 1 deletion R/predict.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Predict Growth Rates for Future Time Steps
#'
#' @description
#' `r lifecycle::badge("experimental")`
#' `r lifecycle::badge("stable")`
#'
#' This function is used to predict future growth rates based on a model object
#' created using the AEDSEO package. It takes the model object and the number
Expand Down
2 changes: 1 addition & 1 deletion R/summary.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Summary method for aedseo objects
#'
#' @description
#' `r lifecycle::badge("experimental")`
#' `r lifecycle::badge("stable")`
#'
#' Summarize the results of an aedseo analysis, including the latest growth rate
#' estimate, the confidence interval, and information about growth warnings.
Expand Down
7 changes: 4 additions & 3 deletions R/tsd.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#' and corresponding dates.
#'
#' @description
#' `r lifecycle::badge("experimental")`
#' `r lifecycle::badge("stable")`
#'
#' This function takes observed data and the corresponding date vector and
#' converts it into a `aedseo_tsd` object, which is a time series
Expand All @@ -13,8 +13,9 @@
#' @param time_interval A character vector specifying the time interval.
#' Choose between "day," "week," or "month."
#'
#' @return A `aedseo_tsd` object containing time, the observations,
#' and the periodInYear.
#' @return A `aedseo_tsd` object containing:
#' - 'time': The time point for for where the observations is observed.
#' - 'observed': The observed value at the time point.
#'
#' @export
#'
Expand Down
13 changes: 10 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ knitr::opts_chunk$set(
)
```

# aedseo <a href="https://telkamp7.github.io/aedseo/"><img src="man/figures/logo.png" align="right" height="139" alt="aedseo website" /></a>
# aedseo <a href="https://ssi-dk.github.io/aedseo/"><img src="man/figures/logo.png" align="right" height="139" alt="aedseo website" /></a>


<!-- badges: start -->
[![R-CMD-check](https://github.com/telkamp7/aedseo/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/telkamp7/aedseo/actions/workflows/R-CMD-check.yaml)
[![R-CMD-check](https://github.com/ssi-dk/aedseo/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ssi-dk/aedseo/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/telkamp7/aedseo/branch/master/graph/badge.svg)](https://app.codecov.io/gh/telkamp7/aedseo?branch=master)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
<!-- badges: end -->

## Description
Expand All @@ -28,6 +28,13 @@ The Automated and Early Detection of Seasonal Epidemic Onset (`aedseo`) Package

## Installation

``` r
# Install aedseo from CRAN
install.packages("aedseo")
```

### Development vestion

You can install the development version of `aedseo` from [GitHub](https://github.com/) with:

``` r
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# aedseo <a href="https://telkamp7.github.io/aedseo/"><img src="man/figures/logo.png" align="right" height="139" alt="aedseo website" /></a>
# aedseo <a href="https://ssi-dk.github.io/aedseo/"><img src="man/figures/logo.png" align="right" height="139" alt="aedseo website" /></a>

<!-- badges: start -->

[![R-CMD-check](https://github.com/telkamp7/aedseo/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/telkamp7/aedseo/actions/workflows/R-CMD-check.yaml)
[![R-CMD-check](https://github.com/ssi-dk/aedseo/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ssi-dk/aedseo/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/telkamp7/aedseo/branch/master/graph/badge.svg)](https://app.codecov.io/gh/telkamp7/aedseo?branch=master)
[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
stable](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
<!-- badges: end -->

## Description
Expand All @@ -25,6 +25,13 @@ fashion.

## Installation

``` r
# Install aedseo from CRAN
install.packages("aedseo")
```

### Development vestion

You can install the development version of `aedseo` from
[GitHub](https://github.com/) with:

Expand Down
7 changes: 6 additions & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
url: https://telkamp7.github.io/aedseo/
url: https://ssi-dk.github.io/aedseo/
template:
bootstrap: 5

authors:
Statens Serum Institut, SSI:
href: https://www.ssi.dk/
html: >-
<img src='https://www.ssi.dk/assets/images/ssi-logo-optimeret.svg' alt='Posit' height='16' style="margin-bottom: 3px;" />
13 changes: 9 additions & 4 deletions man/aedseo-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/aedseo.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/autoplot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/fit_growth_rate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/plot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/predict.aedseo.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/summary.aedseo.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions man/tsd.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1d40228

Please sign in to comment.