+
+```json
+{
+ "result": 1,
+ "epidata": [
+ {
+ "location": "nat",
+ "epiweek": 201501,
+ "num1": 91858,
+ "num2": 81121,
+ "num3": 89511,
+ "num4": 52278,
+ "num5": 16219,
+ "num6": 87327,
+ "num7": 38310,
+ "num8": 51461,
+ "total": 4252190,
+ "value": null
+ }
+ ],
+ "message": "success"
+}
+```
# Code Samples
-
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch CDC data for national level for epiweek `201501`.
+
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pvt_cdc(auth='auth_token', locations=['nat'], epiweeks=[201501])
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pvt_cdc(auth = 'auth_token', locations = 'nat', epiweeks = 201501)
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
+
+Optionally install the package using pip(env):
+```bash
+pip install delphi-epidata
+```
+
+Otherwise, place `delphi_epidata.py` from this repo next to your python script.
+
+```python
+# Import
+from delphi_epidata import Epidata
+# Fetch data
+res = Epidata.cdc('auth_token', [201501], ['nat'])
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
+# Fetch data
+res <- Epidata$cdc(auth = "auth_token", epiweeks = list(201501), locations = list("nat"))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/client_libraries.md b/docs/api/client_libraries.md
index ef825a156..b7d941206 100644
--- a/docs/api/client_libraries.md
+++ b/docs/api/client_libraries.md
@@ -1,52 +1,113 @@
---
title: API Clients
-parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 1
+nav_order: 3
---
-# Epidata API Clients
+# Getting Started with R and Python
+{: .no_toc}
-To access Delphi Epidata programmatically, we recommend our client libraries:
+The [`epidatr`](https://cmu-delphi.github.io/epidatr/) (R) [`epidatpy`](https://cmu-delphi.github.io/epidatpy/) (Python) packages provide access to all the endpoints of the Delphi Epidata API, and can be used to make requests for specific signals on specific dates and in select geographic regions.
-- R: [epidatr](https://cmu-delphi.github.io/epidatr/),
-- Python: [epidatpy](https://cmu-delphi.github.io/epidatpy/) (recommended) and [delphi-epidata](https://pypi.org/project/delphi-epidata/),
-- Javascript: [delphi-epidata](https://github.com/cmu-delphi/delphi-epidata/blob/master/src/client/delphi_epidata.js).
+## Table of Contents
+{: .no_toc .text-delta}
-For anyone looking for COVIDCast data, please visit our [COVIDCast API Client Libraries](covidcast_clients.md).
+1. TOC
+{:toc}
-The following samples show how to import the library and fetch Delphi's
-COVID-19 Surveillance Streams from Facebook Survey CLI for county 06001 and days
-`20200401` and `20200405-20200414` (11 days total).
+## Setup
-### R
+### Installation
-Install [`epidatr` from CRAN](https://cran.r-project.org/package=epidatr)
-with `install.packages("epidatr")`.
+You can install these packages like this:
+
+
+
+
+
+
+You can install the stable version of `epidatr` from CRAN:
```r
-# Configure API key interactively, if needed. See
-# https://cmu-delphi.github.io/epidatr/articles/epidatr.html#api-keys for details.
-#save_api_key()
-library(epidatr)
-data <- pub_covidcast('fb-survey', 'smoothed_cli', 'county', 'day', geo_values = '06001',
- time_values = c(20200401, 20200405:20200414))
-cat(data)
+install.packages("epidatr")
+# Or use pak/renv
+pak::pkg_install("epidatr")
```
+If you want the development version, install from GitHub:
-### Python
+```r
+remotes::install_github("cmu-delphi/epidatr", ref = "dev")
+```
+
+
+
The `epidatpy` package will soon be [available on PyPI as `epidatpy`](https://pypi.org/project/epidatpy/).
Meanwhile, it can be [installed from GitHub](https://github.com/cmu-delphi/epidatpy/) with
-`pip install "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"`.
+
+```Python
+pip install "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+
+
+
+### API Keys
+
+The Delphi API requires a (free) API key for full functionality. While most endpoints are available without one, there are [limits on API usage for anonymous users](/api_keys.md), including a rate limit.
+
+To generate your key, [register for a pseudo-anonymous account](https://api.delphi.cmu.edu/epidata/admin/registration_form).
+
+ * **R:** See the `save_api_key()` function documentation for details on how to set up `epidatr` to use your API key.
+ * **Python:** The `epidatpy` client will automatically look for this key in the environment variable `DELPHI_EPIDATA_KEY`. We recommend storing your key in a `.env` file, using `python-dotenv` to load it into your environment, and adding `.env` to your `.gitignore` file.
+
+> **Note:** Private endpoints (i.e. those prefixed with `pvt_`) require a separate key that needs to be passed as an argument. These endpoints require specific data use agreements to access.
+{: .note }
+
+## Basic Usage
+
+Fetching data from the Delphi Epidata API is simple. Suppose we are interested in the [`covidcast` endpoint](/covidcast.md), which provides access to a [wide range of data](/covidcast_signals.md) on COVID-19. Reviewing the endpoint documentation, we see that we [need to specify](/covidcast_api_queries.md) a data source name, a signal name, a geographic level, a time resolution, and the location and times of interest.
+
+The `pub_covidcast()` function lets us access the `covidcast` endpoint:
+
+
+
+
+
+
+```r
+library(epidatr)
+library(dplyr)
+
+# Obtain the most up-to-date version of the smoothed covid-like illness (CLI)
+# signal from the COVID-19 Trends and Impact survey for the US
+epidata <- pub_covidcast(
+ source = "fb-survey",
+ signals = "smoothed_cli",
+ geo_type = "nation",
+ time_type = "day",
+ geo_values = "us",
+ time_values = epirange(20210105, 20210410)
+)
+head(epidata)
+```
+
+
+
```python
-# Configure API key, if needed.
-# https://github.com/cmu-delphi/epidatpy/blob/dev/docs/index.rst#api-keys
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
-from epidatpy import EpiDataContext, EpiRange
+# Initialize client (caching enabled for 7 days)
+epidata = EpiDataContext(use_cache=True, cache_max_age_days=7)
-# Create the client object.
-epidata = EpiDataContext()
+# Obtain the most up-to-date version of the confirmed cumulative cases
+# from JHU CSSE for the US
apicall = epidata.pub_covidcast(
data_source="jhu-csse",
signals="confirmed_cumulative_num",
@@ -55,9 +116,352 @@ apicall = epidata.pub_covidcast(
geo_values="us",
time_values=EpiRange(20210405, 20210410),
)
-print(apicall.df())
+print(apicall.df().head())
```
+
+
+
+`pub_covidcast()` returns a `tibble` in R and an `EpiDataCall` (convertible to a pandas DataFrame via `.df()`) in Python. Each row represents one observation in the specified location on one day. The location abbreviation is given in the `geo_value` column, the date in the `time_value` column. Here `value` is the requested signal—in this case, the smoothed estimate of the percentage of people with COVID-like illness or case counts—and `stderr` is its standard error.
+
+The Epidata API makes signals available at different geographic levels, depending on the endpoint. To request signals for all states instead of the entire US, we use the `geo_type` argument paired with `*` for the `geo_values` argument. (Only some endpoints allow for the use of `*` to access data at all locations. Check the help for a given endpoint to see if it supports `*`.)
+
+
+
+
+
+
+```r
+# Obtain data for all states
+pub_covidcast(
+ source = "fb-survey",
+ signals = "smoothed_cli",
+ geo_type = "state",
+ time_type = "day",
+ geo_values = "*",
+ time_values = epirange(20210105, 20210410)
+)
+```
+
+
+
+
+```python
+# Obtain data for all states
+epidata.pub_covidcast(
+ data_source="fb-survey",
+ signals="smoothed_cli",
+ geo_type="state",
+ time_type="day",
+ geo_values="*",
+ time_values=EpiRange(20210405, 20210410),
+).df()
+```
+
+
+
+
+Alternatively, we can fetch the full time series for a subset of states by listing out the desired locations in the `geo_value` argument and using `*` in the `time_values` argument:
+
+
+
+
+
+
+```r
+# Obtain data for PA, CA, and FL
+pub_covidcast(
+ source = "fb-survey",
+ signals = "smoothed_cli",
+ geo_type = "state",
+ time_type = "day",
+ geo_values = c("pa", "ca", "fl"),
+ time_values = "*"
+)
+```
+
+
+
+
+```python
+# Obtain data for PA, CA, and FL
+epidata.pub_covidcast(
+ data_source="fb-survey",
+ signals="smoothed_cli",
+ geo_type="state",
+ time_type="day",
+ geo_values="pa,ca,fl",
+ time_values="*",
+).df()
+```
+
+
+
+
+## Getting versioned data
+
+The Epidata API stores a historical record of all data, including corrections and updates, which is particularly useful for accurately backtesting forecasting models. To retrieve versioned data, we can use the `as_of` argument, which fetches the data as it was known on a specific date.
+
+
+
+
+
+
+```r
+# Obtain the signal as it was on 2021-06-01
+pub_covidcast(
+ source = "fb-survey",
+ signals = "smoothed_cli",
+ geo_type = "state",
+ time_type = "day",
+ geo_values = "pa",
+ time_values = epirange(20210105, 20210410),
+ as_of = "2021-06-01"
+)
+```
+
+
+
+
+```python
+# Obtain the signal as it was on 2021-06-01
+epidata.pub_covidcast(
+ data_source="fb-survey",
+ signals="smoothed_cli",
+ geo_type="state",
+ time_type="day",
+ geo_values="pa",
+ time_values=EpiRange(20210405, 20210410),
+ as_of="2021-06-01",
+).df()
+```
+
+
+
+
+We can also request all versions of the data issued within a specific time period using the `issues` argument.
+
+
+
+
+
+
+```r
+# See how the estimate for a SINGLE day (March 1, 2021) evolved
+# by fetching all issues reported between March and April 2021.
+pub_covidcast(
+ source = "fb-survey",
+ signals = "smoothed_cli",
+ geo_type = "state",
+ time_type = "day",
+ geo_values = "pa",
+ time_values = "2021-03-01",
+ issues = epirange("2021-03-01", "2021-04-30")
+)
+```
+
+
+
+
+```python
+# See how the estimate for a SINGLE day (March 1, 2021) evolved
+# by fetching all issues reported between March and April 2021.
+epidata.pub_covidcast(
+ data_source="fb-survey",
+ signals="smoothed_cli",
+ geo_type="state",
+ time_type="day",
+ geo_values="pa",
+ time_values="2021-03-01",
+ issues=EpiRange("2021-03-01", "2021-04-30"),
+).df()
+```
+
+
+
+
+Finally, we can use the `lag` argument to request only data that was reported a certain number of days after the event.
+
+
+
+
+
+
+```r
+# Fetch survey data for January 2021, but ONLY include data
+# that was issued exactly 2 days after it was collected.
+pub_covidcast(
+ source = "fb-survey",
+ signals = "smoothed_cli",
+ geo_type = "state",
+ time_type = "day",
+ geo_values = "pa",
+ time_values = epirange(20210101, 20210131),
+ lag = 2
+)
+```
+
+
+
+
+```python
+# Fetch survey data for January 2021, but ONLY include data
+# that was issued exactly 2 days after it was collected.
+epidata.pub_covidcast(
+ data_source="fb-survey",
+ signals="smoothed_cli",
+ geo_type="state",
+ time_type="day",
+ geo_values="pa",
+ time_values=EpiRange(20210101, 20210131),
+ lag=2,
+).df()
+```
+
+
+
+
+See `vignette("versioned-data")` for details and more ways to specify versioned data.
+
+## Plotting
+
+Because the output data is in a standard `tibble` (R) or `DataFrame` (Python) format, we can easily plot it using standard libraries like `ggplot2` or `matplotlib`.
+
+
+
+
+
+
+```r
+library(ggplot2)
+ggplot(epidata, aes(x = time_value, y = value)) +
+ geom_line() +
+ labs(
+ title = "Smoothed CLI from Facebook Survey",
+ subtitle = "PA, 2021",
+ x = "Date",
+ y = "CLI"
+ )
+```
+
+
+
+
+```python
+import matplotlib.pyplot as plt
+
+# Fetch data for PA, CA, FL
+apicall = epidata.pub_covidcast(
+ data_source="fb-survey",
+ signals="smoothed_cli",
+ geo_type="state",
+ geo_values="pa,ca,fl",
+ time_type="day",
+ time_values=EpiRange(20210405, 20210410),
+)
+
+# Plot
+fig, ax = plt.subplots(figsize=(6, 5))
+(
+ apicall.df()
+ .pivot_table(values="value", index="time_value", columns="geo_value")
+ .plot(xlabel="Date", ylabel="CLI", ax=ax, linewidth=1.5)
+)
+plt.title("Smoothed CLI from Facebook Survey")
+plt.show()
+```
+
+
+
+
+## Finding locations of interest
+
+Most data is only available for the US. Select endpoints report other countries at the national and/or regional levels. Endpoint descriptions explicitly state when they cover non-US locations.
+
+For endpoints that report US data, consult the geographic coding documentation for [COVID-19](/covidcast_geography.md) and for [other diseases](/geographic_codes.md) to see available geographic levels.
+
+### International data
+
+International data is available via
+
+ * `pub_dengue_nowcast` (North and South America)
+ * `pub_ecdc_ili` (Europe)
+ * `pub_kcdc_ili` (Korea)
+ * `pub_nidss_dengue` (Taiwan)
+ * `pub_nidss_flu` (Taiwan)
+ * `pub_paho_dengue` (North and South America)
+ * `pvt_dengue_sensors` (North and South America)
+
+## Finding data sources and signals of interest
+
+Above we used data from [Delphi’s symptom surveys](https://delphi.cmu.edu/covid19/ctis/), but the Epidata API includes numerous data streams: medical claims data, cases and deaths, mobility, and many others. This can make it a challenge to find the data stream that you are most interested in.
+
+The Epidata documentation lists all the data sources and signals available through the API for [COVID-19](/covidcast_signals.md) and for [other diseases](README.md#source-specific-parameters).
+
+You can also use the client libraries to discover endpoints interactively:
+
+
+
+
+
+
+```r
+# Get a table of endpoint functions
+avail_endpoints()
+```
+
+
+
+
+```python
+# List sources available in the pub_covidcast endpoint
+covidcast = CovidcastEpidata(use_cache=True)
+print(covidcast.source_names())
+
+# List signals available for a specific source (e.g., jhu-csse)
+print(covidcast.signal_names("jhu-csse"))
+```
+
+
+
+
+## Legacy Clients
+
+Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js),
+but its use is discouraged.
+
+The following samples show how to import the library and fetch Delphi’s COVID-19 Surveillance Streams from Facebook Survey CLI for county `06001` and days `20200401` and `20200405-20200414` (11 days total).
+
+
+
+
+
+
Install [`delphi-epidata` from PyPI](https://pypi.org/project/delphi-epidata/) with
`pip install delphi-epidata`.
@@ -68,8 +472,21 @@ from delphi_epidata import Epidata
res = Epidata.covidcast('fb-survey', 'smoothed_cli', 'day', 'county', [20200401, Epidata.range(20200405, 20200414)], '06001')
print(res['result'], res['message'], len(res['epidata']))
```
+
-### JavaScript (in a web browser)
+
+
+
+```R
+# Configure API key, if needed.
+#option('epidata.auth', )
+source('delphi_epidata.R')
+res <- Epidata$covidcast('fb-survey', 'smoothed_cli', 'day', 'county', list(20200401, Epidata$range(20200405, 20200414)), '06001')
+cat(paste(res$result, res$message, length(res$epidata), "\n"))
+```
+
+
+
The minimalist JavaScript client does not currently support API keys.
If you need API key support in JavaScript, contact delphi-support+privacy@andrew.cmu.edu.
@@ -77,33 +494,23 @@ If you need API key support in JavaScript, contact delphi-support+privacy@andrew
```html
-```
-
-### R (legacy)
+```
+
-The old Delphi Epidata R client is available
-[here](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R),
-but its use is discouraged.
+
-```R
-# Configure API key, if needed.
-#option('epidata.auth', )
-source('delphi_epidata.R')
-res <- Epidata$covidcast('fb-survey', 'smoothed_cli', 'day', 'county', list(20200401, Epidata$range(20200405, 20200414)), '06001')
-cat(paste(res$result, res$message, length(res$epidata), "\n"))
-```
diff --git a/docs/api/covid_hosp.md b/docs/api/covid_hosp.md
index 372402e5b..107b044cb 100644
--- a/docs/api/covid_hosp.md
+++ b/docs/api/covid_hosp.md
@@ -1,17 +1,27 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive COVID-19 Reported Patient Impact and Hospital Capacity by State Timeseries
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# COVID-19 Hospitalization by State
+{: .no_toc}
-This data source is a mirror of the "COVID-19 Reported Patient Impact and
-Hospital Capacity by State Timeseries" and "COVID-19 Reported Patient Impact and
-Hospital Capacity by State" datasets provided by the US Department of
-Health & Human Services via healthdata.gov. The latter provides more frequent updates,
-so it is combined with the former to create a single dataset which is as recent as possible.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `covid_hosp_state_timeseries` |
+| **Data Source** | [US Department of Health & Human Services](https://healthdata.gov/Hospital/COVID-19-Reported-Patient-Impact-and-Hospital-Capa/g62h-syeh) |
+| **Geographic Levels** | US States plus DC, PR, and VI (see [Geographic Codes](geographic_codes.html#us-states-and-territories)) |
+| **Temporal Granularity** | Daily |
+| **Reporting Cadence** | Inactive - No longer updated since 2024-04-27 |
+| **Temporal Scope Start** | 2020-01-01 |
+| **License** | [Public Domain US Government](https://www.usa.gov/government-works) |
+
+## Overview
+{: .no_toc}
+
+This data source provides various measures of COVID-19 burden on patients and healthcare facilities in the US. It is a mirror of the "COVID-19 Reported Patient Impact and Hospital Capacity by State Timeseries" and "COVID-19 Reported Patient Impact and Hospital Capacity by State" datasets provided by HHS via healthdata.gov. The latter provides more frequent updates, so it is combined with the former to create a single dataset which is as recent as possible.
HHS performs up to four days of forward-fill for missing values in the
[facility-level data](covid_hosp_facility.md) which are aggregated to make this
@@ -34,23 +44,16 @@ General topics not specific to any particular data source are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing) and [citing](README.md#citing).
-## Metadata
+## Table of contents
+{: .no_toc .text-delta}
-This data source provides various measures of COVID-19 burden on patients and healthcare in the US.
-- Data source: US Department of Health & Human Services (HHS) [COVID-19 Reported Patient Impact and
-Hospital Capacity by State Timeseries](https://healthdata.gov/Hospital/COVID-19-Reported-Patient-Impact-and-Hospital-Capa/g62h-syeh) (published weekly)
- and [COVID-19 Reported Patient Impact and Hospital Capacity by State](https://healthdata.gov/dataset/COVID-19-Reported-Patient-Impact-and-Hospital-Capa/6xf2-c3ie) (published on an irregular schedule, every 1-6 days)
-- Temporal Resolution: Daily, starting 2020-01-01
-- Spatial Resolution: US States plus DC, PR, and VI
-- Open Access: [Public Domain US Government](https://www.usa.gov/government-works)
-- Versioned by Delphi according to "issue" date, which is the date that the
-dataset was published by HHS.
+1. TOC
+{:toc}
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/covid_hosp_state_timeseries/
+The base URL is:
-See [this documentation](README.md) for details on specifying locations and dates.
## Parameters
@@ -58,14 +61,14 @@ See [this documentation](README.md) for details on specifying locations and date
| Parameter | Description | Type |
|-----------|--------------------------------|--------------------------------|
-| `states` | two-letter state abbreviations | `list` of states |
-| `dates` | dates | `list` of dates or date ranges |
+| `states` | two-letter state abbreviations (see [Geographic Codes](geographic_codes.html#us-states-and-territories)) | `list` of states |
+| `dates` | dates (see [Date Formats](date_formats.md)) | `list` of dates or date ranges |
### Optional
| Parameter | Description | Type |
|-----------|-------------|----------------------------------------|
-| `issues` | issues | `list` of "issue" dates or date ranges |
+| `issues` | issues (see [Date Formats](date_formats.md)) | `list` of "issue" dates or date ranges |
If `issues` is not specified, then the most recent issue is used by default.
@@ -84,7 +87,7 @@ If `issues` is not specified, then the most recent issue is used by default.
# Example URLs
### MA on 2020-05-10 (per most recent issue)
-https://api.delphi.cmu.edu/epidata/covid_hosp_state_timeseries/?states=MA&dates=20200510
+
```json
{
@@ -218,11 +221,56 @@ https://api.delphi.cmu.edu/epidata/covid_hosp_state_timeseries/?states=MA&dates=
# Code Samples
-Libraries are available for [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js), [Python](https://pypi.org/project/delphi-epidata/), and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
The following sample shows how to import the library and fetch MA on 2020-05-10
(per most recent issue).
-### Python
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pub_covid_hosp(states="MA", dates=20200510)
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_covid_hosp_state_timeseries(states = "MA", dates = 20200510)
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/) and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
+
+
+
+
+
Optionally install the package using pip(env):
```bash
@@ -260,3 +308,19 @@ The following issues were repaired:
These issues had been imported using the wrong column order due to an imprecise
database migration. If you pulled these issues before January 22, you will want
to discard that data.
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
+# Fetch data
+res <- Epidata$covid_hosp(states = list("MA"), dates = list(20200510))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
diff --git a/docs/api/covid_hosp_facility.md b/docs/api/covid_hosp_facility.md
index 3cca8b20a..bc9c0a342 100644
--- a/docs/api/covid_hosp_facility.md
+++ b/docs/api/covid_hosp_facility.md
@@ -1,15 +1,27 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive COVID-19 Reported Patient Impact and Hospital Capacity by Facility
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# COVID-19 Hospitalization by Facility
+{: .no_toc}
-This data source is a mirror of the "COVID-19 Reported Patient Impact and
-Hospital Capacity by Facility" dataset provided by the US Department of Health
-& Human Services via healthdata.gov.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `covid_hosp_facility` |
+| **Data Source** | [US Department of Health & Human Services](https://healthdata.gov/Hospital/COVID-19-Reported-Patient-Impact-and-Hospital-Capa/anag-cw7u) |
+| **Geographic Levels** | Healthcare facility |
+| **Temporal Granularity** | Weekly (Friday -- Thursday) |
+| **Reporting Cadence** | Inactive - No longer updated since 2024w08 |
+| **Temporal Scope Start** | 2020-07-31 |
+| **License** | [Public Domain US Government](https://www.usa.gov/government-works) |
+
+## Overview
+{: .no_toc}
+
+This data source provides various measures of COVID-19 burden on patients and healthcare facilities in the US. It is a mirror of the "COVID-19 Reported Patient Impact and Hospital Capacity by Facility" dataset provided by HHS via healthdata.gov.
HHS performs up to four days of forward-fill for missing values.
@@ -26,20 +38,15 @@ General topics not specific to any particular data source are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing) and [citing](README.md#citing).
-## Metadata
+## Table of contents
+{: .no_toc .text-delta}
-This data source provides various measures of COVID-19 burden on patients and healthcare in the US.
-- Data source: [US Department of Health & Human Services](https://healthdata.gov/Hospital/COVID-19-Reported-Patient-Impact-and-Hospital-Capa/anag-cw7u) (HHS)
-- Geographic resolution: healthcare facility (address, city, zip, fips)
-- Temporal resolution: weekly (Friday -- Thursday)
-- First week: 2020-07-31
-- Open Access: [Public Domain US Government](https://www.usa.gov/government-works)
-- Versioned by Delphi according to the date that the dataset was published by
-HHS. New versions are expected to be published roughly weekly.
+1. TOC
+{:toc}
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/covid_hosp_facility/
+The base URL is:
See [this documentation](README.md) for details on specifying locations and dates.
@@ -52,14 +59,14 @@ See [this documentation](README.md) for details on specifying locations and date
| `hospital_pks` | facility unique identifiers | `list` of identifiers |
| `collection_weeks` | dates | `list` of dates or date ranges |
-NOTE: The companion
-[`covid_hosp_facility_lookup` endpoint](covid_hosp_facility_lookup.md) can be
-used to lookup facility identifiers in a variety of ways.
-NOTE: A collection week spans Friday -- Thursday, and weeks are identified by
-the date corresponding to the Friday at the start of the week. Therefore, the
-`collection_weeks` parameter is formatted as a `YYYYMMDD` date (or list of
-dates) rather than an "epiweek" as in other endpoints.
+{: .note}
+> **NOTES:**
+> - [`covid_hosp_facility_lookup` endpoint](covid_hosp_facility_lookup.md) can > be used to lookup facility identifiers in a variety of ways.
+> - A collection week spans Friday -- Thursday, and weeks are identified by
+> the date corresponding to the Friday at the start of the week. Therefore, the
+> `collection_weeks` parameter is formatted as a `YYYYMMDD` date (or list of
+> dates) rather than an "epiweek" as in other endpoints.
### Optional
@@ -89,7 +96,7 @@ has been renamed here for clarity.
# Example URLs
### Moses Taylor Hospital (Scranton, PA) on the first collection week of December 2020 (per most recent issue)
-https://api.delphi.cmu.edu/epidata/covid_hosp_facility/?hospital_pks=390119&collection_weeks=20201201-20201207
+
```json
{
@@ -199,24 +206,85 @@ https://api.delphi.cmu.edu/epidata/covid_hosp_facility/?hospital_pks=390119&coll
# Code Samples
-Libraries are available for [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js), [Python](https://pypi.org/project/delphi-epidata/), and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
The following sample shows how to import the library and fetch Moses Taylor
Hospital (Scranton, PA) on the first collection week of December 2020 (per most
recent issue).
-### Python
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pub_covid_hosp_facility(hospital_pks="390119", collection_weeks=EpiRange(20201201, 20201207))
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_covid_hosp_facility(hospital_pks = "390119", collection_weeks = epirange(20201201, 20201207))
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/) and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
+
+
+
+
+
Optionally install the package using pip(env):
-````bash
+```bash
pip install delphi-epidata
-````
+```
Otherwise, place `delphi_epidata.py` from this repo next to your python script.
-````python
+```python
# Import
from delphi_epidata import Epidata
# Fetch data
res = Epidata.covid_hosp_facility('390119', Epidata.range(20201201, 20201207))
print(res['result'], res['message'], len(res['epidata']))
-````
+```
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
+# Fetch data
+res <- Epidata$covid_hosp_facility(hospital_pks = list("390119"), collection_weeks = list(Epidata$range(20201201, 20201207)))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
diff --git a/docs/api/covid_hosp_facility_lookup.md b/docs/api/covid_hosp_facility_lookup.md
index 98356d0cd..b0424ad67 100644
--- a/docs/api/covid_hosp_facility_lookup.md
+++ b/docs/api/covid_hosp_facility_lookup.md
@@ -1,19 +1,30 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive COVID-19 Reported Patient Impact and Hospital Capacity - Facility lookup
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# COVID-19 Hospitalization: Facility Lookup
+{: .no_toc}
-This endpoint is a companion to the
-[`covid_hosp_facility` endpoint](covid_hosp_facility.md). It provides a way to
-find unique identifiers and other metadata for facilities of interest.
-Metadata is derived from the "COVID-19 Reported Patient Impact and Hospital
-Capacity by Facility" dataset provided by the US Department of Health & Human
-Services via healthdata.gov.
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `covid_hosp_facility_lookup` |
+| **Data Source** | [US Department of Health & Human Services](https://healthdata.gov/Hospital/COVID-19-Reported-Patient-Impact-and-Hospital-Capa/anag-cw7u) |
+| **Geographic Levels** | Healthcare facility ([state](geographic_codes.html#us-states-and-territories), ccn city, zip, fips) |
+| **Reporting Cadence** | Inactive - No longer updated since 2024w08 |
+| **License** | [Public Domain US Government](https://www.usa.gov/government-works) |
+
+
+
+## Overview
+{: .no_toc}
+
+This endpoint is a companion to the [`covid_hosp_facility` endpoint](covid_hosp_facility.md). It provides a way to find unique identifiers and other metadata for facilities of interest.
+
+Metadata is derived from the "COVID-19 Reported Patient Impact and Hospital Capacity by Facility" dataset provided by HHS via healthdata.gov.
See the
[official description and data dictionary at healthdata.gov](https://healthdata.gov/Hospital/COVID-19-Reported-Patient-Impact-and-Hospital-Capa/anag-cw7u)
@@ -23,32 +34,34 @@ General topics not specific to any particular data source are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing) and [citing](README.md#citing).
-## Metadata
+## Table of contents
+{: .no_toc .text-delta}
-This data source provides metadata about healthcare facilities in the US.
-- Data source: [US Department of Health & Human Services](https://healthdata.gov/Hospital/COVID-19-Reported-Patient-Impact-and-Hospital-Capa/anag-cw7u) (HHS)
-- Total number of facilities: 4922
-- Open Access: [Public Domain US Government](https://www.usa.gov/government-works)
+1. TOC
+{:toc}
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/covid_hosp_facility_lookup/
+The base URL is:
See [this documentation](README.md) for details on specifying locations and dates.
## Parameters
+### Required
+
| Parameter | Description | Type |
|-------------|-----------------------------------|--------|
-| `state` | two-letter state abbreviation | string |
+| `state` | two-letter state abbreviation (see [Geographic Codes](geographic_codes.html#us-states-and-territories)) | string |
| `ccn` | facility CMS Certification Number | string |
| `city` | city name | string |
| `zip` | 5-digit ZIP code | string |
| `fips_code` | 5-digit FIPS county code | string |
-NOTE: Exactly one of the above parameters must be present in requests.
-Combinations of parameters (e.g. specifying both `city` and `state`) are not
-supported.
+{: .note}
+> **NOTE:** Exactly one of the above parameters must be present in requests.
+> Combinations of parameters (e.g. specifying both `city` and `state`) are not
+> supported.
## Response
@@ -74,7 +87,7 @@ Use the `hospital_pk` value when querying
# Example URLs
### Lookup facilities in the city of Southlake (TX)
-https://api.delphi.cmu.edu/epidata/covid_hosp_facility_lookup/?city=southlake
+
```json
{
@@ -112,23 +125,84 @@ https://api.delphi.cmu.edu/epidata/covid_hosp_facility_lookup/?city=southlake
# Code Samples
-Libraries are available for [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js), [Python](https://pypi.org/project/delphi-epidata/), and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
The following sample shows how to import the library and fetch facilities in
the city of Southlake (TX).
-### Python
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pub_covid_hosp_facility_lookup(city="southlake")
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_covid_hosp_facility_lookup(city = "southlake")
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/) and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
+
+
+
+
+
Optionally install the package using pip(env):
-````bash
+```bash
pip install delphi-epidata
-````
+```
Otherwise, place `delphi_epidata.py` from this repo next to your python script.
-````python
+```python
# Import
from delphi_epidata import Epidata
# Fetch data
res = Epidata.covid_hosp_facility_lookup(city='southlake')
print(res['result'], res['message'], len(res['epidata']))
-````
+```
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
+# Fetch data
+res <- Epidata$covid_hosp_facility_lookup(city = "southlake")
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
diff --git a/docs/api/covidcast-signals/_source-template.md b/docs/api/covidcast-signals/_source-template.md
index f2e966817..2d1a10c40 100644
--- a/docs/api/covidcast-signals/_source-template.md
+++ b/docs/api/covidcast-signals/_source-template.md
@@ -7,13 +7,15 @@ grand_parent: Main Endpoint (COVIDcast)
# SOURCE NAME
{: .no_toc}
-* **Source name:** `SOURCE-API-NAME`
-* **Earliest issue available:** DATE RELEASED TO API
-* **Number of data revisions since 19 May 2020:** 0
-* **Date of last change:** Never
-* **Available for:** county, hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** [LICENSE NAME](../covidcast_licensing.md#APPLICABLE-SECTION)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `SOURCE-API-NAME` |
+| **Data Source** | [DATA SOURCE PROVIDER] |
+| **Geographic Levels** | county, hrr, msa, state (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | day (see [date format docs](../covidcast_times.md)) |
+| **Date of last data revision:** | Never (see [data revision docs](#changelog)) |
+| **Temporal Scope Start** | DATE RELEASED TO API |
+| **License** | [LICENSE NAME](../covidcast_licensing.md#APPLICABLE-SECTION) |
A brief description of what this source measures.
@@ -21,6 +23,15 @@ A brief description of what this source measures.
|---------------|----------------------------------------------------------------------------------------------------------|
| `signal_name` | Brief description of the signal, including the units it is measured in and any smoothing that is applied |
+## Changelog
+
+
+Click to expand
+
+Your collapsible content goes here. You can still use **Markdown** inside.
+
+
+
## Table of contents
{: .no_toc .text-delta}
diff --git a/docs/api/covidcast-signals/chng.md b/docs/api/covidcast-signals/chng.md
index 06b6d5a29..b5e7561f1 100644
--- a/docs/api/covidcast-signals/chng.md
+++ b/docs/api/covidcast-signals/chng.md
@@ -1,24 +1,36 @@
---
-title: Change Healthcare
-parent: Data Sources and Signals
-grand_parent: Main Endpoint (COVIDcast)
-nav_order: 1
+parent: Inactive Sources (COVIDcast)
+grand_parent: Data Sources and Signals
+title: inactive Change Healthcare
---
# Change Healthcare
{: .no_toc}
-* **Source name:** `chng`
-* **Earliest issue available:** November 4, 2020
-* **Number of data revisions since May 19, 2020:** 0
-* **Date of last change:** Never
-* **Available for:** county, hrr, msa, state, hhs, nation (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** [CC BY-NC](../covidcast_licensing.md#creative-commons-attribution-noncommercial)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `chng` |
+| **Data Source** | Change Healthcare |
+| **Geographic Levels** | National, U.S. HHS Region, State, County, Hospital Referral Region (HRR), Metropolitan Statistical Area (MSA) (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Inactive - No longer updated since 2024-02-19 |
+| **Date of last data revision:** | Never (see [data revision docs](#changelog)) |
+| **Temporal Scope Start** | 2020-02-01 |
+| **License** | [CC BY-NC](../covidcast_licensing.md#creative-commons-attribution-noncommercial) |
-## Overview
+## Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+No changes so far.
-**Notice: This data source was inactive between 2021-10-04 and 2021-12-02 to allow us resolve some problems with the data pipeline. We have resumed daily updates and are working on a data patch to fill the gap. [Additional details on this inactive period are available below](#pipeline-pause).**
+
+
+## Overview
+{: .no_toc}
This data source is based on Change Healthcare claims data that has been
de-identified in accordance with HIPAA privacy regulations. Change Healthcare is
diff --git a/docs/api/covidcast-signals/covid-act-now.md b/docs/api/covidcast-signals/covid-act-now.md
index 41a5cabc2..d6420627e 100644
--- a/docs/api/covidcast-signals/covid-act-now.md
+++ b/docs/api/covidcast-signals/covid-act-now.md
@@ -1,20 +1,35 @@
---
+parent: Inactive Sources (COVIDcast)
+grand_parent: Data Sources and Signals
title: inactive COVID Act Now
-parent: Data Sources and Signals
-grand_parent: Main Endpoint (COVIDcast)
-nav_order: 2
---
# COVID Act Now (CAN)
{: .no_toc}
-* **Source name:** `covid-act-now`
-* **Earliest issue available:** 2021-03-25
-* **Number of data revisions since 19 May 2020:** 0
-* **Date of last change:** Never
-* **Available for:** county, hrr, msa, state, hhs, nation (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** [CC BY-NC](../covidcast_licensing.md#creative-commons-attribution-noncommercial)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `covid-act-now` |
+| **Data Source** | COVID Act Now |
+| **Geographic Levels** | National, U.S. HHS Region, State, County, Hospital Referral Region (HRR), Metropolitan Statistical Area (MSA) (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Inactive - No longer updated since 2021-12-02 |
+| **Date of last data revision:** | Never (see [data revision docs](#changelog)) |
+| **Temporal Scope Start** | 2020-03-01 |
+| **License** | [CC BY-NC](../covidcast_licensing.md#creative-commons-attribution-noncommercial) |
+
+## Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+No changes so far.
+
+
+
+## Overview
The [COVID Act Now (CAN)](https://covidactnow.org/) data source provides COVID-19 testing statistics, such as positivity rates and total tests performed.
The county-level positivity rates and test totals are pulled directly from CAN using [their API](https://covidactnow.org/data-api).
diff --git a/docs/api/covidcast-signals/covid-trends-and-impact-survey.md b/docs/api/covidcast-signals/covid-trends-and-impact-survey.md
index 147566f98..69f354de9 100644
--- a/docs/api/covidcast-signals/covid-trends-and-impact-survey.md
+++ b/docs/api/covidcast-signals/covid-trends-and-impact-survey.md
@@ -1,21 +1,53 @@
---
+parent: Inactive Sources (COVIDcast)
+grand_parent: Data Sources and Signals
title: inactive COVID-19 Trends and Impact Survey
-parent: Data Sources and Signals
-grand_parent: Main Endpoint (COVIDcast)
-nav_order: 2
permalink: api/covidcast-signals/fb-survey.html
---
# COVID-19 Trends and Impact Survey (CTIS)
{: .no_toc}
-* **Source name:** `fb-survey`
-* **Earliest issue available:** April 29, 2020
-* **Number of data revisions since May 19, 2020:** 1
-* **Date of last change:** [June 3, 2020](../covidcast_changelog.md#fb-survey)
-* **Available for:** county, hrr, msa, state, nation (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** [CC BY](../covidcast_licensing.md#creative-commons-attribution)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `fb-survey` |
+| **Data Source** | [COVID-19 Trends and Impact Survey (CTIS)](../../symptom-survey/) |
+| **Geographic Levels** | National, State, County, Hospital Referral Region (HRR), Metropolitan Statistical Area (MSA) (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Inactive - No longer updated since 2022-06-25 |
+| **Date of last data revision:** | June 3, 2020 (see [data revision docs](../covidcast_changelog.md#fb-survey)) |
+| **Temporal Scope Start** | Varies by indicator - 2020-2021 |
+| **License** | [CC BY](../covidcast_licensing.md#creative-commons-attribution) |
+
+## Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+### June 3, 2020
+
+Duplicate survey weights had corrupted historical figures for the following signals and dates. The correct data has been restored to the API.
+* `raw_wcli`
+ * `county`: 20200406, 20200408, 20200410, 20200430
+ * `hrr`: 20200406, 20200408-20200410, 20200430
+ * `msa`: 20200408, 20200410, 20200430
+ * `state`: 20200408-20200410, 20200430
+* `smoothed_wcli`
+ * `county`: 20200406, 20200408-20200414, 20200430-20200506
+ * `hrr`: 20200406-20200415, 20200430-20200506
+ * `msa`: 20200408-20200414, 20200430-20200506
+ * `state`: 20200408-20200416, 20200430-20200506
+
+### November 20, 2020
+
+Due to a bug in our data processing system, estimates of the percentage of people reporting that they have been tested for COVID-19 calculated before October 8th were incorrect.
+We incorrectly treated an answer of “no” as a missing response, which affected the `smoothed_tested_14d` and `smoothed_wtested_14d` signals from the `fb-survey` source.
+
+As of Nov. 20th, the error has been corrected and all affected data reissued.
+
+
## Overview
@@ -790,12 +822,11 @@ of zero, and in simulations improves the quality of the standard error
estimates. See the [Appendix](#appendix) for further motivation for these
estimators.
-Note:
-Currently the standard errors are calculated as though all survey weights are
-equal, that is \(w^\text{part}_i = 1\) for all respondents. The result is that
-reported standard errors are artificially narrow for weighted estimates. This
-will be corrected in a future update to the API.
-
+> **Note:** Currently the standard errors are calculated as though all survey weights are
+> equal, that is $$w^\text{part}_i = 1$$ for all respondents. The result is that
+> reported standard errors are artificially narrow for weighted estimates. This
+> will be corrected in a future update to the API.
+{: .note }
The pseudo-observation is not used in $$\hat{p}$$ and $$\hat{q}$$ themselves, to
avoid potentially large amounts of estimation bias, as $$p$$ and $$q$$ are
diff --git a/docs/api/covidcast-signals/doctor-visits.md b/docs/api/covidcast-signals/doctor-visits.md
index 5eb9c96a9..6ce2d3071 100644
--- a/docs/api/covidcast-signals/doctor-visits.md
+++ b/docs/api/covidcast-signals/doctor-visits.md
@@ -8,16 +8,31 @@ nav_order: 1
# Doctor Visits
{: .no_toc}
-* **Source name:** `doctor-visits`
-* **Earliest issue available:** April 29, 2020
-* **Number of data revisions since May 19, 2020:** 1
-* **Date of last change:** November 9, 2020
-* **Available for:** county, hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** [CC BY](../covidcast_licensing.md#creative-commons-attribution)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `doctor-visits` |
+| **Data Source** | Health system partners |
+| **Geographic Levels** | State, County, Hospital Referral Region (HRR), Metropolitan Statistical Area (MSA) (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Daily |
+| **Date of last data revision:** | November 9, 2020 (see [data revision docs](#changelog)) |
+| **Temporal Scope Start** | 2020-02-01 |
+| **License** | [CC BY](../covidcast_licensing.md#creative-commons-attribution) |
+## Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+### November 9, 2020
+We went from a custom geo-mapping file (for aggregating from county->(msa, hrr, state)) to a central geo file based on rigorously sourced US census data.
+
+
## Overview
+{: .no_toc}
This data source is based on information about outpatient visits, provided to us
by health system partners. Using this outpatient data, we estimate the
@@ -50,15 +65,12 @@ $$
Y_{it}^{\text{Flu}}\right)}{N_{it}}
$$
-The estimated standard error is:
+**Note on Uncertainty:** The standard error formula below represents the theoretical error of the binomial proportion. However, due to the smoothing and day-of-week adjustments applied later in the pipeline, the actual standard error in the final signal will differ.
$$
\widehat{\text{se}}(\hat{p}_{it}) = 100 \sqrt{\frac{\frac{\hat{p}_{it}}{100}(1-\frac{\hat{p}_{it}}{100})}{N_{it}}}.
$$
-Note the quantity above is not going to be correct for multiple reasons: smoothing/day of
-week adjustments/etc.
-
### Day-of-Week Adjustment
The fraction of visits due to CLI is dependent on the day of the week. On
diff --git a/docs/api/covidcast-signals/dsew-cpr.md b/docs/api/covidcast-signals/dsew-cpr.md
index 82e76d7df..fa6887581 100644
--- a/docs/api/covidcast-signals/dsew-cpr.md
+++ b/docs/api/covidcast-signals/dsew-cpr.md
@@ -1,20 +1,35 @@
---
+parent: Inactive Sources (COVIDcast)
+grand_parent: Data Sources and Signals
title: inactive Data Strategy and Execution Workgroup Community Profile Report
-parent: Data Sources and Signals
-grand_parent: Main Endpoint (COVIDcast)
-nav_order: 2
---
# Data Strategy and Execution Workgroup Community Profile Report (CPR)
{: .no_toc}
-* **Source name:** `dsew-cpr`
-* **Earliest issue available:** 2022-01-28
-* **Number of data revisions since 19 May 2020:** 0
-* **Date of last change:** Never
-* **Available for:** county, msa, state, hhs, nation (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** [Public Domain US Government](https://www.usa.gov/government-works)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `dsew-cpr` |
+| **Data Source** | [Community Profile Report (CPR)](https://healthdata.gov/Health/COVID-19-Community-Profile-Report/gqxm-d9w9) |
+| **Geographic Levels** | National, U.S. HHS Region, State, County, Metropolitan Statistical Area (MSA) (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Inactive - No longer updated since 2023-02-22 |
+| **Date of last data revision:** | Never (see [data revision docs](#changelog)) |
+| **Temporal Scope Start** | Varies by indicator - 2020-2021 |
+| **License** | [Public Domain US Government](https://www.usa.gov/government-works) |
+
+## Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+No changes so far.
+
+
+
+## Overview
The Community Profile Report (CPR) is published by the Data Strategy and Execution Workgroup (DSEW) of the White House COVID-19 Team. For more information, see the [official description at healthdata.gov](https://healthdata.gov/Health/COVID-19-Community-Profile-Report/gqxm-d9w9) for "COVID-19 Community Profile Report". Each issue of the CPR is made available as an attachment on that page. You can view all attachments by scrolling to the bottom of the "About this dataset" panel and clicking "Show more".
diff --git a/docs/api/covidcast-signals/ght.md b/docs/api/covidcast-signals/ght.md
index 9b592f60e..612434016 100644
--- a/docs/api/covidcast-signals/ght.md
+++ b/docs/api/covidcast-signals/ght.md
@@ -1,19 +1,33 @@
---
-title: inactive Google Health Trends
-parent: Data Sources and Signals
-grand_parent: Main Endpoint (COVIDcast)
-nav_order: 2
+parent: Inactive Sources (COVIDcast)
+grand_parent: Data Sources and Signals
+title: inactive (COVIDcast) Google Health Trends
---
# Google Health Trends
{: .no_toc}
-* **Source name:** `ght`
-* **Earliest issue available:** April 29, 2020
-* **Number of data revisions since May 19, 2020:** 0
-* **Date of last change:** Never
-* **Available for:** dma, hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `ght` |
+| **Data Source** | Google Health Trends |
+| **Geographic Levels** | State, Hospital Referral Region (HRR), Metropolitan Statistical Area (MSA), Designated Marketing Area (DMA) (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Inactive - No longer updated since 2021-03-04 |
+| **Date of last data revision:** | Never (see [data revision docs](#changelog)) |
+| **Temporal Scope Start** | 2020-02-01 |
+| **License** | [Google Terms of Service](https://policies.google.com/terms)|
+
+## Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+No changes so far.
+
+
## Overview
diff --git a/docs/api/covidcast-signals/google-survey.md b/docs/api/covidcast-signals/google-survey.md
index d758d6a8b..701182447 100644
--- a/docs/api/covidcast-signals/google-survey.md
+++ b/docs/api/covidcast-signals/google-survey.md
@@ -1,20 +1,33 @@
---
+parent: Inactive Sources (COVIDcast)
+grand_parent: Data Sources and Signals
title: inactive Google Symptom Surveys
-parent: Data Sources and Signals
-grand_parent: Main Endpoint (COVIDcast)
-nav_order: 2
---
# Google Symptom Surveys
{: .no_toc}
-* **Source name:** `google-survey`
-* **Earliest issue available:** May 01, 2020
-* **Number of data revisions since May 19, 2020:** 0
-* **Date of last change:** Never
-* **Available for:** county, hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** [CC BY](../covidcast_licensing.md#creative-commons-attribution)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `google-survey` |
+| **Data Source** | [Google-run symptom surveys](https://9to5google.com/2020/03/23/google-coronavirus-survey/)/Delphi |
+| **Geographic Levels** | National, State, County, Hospital Referral Region (HRR), Metropolitan Statistical Area (MSA) (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Inactive - No longer updated since 2020-05-14 |
+| **Date of last data revision:** | Never (see [data revision docs](#changelog)) |
+| **Temporal Scope Start** | 2020-04-11 |
+| **License** | [CC BY](../covidcast_licensing.md#creative-commons-attribution) |
+
+## Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+No changes so far.
+
+
## Overview
@@ -26,7 +39,7 @@ is sick (fever, along with cough, or shortness of breath, or difficulty
breathing) right now?" Using this survey data, we estimate the percentage of
people in a given location, on a given day, that *know somebody who has a
COVID-like illness*. This estimates a similar quantity to the `*_cmnty_cli`
-signals from the [COVID-19 Trends and Impact Survey](fb-survey.md) (`fb-survey`) source, but using
+signals from the [COVID-19 Trends and Impact Survey](covid-trends-and-impact-survey.md) (`fb-survey`) source, but using
a different survey population and recruitment method.
The survey sampled from all counties with greater than 100,000 population, along
diff --git a/docs/api/covidcast-signals/google-symptoms.md b/docs/api/covidcast-signals/google-symptoms.md
index f37926242..64b6e3a7d 100644
--- a/docs/api/covidcast-signals/google-symptoms.md
+++ b/docs/api/covidcast-signals/google-symptoms.md
@@ -1,22 +1,40 @@
---
-title: Google Symptom Search Trends
-parent: Data Sources and Signals
-grand_parent: Main Endpoint (COVIDcast)
-nav_order: 1
+parent: Inactive Sources (COVIDcast)
+grand_parent: Data Sources and Signals
+title: inactive Google Symptom Search Trends
---
# Google Symptoms
{: .no_toc}
-* **Source name:** `google-symptoms`
-* **Earliest issue available:** Aug 20, 2017
-* **Number of data revisions since May 19, 2020:** 1
-* **Date of last change:** February 28, 2025
-* **Available for:** county, MSA, HRR, state, HHS, nation (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** To download or use the data, you must agree to the Google [Terms of Service](https://policies.google.com/terms)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `google-symptoms` |
+| **Data Source** | Google |
+| **Geographic Levels** | National, U.S. HHS Region, State, County, Hospital Referral Region (HRR), Metropolitan Statistical Area (MSA) (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Inactive - No longer updated after November 16th, 2025 |
+| **Date of last data revision:** | March 14th, 2025 (see [data revision docs](#changelog)) |
+| **Temporal Scope Start** | February 13th, 2020, with some variation depending on geographic area|
+| **License** | [Google Terms of Service](https://policies.google.com/terms) |
+
+## Changelog
+
+
+Click to expand
+
+
+### March 14, 2025
+Google made earlier data available (back to August 15, 2017), and fixed a gap in county-level data between November 14, 2022 and February 20, 2023.
+
+### February 14, 2025
+Two new signals were added, relating to conjunctivitis: `s07_raw_search` and `s07_smoothed_search`.
+
+
+
## Overview
+{: .no_toc}
This data source is based on the [COVID-19 Search Trends symptoms
dataset](https://console.cloud.google.com/marketplace/product/bigquery-public-datasets/covid19-search-trends?hl=en-GB).
diff --git a/docs/api/covidcast-signals/hhs.md b/docs/api/covidcast-signals/hhs.md
index d591aa720..a7d336a43 100644
--- a/docs/api/covidcast-signals/hhs.md
+++ b/docs/api/covidcast-signals/hhs.md
@@ -1,20 +1,35 @@
---
+parent: Inactive Sources (COVIDcast)
+grand_parent: Data Sources and Signals
title: inactive HHS Hospitalizations from NHSN
-parent: Data Sources and Signals
-grand_parent: Main Endpoint (COVIDcast)
-nav_order: 2
---
# Department of Health & Human Services Hospitalizations
{: .no_toc}
-* **Source name:** `hhs`
-* **Earliest issue available:** November 16, 2020
-* **Number of data revisions since 19 May 2020:** 0
-* **Date of last change:** Never
-* **Available for:** state, hhs, nation (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** [Public Domain US Government](https://www.usa.gov/government-works)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `hhs` |
+| **Data Source** | U.S. Department of Health & Human Services |
+| **Geographic Levels** | National, U.S. HHS Region, State (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Inactive - no longer updated since 2024-04-30 |
+| **Date of last data revision:** | Never (see [data revision docs](#changelog)) |
+| **Temporal Scope Start** | 2019-12-31 |
+| **License** | [Public Domain US Government](https://www.usa.gov/government-works) |
+
+## Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+No changes so far.
+
+
+
+## Overview
The U.S. Department of Health & Human Services (HHS) publishes several
datasets on patient impact and hospital capacity. The data is made available
@@ -34,20 +49,24 @@ adult and pediatric COVID-19 hospital admissions. This sum is used as the
We also include influenza hospital admissions.
-| Signal and 7-day average signal | Description |
-|---|---|
-| `confirmed_admissions_covid_1d` and `confirmed_admissions_covid_1d_7dav` | Sum of adult and pediatric confirmed COVID-19 hospital admissions occurring each day.
**Earliest date available:** 2019-12-31 |
-| `confirmed_admissions_covid_1d_prop` and `confirmed_admissions_covid_1d_prop_7dav` | Sum of adult and pediatric confirmed COVID-19 hospital admissions occurring each day, per 100,000 population.
**Earliest date available:** 2019-12-31 |
-| `sum_confirmed_suspected_admissions_covid_1d` and `sum_confirmed_suspected_admissions_covid_1d_7dav` | Sum of adult and pediatric confirmed and suspected COVID-19 hospital admissions occurring each day.
**Earliest date available:** 2019-12-31 |
-| `sum_confirmed_suspected_admissions_covid_1d_prop` and
`sum_confirmed_suspected_admissions_covid_1d_prop_7dav` | Sum of adult and pediatric confirmed and suspected COVID-19 hospital admissions occurring each day, per 100,000 population.
**Earliest date available:** 2019-12-31 |
-| `confirmed_admissions_influenza_1d` and `confirmed_admissions_influenza_1d_7dav` | All confirmed influenza hospital admissions occurring each day. We made this signal available November 1, 2021.
**Earliest issue available:** 2021-09-20
**Earliest date available:** 2020-01-02 |
-| `confirmed_admissions_influenza_1d_prop` and `confirmed_admissions_influenza_1d_prop_7dav` | All confirmed influenza hospital admissions occurring each day, per 100,000 population. We made this signal available November 1, 2021.
**Earliest issue available:** 2021-09-20
**Earliest date available:** 2020-01-02 |
+Each metric below is available in four variants:
+1. **Raw Count:** `_1d`
+2. **Smoothed (7-day average):** `_1d_7dav`
+3. **Population Proportion (per 100k):** `_1d_prop`
+4. **Smoothed Proportion:** `_1d_prop_7dav`
+
+| Metric | Base Signal Name | Description |
+| :--- | :--- | :--- |
+| **Confirmed COVID-19** | `confirmed_admissions_covid` | **Sum of Adult + Pediatric.** Confirmed admissions only.
**Earliest Dates:**
• `_1d` (Daily): **2019-12-31**
• `_7dav` (7-Day Avg): **2020-01-06** |
+| **Suspected + Confirmed** | `sum_confirmed_suspected_admissions_covid` | **Sum of Adult + Pediatric.** Combined count of confirmed and suspected cases.
**Earliest Dates:**
• `_1d` (Daily): **2019-12-31**
• `_7dav` (7-Day Avg): **2020-01-06** |
+| **Influenza** | `confirmed_admissions_influenza` | All confirmed influenza hospital admissions.
**Earliest Dates:**
• `_1d` (Daily): **2020-01-02**
• `_7dav` (7-Day Avg): **2020-01-08** |
+
-*for all the above signals & 7-day average signals, their geography is state, and resolution is 1 day.
+> **Note**
+> * For all the above signals & 7-day average signals, their geography is state, and resolution is 1 day.
+> * The 7-day average signals are computed by Delphi by calculating moving averages of the preceding 7 days, so e.g. the signal for June 7 is the average of the underlying data for June 1 through 7, inclusive.
+{: .note }
-The 7-day average signals are computed by Delphi by calculating
-moving averages of the preceding 7 days, so e.g. the signal for June 7 is the
-average of the underlying data for June 1 through 7, inclusive.
## Table of contents
{: .no_toc .text-delta}
diff --git a/docs/api/covidcast-signals/hospital-admissions.md b/docs/api/covidcast-signals/hospital-admissions.md
index 1dcd5959f..d35870e7d 100644
--- a/docs/api/covidcast-signals/hospital-admissions.md
+++ b/docs/api/covidcast-signals/hospital-admissions.md
@@ -8,15 +8,31 @@ nav_order: 1
# Hospital Admissions
{: .no_toc}
-* **Source name:** `hospital-admissions`
-* **Earliest issue available:** June 21, 2020
-* **Number of data revisions since May 19, 2020:** 1
-* **Date of last change:** October 20, 2020
-* **Available for:** county, hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** [CC BY](../covidcast_licensing.md#creative-commons-attribution)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `hospital-admissions` |
+| **Data Source** | Health system partners |
+| **Geographic Levels** | National, State, County, Hospital Referral Region (HRR), Metropolitan Statistical Area (MSA) (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Daily |
+| **Date of last data revision:** | October 20, 2020 (see [data revision docs](#changelog)) |
+| **Temporal Scope Start** | 2020-02-01 |
+| **License** | [CC BY](../covidcast_licensing.md#creative-commons-attribution) |
+
+## Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+### October 20, 2020
+We went from a custom geo mapping file (for aggregating from zip->(county, msa, hrr, state)) to a central geo file based on rigorously sourced US census data.
+
+
## Overview
+{: .no_toc}
This data source is based on electronic medical records and claims data about
hospital admissions, provided to us by health system partners. We use this
@@ -26,12 +42,19 @@ COVID-associated diagnosis code in a given location, on a given day.
See also our [Health & Human Services](hhs.md) data source for official COVID
hospitalization reporting from the Department of Health & Human Services.
+**Active Signals.** These signals are currently updated.
+
| Signal | Description |
| --- | --- |
| `smoothed_covid19_from_claims` | Estimated percentage of new hospital admissions with COVID-associated diagnoses, based on claims data from health system partners, smoothed in time using a Gaussian linear smoother
**Earliest date available:** 2020-02-01 |
| `smoothed_adj_covid19_from_claims` | Same as `smoothed_covid19_from_claims`, but with systematic day-of-week effects removed using [the same mechanism as in `doctor-visits`](doctor-visits.md#day-of-week-adjustment)
**Earliest date available:** 2020-02-01 |
-| `smoothed_covid19` | Estimated percentage of new hospital admissions with COVID-associated diagnoses, based on electronic medical record and claims data from health system partners, smoothed in time using a Gaussian linear smoother. _This signal is no longer updated as of 1 October, 2020._
**Earliest date available:** 2020-02-01 |
-| `smoothed_adj_covid19` | Same as `smoothed_covid19`, but with systematic day-of-week effects removed using [the same mechanism as in `doctor-visits`](doctor-visits.md#day-of-week-adjustment). _This signal is no longer updated as of 1 October, 2020._
**Earliest date available:** 2020-02-01 |
+
+**Deprecated Signals.** These signals are frozen and no longer updated as of Oct 1, 2020.
+
+| Signal | Description |
+| --- | --- |
+| `smoothed_covid19` | Estimated percentage of new hospital admissions with COVID-associated diagnoses, based on electronic medical record and claims data from health system partners, smoothed in time using a Gaussian linear smoother.
**Earliest date available:** 2020-02-01 |
+| `smoothed_adj_covid19` | Same as `smoothed_covid19`, but with systematic day-of-week effects removed using [the same mechanism as in `doctor-visits`](doctor-visits.md#day-of-week-adjustment).
**Earliest date available:** 2020-02-01 |
## Table of Contents
{: .no_toc .text-delta}
diff --git a/docs/api/covidcast-signals/inactive.md b/docs/api/covidcast-signals/inactive.md
new file mode 100644
index 000000000..bebbb83ff
--- /dev/null
+++ b/docs/api/covidcast-signals/inactive.md
@@ -0,0 +1,12 @@
+---
+title: Inactive Sources (COVIDcast)
+parent: Data Sources and Signals
+grand_parent: Main Endpoint (COVIDcast)
+nav_order: 99
+has_children: true
+---
+
+# Inactive COVIDcast Sources
+{: .no_toc}
+
+These COVIDcast data sources and signals are no longer actively updated.
diff --git a/docs/api/covidcast-signals/indicator-combination.md b/docs/api/covidcast-signals/indicator-combination.md
index fe2edd3cf..dfc57f8ff 100644
--- a/docs/api/covidcast-signals/indicator-combination.md
+++ b/docs/api/covidcast-signals/indicator-combination.md
@@ -1,14 +1,21 @@
---
+parent: Inactive Sources (COVIDcast)
+grand_parent: Data Sources and Signals
title: inactive Indicator Combination
-parent: Data Sources and Signals
-grand_parent: Main Endpoint (COVIDcast)
-nav_order: 2
---
# Indicator Combination
{: .no_toc}
-* **Source name:** `indicator-combination`
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `indicator-combination` |
+| **Data Source** | Delphi |
+| **Geographic Levels** | State, County, Metropolitan Statistical Area (MSA) (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Inactive - no longer updated since 2021-03-16 |
+| **Temporal Scope Start** | 2020-04-06 |
+| **License** | [CC BY](../covidcast_licensing.md#creative-commons-attribution) |
This source provides signals which are combinations of the other sources,
calculated or composed by Delphi. It is not a primary data source.
@@ -21,12 +28,27 @@ calculated or composed by Delphi. It is not a primary data source.
## Statistical Combination Signals
-* **Earliest issue available:** May 20, 2020
-* **Number of data revisions since May 19, 2020:** 1
-* **Date of last change:** [June 3, 2020](../covidcast_changelog.md#indicator-combination)
-* **Available for:** county, msa, state (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** [CC BY](../covidcast_licensing.md#creative-commons-attribution)
+| Attribute | Details |
+| :--- | :--- |
+| **Geographic Levels** | State, County, Metropolitan Statistical Area (MSA) (see [geography coding docs](../covidcast_geography.md)) |
+| **Date of last data revision:** | June 3, 2020 (see [data revision docs](#changelog)) |
+
+
+### Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+#### June 3, 2020
+
+Standard error is now included in the `nmf_day_doc_fbc_fbs_ght` signal for all geo levels and dates, representing the estimated uncertainty in this signal. This uncertainty comes about because the signal is a combination of other signals based on survey estimates or other estimates with margins of error.
+
+
+
+### Overview
+{: .no_toc}
These signals combine Delphi's indicators---*not* including cases and deaths,
but including other signals expected to be related to the underlying rate of
@@ -43,6 +65,7 @@ These signals were updated daily until March 17, 2021.
| `nmf_day_doc_fbc_fbs_ght` | This signal uses a rank-1 approximation, from a nonnegative matrix factorization approach, to identify an underlying signal that best reconstructs the Doctor Visits (`smoothed_adj_cli`), Facebook Symptoms surveys (`smoothed_cli`), Facebook Symptoms in Community surveys (`smoothed_hh_cmnty_cli`), and Search Trends (`smoothed_search`) indicators. It does not include official reports (cases and deaths from the `jhu-csse` source). Higher values of the combined signal correspond to higher values of the other indicators, but the scale (units) of the combination is arbitrary. Note that the Search Trends source is not available at the county level, so county values of this signal do not use it. This signal is deprecated and is no longer updated as of March 17, 2021.
**Earliest date available:** 2020-04-15 |
| `nmf_day_doc_fbs_ght` | This signal is calculated in the same way as `nmf_day_doc_fbc_fbs_ght`, but does *not* include the Symptoms in Community survey signal, which was not available at the time this signal was introduced. It also uses `smoothed_cli` from the `doctor-visits` source instead of `smoothed_adj_cli`. This signal is deprecated and is no longer updated as of May 27, 2020.
**Earliest date available:** 2020-04-06 |
+
### Estimation
Let $$x_{rs}(t)$$ denote the value of sensor $$s$$ on day $$t$$ in region $$r$$
@@ -191,11 +214,27 @@ The resampling method for each input source is as follows:
## Compositional Signals: Confirmed Cases and Deaths
-* **Earliest issue available:** 7 July 2020
-* **Number of data revisions since 19 May 2020:** 1
-* **Date of last change:** [12 October 2020](../covidcast_changelog.md#indicator-combination)
-* **Available for:** county, msa, hrr, state (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `indicator-combination` |
+| **Geographic Levels** | State, County, Metropolitan Statistical Area (MSA), U.S. HHS Region (see [geography coding docs](../covidcast_geography.md)) |
+| **Date of last data revision:** October 12, 2020 (see [data revision docs](#changelog-deaths)) |
+
+## Changelog Deaths
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+### October 12, 2020
+
+The 10 October 2020 issue of all `indicator-combination` deaths signals has been removed from the API. These signals are primarily constructed of USAFacts data, whose 10 October 2020 issue was discovered to be corrupt on 11 October and repaired on 12 October. Subsequent issues have adequate coverage of all regions and dates included in the 10 October issue, so this change only affects forecasters who intend to pull training data with an `as_of` or `issues` parameter set to 20201010.
+
+
+
+
+## Overview
These signals combine the cases and deaths data from JHU and USA Facts. This is
a straight composition: the signals below use the [JHU signal data](jhu-csse.md)
diff --git a/docs/api/covidcast-signals/jhu-csse.md b/docs/api/covidcast-signals/jhu-csse.md
index c9d665b5a..c4d572f98 100644
--- a/docs/api/covidcast-signals/jhu-csse.md
+++ b/docs/api/covidcast-signals/jhu-csse.md
@@ -1,20 +1,49 @@
---
+parent: Inactive Sources (COVIDcast)
+grand_parent: Data Sources and Signals
title: inactive JHU Cases and Deaths
-parent: Data Sources and Signals
-grand_parent: Main Endpoint (COVIDcast)
-nav_order: 2
---
# JHU Cases and Deaths
{: .no_toc}
-* **Source name:** `jhu-csse`
-* **Earliest issue available:** May 7, 2020
-* **Number of data revisions since May 19, 2020:** 1
-* **Date of last change:** [October 7, 2020](../covidcast_changelog.md#jhu-csse)
-* **Available for:** county, hrr, msa, state, hhs, nation (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** [CC BY](#source-and-licensing)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `jhu-csse` |
+| **Data Source** | JHU CSSE |
+| **Geographic Levels** | National, U.S. HHS Region, State, County, Hospital Referral Region (HRR), Metropolitan Statistical Area (MSA) (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Inactive - No longer updated since 2023-03-09 |
+| **Date of last data revision:** | October 7, 2020 (see [data revision docs](#changelog)) |
+| **Temporal Scope Start** | 2020-01-22, with some variation by geographic area |
+| **License** | [CC BY](#source-and-licensing) |
+
+## Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+### October 7, 2020
+
+The following changes were made to all `jhu-csse` signals related to geocoding:
+- NY Boroughs county FIPS (36005, 36047, 36061, 36081, 36085) are now [differentiated by JHU](https://github.com/CSSEGISandData/COVID-19/issues/3084),
+- “Unassigned” and “Out of State” counts are assigned to a megaFIPS at the county level (XX000 where XX is the state FIPS code) and will now be incorporated into the state totals
+- The split of the Kansas City, Missouri into its four sub-counties is now done with a more precise population proportion,
+- The split of the Dukes and Nantucket, Massachusetts FIPS codes into the two sub-counties is now done with a more precise population proportion,
+- Some counts are reported in the Utah territories JHU UIDs 84070015-84070020. These are now aggregated properly into the state megaFIPS 49000, which will be aggregated in state-level information.
+
+### September 1, 2020
+
+NY Boroughs county FIPS (36005, 36047, 36061, 36081, 36085) are now split in proportion to the population of each county, instead of being reported in aggregate in FIPS 36061.
+
+### June 3, 2020
+
+We now include figures on Puerto Rico for all `jhu-csse` signals at the state level.
+
+
+
## Overview
diff --git a/docs/api/covidcast-signals/nchs-mortality.md b/docs/api/covidcast-signals/nchs-mortality.md
index 94a72ead2..5b910cacb 100644
--- a/docs/api/covidcast-signals/nchs-mortality.md
+++ b/docs/api/covidcast-signals/nchs-mortality.md
@@ -8,13 +8,29 @@ nav_order: 1
# NCHS Mortality Data
{: .no_toc}
-* **Source name:** `nchs-mortality`
-* **Earliest issue available:** Epiweek 50 2020 (6-12 December 2020)
-* **Number of data revisions since May 19, 2020:** 0
-* **Date of last change:** Never
-* **Available for:** state (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** week (see [date format docs](../covidcast_times.md))
-* **License:** [NCHS Data Use Agreement](https://www.cdc.gov/nchs/data_access/restrictions.htm)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `nchs-mortality` |
+| **Data Source** | [National Center for Health Statistics (NCHS)](https://www.cdc.gov/nchs/nvss/vsrr/COVID19/index.htm) |
+| **Geographic Levels** | State (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Weekly (see [date format docs](../covidcast_times.md))|
+| **Reporting Cadence** | Weekly |
+| **Date of last data revision:** | Never (see [data revision docs](#changelog)) |
+| **Temporal Scope Start** | 2020w05 with some variation by geography |
+| **License** | [NCHS Data Use Agreement](https://www.cdc.gov/nchs/data_access/restrictions.htm) |
+
+## Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+No changes so far.
+
+
+
+## Overview
This data source of national provisional death counts is based on death
certificate data received and coded by the National Center for Health Statistics
@@ -71,7 +87,7 @@ We report the NCHS Mortality data in a weekly format (`time_type=week` &
`time_value={YYYYWW}`, where `YYYYWW` refers to an epiweek). The CDC defines
the [epiweek](https://web.archive.org/web/20210623224758/https://wwwn.cdc.gov/nndss/document/MMWR_Week_overview.pdf) as
seven days, from Sunday to Saturday. We check the week-ending dates provided in
-the NCHS morality data and use Python package
+the NCHS mortality data and use Python package
[epiweeks](https://pypi.org/project/epiweeks/) to convert them into epiweek
format.
diff --git a/docs/api/covidcast-signals/nhsn.md b/docs/api/covidcast-signals/nhsn.md
index 2fc89afd7..313efa282 100644
--- a/docs/api/covidcast-signals/nhsn.md
+++ b/docs/api/covidcast-signals/nhsn.md
@@ -7,15 +7,31 @@ nav_order: 1
# National Healthcare Safety Network Respiratory Hospitalizations
{: .no_toc}
-* **Source name:** `nhsn`
-* **Earliest issue available:** November 19, 2024
-* **Number of data revisions since 18 Nov 2024:** 0
-* **Date of last change:** Never
-* **Available for:** state, hhs, nation (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** week (see [date format docs](../covidcast_times.md))
-* **License:** [Public Domain US Government](https://www.usa.gov/government-works)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `nhsn` |
+| **Data Source** | [The National Healthcare Safety Network (NHSN)](https://www.cdc.gov/nhsn/index.html) |
+| **Geographic Levels** | National, U.S. HHS Region, State (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Weekly (Sunday to Saturday) (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Weekly |
+| **Date of last data revision:** | Never (see [data revision docs](#changelog)) |
+| **Temporal Scope Start** | 2020-08-08 |
+| **License** | [Public Domain US Government](https://www.usa.gov/government-works) |
+
+## Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+No changes so far.
+
+
+
## Overview
+{: .no_toc}
[The National Healthcare Safety Network (NHSN)](https://www.cdc.gov/nhsn/index.html) is the nation’s most widely used healthcare-associated infection tracking system.
This dataset reports preliminary and finalized weekly hospital respiratory data and metrics aggregated to national and state/territory levels reported to the CDC’s National Health Safety Network (NHSN). Values are available for reference dates beginning August 2020.
@@ -30,21 +46,27 @@ For reference dates in May 2024, NHSN received data from 78% of US EDs.
State and nation-level values are pulled directly from the source; HHS-level values are aggregated up from the state level.
+### Available Signals
+{: .no_toc}
-| Signal | Description |
-|------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| `confirmed_admissions_covid_ew` | Total number of patients hospitalized with confirmed COVID-19 over the entire week (Sunday-Saturday). Only includes hospitalizations whose report was received before the Friday or Saturday of the following week.
**Earliest date available:** 2020-08-08 |
-| `hosprep_confirmed_admissions_covid_ew` | Total number of number of hospitals reporting new admissions with confirmed COVID-19 over the entire week (Sunday-Saturday). Only includes hospitalizations whose report was received before the Friday or Saturday of the following week.
**Earliest date available:** 2020-08-08 |
-| `confirmed_admissions_covid_ew_prelim` | Total number of patients hospitalized with confirmed COVID-19 over the entire week (Sunday-Saturday). Only includes hospitalizations whose report was received before the Wednesday of the following week.
**Earliest date available:** 2020-08-08 |
-| `hosprep_confirmed_admissions_covid_ew_prelim` | Total number of number of hospitals reporting new admissions with confirmed COVID-19 over the entire week (Sunday-Saturday). Only includes hospitalizations whose report was received before the Wednesday of the following week.
**Earliest date available:** 2020-08-08 |
-| `confirmed_admissions_flu_ew` | Total number of patients hospitalized with confirmed influenza over the entire week (Sunday-Saturday). Only includes hospitalizations whose report was received before the Friday or Saturday of the following week.
**Earliest date available:** 2020-08-08 |
-| `hosprep_confirmed_admissions_flu_ew` | Total number of hospitals reporting new admissions with confirmed influenza over the entire week (Sunday-Saturday). Only includes hospitalizations whose report was received before the Friday or Saturday of the following week.
**Earliest date available:** 2020-08-08 |
-| `confirmed_admissions_flu_ew_prelim` | Total number of patients hospitalized with confirmed influenza over the entire week (Sunday-Saturday). Only includes hospitalizations whose report was received before the Wednesday of the following week.
**Earliest date available:** 2020-08-08 |
-| `hosprep_confirmed_admissions_flu_ew_prelim` | Total number of number of hospitals reporting new admissions with confirmed influenza over the entire week (Sunday-Saturday). Only includes hospitalizations whose report was received before the Wednesday of the following week.
**Earliest date available:** 2020-08-08 |
-| `confirmed_admissions_rsv_ew` | Total number of patients hospitalized with confirmed RSV over the entire week (Sunday-Saturday). Only includes hospitalizations whose report was received before the Friday or Saturday of the following week.
**Earliest date available:** 2020-08-08 |
-| `hosprep_confirmed_admissions_rsv_ew` | Total number of number of hospitals reporting new admissions with confirmed RSV over the entire week (Sunday-Saturday). Only includes hospitalizations whose report was received before the Friday or Saturday of the following week.
**Earliest date available:** 2020-08-08 |
-| `confirmed_admissions_rsv_ew_prelim` | Total number of patients hospitalized with confirmed RSV over the entire week (Sunday-Saturday). Only includes hospitalizations whose report was received before the Wednesday of the following week.
**Earliest date available:** 2020-08-08 |
-| `hosprep_confirmed_admissions_rsv_ew_prelim` | Total number of number of hospitals reporting new admissions with confirmed RSV over the entire week (Sunday-Saturday). Only includes hospitalizations whose report was received before the Wednesday of the following week.
**Earliest date available:** 2020-08-08 |
+* **Reporting Cutoffs:**
+ * **Finalized Signals:** Data received by Friday/Saturday of the following week (~6-7 day lag).
+ * **Preliminary (`_prelim`) Signals:** Data received by Wednesday of the following week (~4 day lag).
+
+| Signal Name | Pathogen | Metric Description | Version |
+| :--- | :--- | :--- | :--- |
+| `confirmed_admissions_covid_ew` | COVID-19 | **Patient Count:** Total hospitalized patients. | Finalized |
+| `confirmed_admissions_covid_ew_prelim` | COVID-19 | **Patient Count:** Total hospitalized patients. | Preliminary |
+| `hosprep_confirmed_admissions_covid_ew` | COVID-19 | **Facility Count:** Number of hospitals reporting admissions. | Finalized |
+| `hosprep_confirmed_admissions_covid_ew_prelim` | COVID-19 | **Facility Count:** Number of hospitals reporting admissions. | Preliminary |
+| `confirmed_admissions_flu_ew` | Influenza | **Patient Count:** Total hospitalized patients. | Finalized |
+| `confirmed_admissions_flu_ew_prelim` | Influenza | **Patient Count:** Total hospitalized patients. | Preliminary |
+| `hosprep_confirmed_admissions_flu_ew` | Influenza | **Facility Count:** Number of hospitals reporting admissions. | Finalized |
+| `hosprep_confirmed_admissions_flu_ew_prelim` | Influenza | **Facility Count:** Number of hospitals reporting admissions. | Preliminary |
+| `confirmed_admissions_rsv_ew` | RSV | **Patient Count:** Total hospitalized patients. | Finalized |
+| `confirmed_admissions_rsv_ew_prelim` | RSV | **Patient Count:** Total hospitalized patients. | Preliminary |
+| `hosprep_confirmed_admissions_rsv_ew` | RSV | **Facility Count:** Number of hospitals reporting admissions. | Finalized |
+| `hosprep_confirmed_admissions_rsv_ew_prelim` | RSV | **Facility Count:** Number of hospitals reporting admissions. | Preliminary |
## Table of Contents
diff --git a/docs/api/covidcast-signals/nssp.md b/docs/api/covidcast-signals/nssp.md
index 8e988a25b..99d2056b1 100644
--- a/docs/api/covidcast-signals/nssp.md
+++ b/docs/api/covidcast-signals/nssp.md
@@ -7,31 +7,49 @@ nav_order: 1
# National Syndromic Surveillance Program Emergency Department Visits
{: .no_toc}
-* **Source name:** `nssp`
-* **Earliest issue available:** April 17, 2024
-* **Number of data revisions since 19 May 2020:** 0
-* **Date of last change:** Never
-* **Available for:** county, hrr, msa, state, hhs, nation (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** week (see [date format docs](../covidcast_times.md))
-* **License:** [Public Domain US Government](https://www.usa.gov/government-works)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `nssp` |
+| **Data Source** | [The National Syndromic Surveillance Program (NSSP)](https://www.cdc.gov/nssp/php/about/index.html) |
+| **Geographic Levels** | National, U.S. HHS Region, State (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Weekly (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Weekly |
+| **Date of last data revision:** | Never (see [data revision docs](#changelog)) |
+| **Temporal Scope Start** | 2022-10-01 |
+| **License** | [Public Domain US Government](https://www.usa.gov/government-works) |
+
+## Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+No changes so far.
+
+
## Overview
+{: .no_toc}
[The National Syndromic Surveillance Program (NSSP)](https://www.cdc.gov/nssp/php/about/index.html) is an effort to track epidemiologically relevant conditions.
This dataset in particular tracks emergency department (ED) visits arising from a subset of influenza-like illnesses, specifically influenza, COVID-19, and respiratory syncytial virus (RSV).
It is derived from the CDC's [Respiratory Virus Response NSSP Emergency Department Visit Trajectories dataset](https://data.cdc.gov/Public-Health-Surveillance/2023-Respiratory-Virus-Response-NSSP-Emergency-Dep/rdmq-nq56/about_data), which started reporting data in late 2022.
As of May 2024, NSSP received data from 78% of US EDs.
-| Signal | Description |
-|---------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
-| `pct_ed_visits_covid` | Percent of ED visits that had a discharge diagnosis code of COVID-19
**Earliest date available:** 2022-10-01 |
-| `pct_ed_visits_influenza` | Percent of ED visits that had a discharge diagnosis code of influenza
**Earliest date available:** 2022-10-01 |
-| `pct_ed_visits_rsv` | Percent of ED visits that had a discharge diagnosis code of rsv
**Earliest date available:** 2022-10-01 |
-| `pct_ed_visits_combined` | Percent of ED visits that had a discharge diagnosis code of COVID-19, influenza, or rsv
**Earliest date available:** 2022-10-01 |
-| `smoothed_pct_ed_visits_covid` | 3 week moving average of `pct_ed_visits_covid`
**Earliest date available:** 2022-10-01 |
-| `smoothed_pct_ed_visits_influenza` | 3 week moving average of `pct_ed_visits_influenza`
**Earliest date available:** 2022-10-01 |
-| `smoothed_pct_ed_visits_rsv` | 3 week moving average of `pct_ed_visits_rsv`
**Earliest date available:** 2022-10-01 |
-| `smoothed_pct_ed_visits_combined` | 3 week moving average of `pct_ed_visits_combined`
**Earliest date available:** 2022-10-01 |
+
+### Available Signals
+{: .no_toc}
+
+* **Raw Signals** (`pct_ed_visits_...`) represent the weekly percentage of ED visits for the specific pathogen.
+* **Smoothed Signals** (`smoothed_pct_ed_visits_...`) represent a **3-week moving average** of the raw signal.
+
+| Signal Pair (Raw / Smoothed) | Pathogen | Description |
+| :--- | :--- | :--- |
+| `pct_ed_visits_covid`
`smoothed_pct_ed_visits_covid` | **COVID-19** | Percentage of ED visits with a discharge diagnosis of COVID-19. |
+| `pct_ed_visits_influenza`
`smoothed_pct_ed_visits_influenza` | **Influenza** | Percentage of ED visits with a discharge diagnosis of Influenza. |
+| `pct_ed_visits_rsv`
`smoothed_pct_ed_visits_rsv` | **RSV** | Percentage of ED visits with a discharge diagnosis of RSV. |
+| `pct_ed_visits_combined`
`smoothed_pct_ed_visits_combined` | **Combined** | Percentage of ED visits with a diagnosis of **any** of the above (COVID, Flu, or RSV). | |
## Table of Contents
{: .no_toc .text-delta}
diff --git a/docs/api/covidcast-signals/quidel.md b/docs/api/covidcast-signals/quidel.md
index 430339291..3894ae71e 100644
--- a/docs/api/covidcast-signals/quidel.md
+++ b/docs/api/covidcast-signals/quidel.md
@@ -8,25 +8,45 @@ nav_order: 1
# Quidel
{: .no_toc}
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `quidel` |
+| **Data Source** | QuidelOrtho Corp. |
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **License** | [CC BY](../covidcast_licensing.md#creative-commons-attribution) |
+
## Table of Contents
{: .no_toc .text-delta}
1. TOC
{:toc}
-## Accessibility: Delphi-internal only
+**Accessibility: Delphi-internal only**
## Quidel COVID-19 Tests
+{: .no_toc}
+
+| Attribute | Details |
+| :--- | :--- |
+| **Geographic Levels** | National, U.S. HHS Region, State, County, Hospital Referral Region (HRR), Metropolitan Statistical Area (MSA) (see [geography coding docs](../covidcast_geography.md)) |
+| **Reporting Cadence** | Daily |
+| **Date of last data revision:** | October 22, 2020 (see [data revision docs](#changelog-covid-19-tests)) |
+| **Temporal Scope Start** | 2020-05-26 |
+
+### Changelog COVID-19 Tests
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+#### October 22, 2020
+We went from a custom geo mapping file (for aggregating from zip->(county, msa, hrr, state)) to a central geo file based on rigorously sourced US census data.
-* **Source name:** `quidel`
-* **Earliest issue available:** July 29, 2020
-* **Number of data revisions since May 19, 2020:** 1
-* **Date of last change:** October 22, 2020
-* **Available for:** county, hrr, msa, state, HHS, nation (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** [CC BY](../covidcast_licensing.md#creative-commons-attribution)
+
### Overview
+{: .no_toc}
Data source based on COVID-19 Antigen tests, provided to us by Quidel, Inc. When
a patient (whether at a doctor’s office, clinic, or hospital) has COVID-like
@@ -54,7 +74,7 @@ meaningful levels starting May 26, 2020.
| `covid_ag_smoothed_pct_positive_age_65plus` | Percentage of antigen tests that were positive for COVID-19 (ages 65+), smoothed by pooling together the last 7 days of tests.
**Earliest date available:** 2020-05-26 |
| `covid_ag_smoothed_pct_positive_age_0_17` | Percentage of antigen tests that were positive for COVID-19 (ages 0-17), smoothed by pooling together the last 7 days of tests.
**Earliest date available:** 2020-05-26 |
-### Estimation
+## Estimation
The source data from which we derive our estimates contains a number of features
for every test, including localization at 5-digit Zip Code level, a TestDate and
@@ -80,7 +100,7 @@ We estimate p across 6 temporal-spatial aggregation schemes:
- daily, at the HHS level;
- daily, at the US national level.
-#### Standard Error
+### Standard Error
We assume the estimates for each time point follow a binomial distribution. The
estimated standard error then is:
@@ -89,11 +109,11 @@ $$
\text{se} = 100 \sqrt{ \frac{\frac{p}{100}(1- \frac{p}{100})}{N} }
$$
-#### Smoothing
+### Smoothing
We add two kinds of smoothing to the smoothed signals:
-##### Temporal Smoothing
+#### Temporal Smoothing
Smoothed estimates are formed by pooling data over time. That is, daily, for
each location, we first pool all data available in that location over the last 7
days, and we then recompute everything described in the two subsections above.
@@ -101,7 +121,7 @@ days, and we then recompute everything described in the two subsections above.
Pooling in this way makes estimates available in more geographic areas, as many areas
report very few tests per day, but have enough data to report when 7 days are considered.
-##### Geographical Smoothing
+#### Geographical Smoothing
**County, MSA and HRR levels**: In a given County, MSA or HRR, suppose $$N$$ COVID tests
are taken in a certain time period, $$X$$ is the number of tests taken with positive
@@ -165,15 +185,25 @@ that day will not include it.
These signals are inactive. They were updated until May 19, 2020.
-* **Source name:** `quidel`
-* **Earliest issue available:** April 29, 2020
-* **Last issued:** May 19, 2020
-* **Number of data revisions since May 19, 2020:** 0
-* **Date of last change:** Never
-* **Available for:** msa, state (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
+| Attribute | Details |
+| :--- | :--- |
+| **Geographic Levels** | State, Metropolitan Statistical Area (MSA) (see [geography coding docs](../covidcast_geography.md)) |
+| **Reporting Cadence** | Inactive - No longer updated since 2020-05-01 |
+| **Date of last data revision:** | Never (see [data revision docs](#changelog-flu-tests)) |
+| **Temporal Scope Start** | 2020-01-31 |
+
+### Changelog Flu Tests
+
+
+Click to expand
+
+#### October 22, 2020
+We went from a custom geo mapping file (for aggregating from zip->(county, msa, hrr, state)) to a central geo file based on rigorously sourced US census data.
+
+
### Overview
+{: .no_toc}
Data source based on flu lab tests, provided to us by Quidel, Inc. When a
patient (whether at a doctor’s office, clinic, or hospital) has COVID-like
diff --git a/docs/api/covidcast-signals/safegraph.md b/docs/api/covidcast-signals/safegraph.md
index 96775de0f..f8369f91a 100644
--- a/docs/api/covidcast-signals/safegraph.md
+++ b/docs/api/covidcast-signals/safegraph.md
@@ -1,16 +1,20 @@
---
+parent: Inactive Sources (COVIDcast)
+grand_parent: Data Sources and Signals
title: inactive SafeGraph
-parent: Data Sources and Signals
-grand_parent: Main Endpoint (COVIDcast)
-nav_order: 2
---
# SafeGraph
{: .no_toc}
-* **Source name:** `safegraph`
-* **Available for:** county, MSA, HRR, state (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** [CC BY](../covidcast_licensing.md#creative-commons-attribution)
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `safegraph` |
+| **Data Source** | SafeGraph |
+| **Geographic Levels** | State, County, Hospital Referral Region (HRR), Metropolitan Statistical Area (MSA) (see [geography coding docs](../covidcast_geography.md))|
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **Temporal Scope Start** | January 1st, 2019 |
+| **License** | [CC BY](../covidcast_licensing.md#creative-commons-attribution) |
This data source uses data reported by [SafeGraph](https://www.safegraph.com/)
using anonymized location data from mobile phones. From June 2020-July 2022,
@@ -25,11 +29,29 @@ surface signals from two such datasets.
## SafeGraph Social Distancing Metrics
-* **Earliest issue available:** June 20, 2020
-* **Number of data revisions since June 23, 2020:** 1
-* **Date of last change:** November 3, 2020
+| Attribute | Details |
+| **Date of last data revision:** | November 3rd, 2020 (see [data revision docs](#changelog-social-distancing-metrics)) |
+| **Reporting Cadence** | Inactive - No longer updated after April 19th, 2021. |
+
+### Changelog (Social Distancing Metrics)
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+#### April 19th, 2021
+
+The Safegraph social distancing metrics are no longer being updated. Weekly patterns are still available.
+
+#### November 3rd, 2020
+
+We went from a custom geo mapping file (for aggregating from county->state) to a central geo file based on rigorously sourced US census data.
+
+
-**This dataset is no longer updated after April 19th, 2021.**
+### Overview
+{: .no_toc}
Data source based on the [Social Distancing Metrics](https://docs.safegraph.com/docs/social-distancing-metrics) data product. SafeGraph
provided this data for individual census block groups, using differential
@@ -76,11 +98,28 @@ additional day for SafeGraph's data to be ingested into the COVIDcast API.
## SafeGraph Weekly Patterns
-* **Earliest issue available:** November 30, 2020
-* **Number of data revisions since June 23, 2020:** 0
-* **Date of last change:** never
+| Attribute | Details |
+| **Date of last data revision:** | Never (see [data revision docs](#changelog-weekly-patterns)) |
+| **Reporting Cadence** | Inactive - No longer updated after May 5th, 2022 |
+
+### Changelog (Weekly Patterns)
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+#### July 15th, 2022
+The Safegraph Weekly Patterns dataset is no longer updated.
-**This dataset is no longer updated after July 15th, 2022.**
+#### November 3rd, 2020
+
+We went from a custom geo mapping file (for aggregating from county->state) to a central geo file based on rigorously sourced US census data.
+
+
+
+### Overview
+{: .no_toc}
Data source based on [Weekly
Patterns](https://docs.safegraph.com/docs/weekly-patterns) dataset. SafeGraph
diff --git a/docs/api/covidcast-signals/usa-facts.md b/docs/api/covidcast-signals/usa-facts.md
index 3c972cfcd..f7763c93f 100644
--- a/docs/api/covidcast-signals/usa-facts.md
+++ b/docs/api/covidcast-signals/usa-facts.md
@@ -1,20 +1,41 @@
---
+parent: Inactive Sources (COVIDcast)
+grand_parent: Data Sources and Signals
title: inactive USAFacts Cases and Deaths
-parent: Data Sources and Signals
-grand_parent: Main Endpoint (COVIDcast)
-nav_order: 2
---
# USAFacts Cases and Deaths
{: .no_toc}
-* **Source name:** `usa-facts`
-* **Earliest issue available:** June 24, 2020
-* **Number of data revisions since May 19, 2020:** 2
-* **Date of last change:** [November 3, 2020](../covidcast_changelog.md#usa-facts)
-* **Available for:** county, hrr, msa, state (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** [CC BY](#source-and-licensing)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `usa-facts` |
+| **Data Source** | [USAFacts](https://usafacts.org/) |
+| **Geographic Levels** | National, U.S. HHS Region, State/ADM 1, County/ADM 2, Hospital Referral Region (HRR), Metropolitan Statistical Area (MSA) (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Inactive - No longer updated since 2023-01-02 |
+| **Date of last data revision:** | November 3, 2020 (see [data revision docs](#changelog)) |
+| **Temporal Scope Start** | 2020-01-25 |
+| **License** | [CC BY](#source-and-licensing) |
+
+## Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+### November 3, 2020
+We went from a custom geo mapping file (for aggregating from county->(msa, hrr, state)) to a central geo file based on rigorously sourced US census data.
+
+### October 12, 2020
+
+The 10 October 2020 issue of all `usa-facts` deaths signals has been removed from the API. The file for deaths provided by USAFacts on 10 October included case data instead. The resulting spurious 100× increase in magnitude of COVIDcast `usa-facts` deaths signals was noticed on 11 October and repaired on 12 October. Subsequent issues have adequate coverage of all regions and dates included in the 10 October issue, so this change only affects forecasters that intend to pull training data with an `as_of` or `issues` parameter set to 20201010.
+
+
+
+
+## Overview
This data source of confirmed COVID-19 cases and deaths is based on reports made
available by [USAFacts](https://usafacts.org/).
diff --git a/docs/api/covidcast-signals/youtube-survey.md b/docs/api/covidcast-signals/youtube-survey.md
index 5b376f913..27c86fd63 100644
--- a/docs/api/covidcast-signals/youtube-survey.md
+++ b/docs/api/covidcast-signals/youtube-survey.md
@@ -1,8 +1,7 @@
---
+parent: Inactive Sources (COVIDcast)
+grand_parent: Data Sources and Signals
title: inactive Youtube Survey
-parent: Data Sources and Signals
-grand_parent: Main Endpoint (COVIDcast)
-nav_order: 2
---
[//]: # (code at https://github.com/cmu-delphi/covid-19/tree/deeb4dc1e9a30622b415361ef6b99198e77d2a94/youtube)
@@ -10,13 +9,27 @@ nav_order: 2
# Youtube Survey
{: .no_toc}
-* **Source name:** `youtube-survey`
-* **Earliest issue available:** May 01, 2020
-* **Number of data revisions since May 19, 2020:** 0
-* **Date of last change:** Never
-* **Available for:** state (see [geography coding docs](../covidcast_geography.md))
-* **Time type:** day (see [date format docs](../covidcast_times.md))
-* **License:** [CC BY-NC](../covidcast_licensing.md#creative-commons-attribution-noncommercial)
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `youtube-survey` |
+| **Data Source** | Google/Delphi |
+| **Geographic Levels** | State (see [geography coding docs](../covidcast_geography.md)) |
+| **Temporal Granularity** | Daily (see [date format docs](../covidcast_times.md)) |
+| **Reporting Cadence** | Inactive - No longer updated after June 22nd, 2020 |
+| **Date of last data revision:** | Never (see [data revision docs](#changelog)) |
+| **License** | [CC BY-NC](../covidcast_licensing.md#creative-commons-attribution-noncommercial) |
+| **Temporal Scope Start** | April 21st, 2020 |
+
+## Changelog
+
+
+Click to expand
+
+See [COVIDcast Signal Changes](../covidcast_changelog.md) for general information about how we track changes to signals.
+
+No changes have been made to this signal.
+
+
## Overview
diff --git a/docs/api/covidcast.md b/docs/api/covidcast.md
index d283fb8a8..8415adfb8 100644
--- a/docs/api/covidcast.md
+++ b/docs/api/covidcast.md
@@ -1,7 +1,7 @@
---
title: Main Endpoint (COVIDcast)
has_children: true
-nav_order: 2
+nav_order: 1
---
# Main Epidata API
@@ -18,15 +18,8 @@ selected geographical areas---counties, states, metropolitan statistical areas,
and other divisions.
-Get
-updates: Delphi operates a
mailing
-list for users of the COVIDcast API. We will use the list to announce API
-changes, corrections to data, and new features; API users may also use the
-mailing list to ask general questions about its use. If you use the API, we
-strongly encourage you to
subscribe.
-
+> **Get updates:** Delphi operates a [mailing list](https://lists.andrew.cmu.edu/mailman/listinfo/delphi-covidcast-api) for users of the COVIDcast API. We will use the list to announce API changes, corrections to data, and new features; API users may also use the mailing list to ask general questions about its use. If you use the API, we strongly encourage you to [subscribe](https://lists.andrew.cmu.edu/mailman/listinfo/delphi-covidcast-api).
+{: .important }
## Table of contents
{: .no_toc .text-delta}
@@ -53,16 +46,15 @@ CSV file.
Several [API clients are available](covidcast_clients.md) for common programming
languages, so you do not need to construct API calls yourself to obtain
COVIDcast data. Once you install the appropriate client for your programming
-language, accessing data is as easy as, in [R](https://www.r-project.org/):
-
-```r
-library(epidatr)
+language, accessing data is as easy as:
-data <- pub_covidcast('fb-survey', 'smoothed_cli', 'county', 'day', geo_values = '06001',
- time_values = c(20200401, 20200405:20200414))
-```
+
+
-or, in [Python](https://www.python.org):
+
```python
from epidatpy import EpiDataContext, EpiRange
@@ -78,12 +70,23 @@ apicall = epidata.pub_covidcast(
)
data = apicall.df()
```
+
+
+
+
+```r
+library(epidatr)
+
+data <- pub_covidcast('fb-survey', 'smoothed_cli', 'county', 'day', geo_values = '06001',
+ time_values = c(20200401, 20200405:20200414))
+```
+
+
[The API clients](covidcast_clients.md) have extensive documentation providing
further examples.
-Alternately, to construct URLs and parse responses to access data manually, [see
-below](#constructing-api-queries) for details.
+Alternatively, to manually construct URLs and parse responses to access data, [refer to this section](covidcast_api_queries.md).
## Data Sources and Signals
@@ -95,7 +98,7 @@ including confirmed cases, symptom-related search queries, hospitalizations,
outpatient doctor's visits, and other sources. Many of these are publicly
available *only* through the COVIDcast API.
-Delphi's COVID-19 Surveillance Streams data includes the following data sources.
+Delphi's COVID-19 indicators data includes the following data sources.
Data from most of these sources is typically updated daily. You can use the
[`covidcast_meta`](covidcast_meta.md) endpoint to get summary information
about the ranges of the different attributes for the different data sources.
@@ -118,11 +121,11 @@ dashboard](https://delphi.cmu.edu/covidcast/):
| Kind | Name | Source | Signal |
|---|---|---|---|
-| Public Behavior | People Wearing Masks | [`fb-survey`](covidcast-signals/fb-survey.md) | `smoothed_wwearing_mask_7d` |
-| Public Behavior | Vaccine Acceptance | [`fb-survey`](covidcast-signals/fb-survey.md) | `smoothed_wcovid_vaccinated_appointment_or_accept` |
+| Public Behavior | People Wearing Masks | [`fb-survey`](covidcast-signals/covid-trends-and-impact-survey.md) | `smoothed_wwearing_mask_7d` |
+| Public Behavior | Vaccine Acceptance | [`fb-survey`](covidcast-signals/covid-trends-and-impact-survey.md) | `smoothed_wcovid_vaccinated_appointment_or_accept` |
| Public Behavior | COVID Symptom Searches on Google | [`google-symptoms`](covidcast-signals/google-symptoms.md) | `sum_anosmia_ageusia_smoothed_search` |
-| Early Indicators | COVID-Like Symptoms | [`fb-survey`](covidcast-signals/fb-survey.md) | `smoothed_wcli` |
-| Early Indicators | COVID-Like Symptoms in Community | [`fb-survey`](covidcast-signals/fb-survey.md) | `smoothed_whh_cmnty_cli` |
+| Early Indicators | COVID-Like Symptoms | [`fb-survey`](covidcast-signals/covid-trends-and-impact-survey.md) | `smoothed_wcli` |
+| Early Indicators | COVID-Like Symptoms in Community | [`fb-survey`](covidcast-signals/covid-trends-and-impact-survey.md) | `smoothed_whh_cmnty_cli` |
| Early Indicators | COVID-Related Doctor Visits | [`doctor-visits`](covidcast-signals/doctor-visits.md) | `smoothed_adj_cli` |
| Cases and Testing | COVID Cases | [`jhu-csse`](covidcast-signals/jhu-csse.md) | `confirmed_7dav_incidence_prop` |
| Late Indicators | COVID Hospital Admissions | [`hhs`](covidcast-signals/hhs.md) | `confirmed_admissions_covid_1d_prop_7dav` |
@@ -131,180 +134,4 @@ dashboard](https://delphi.cmu.edu/covidcast/):
### All Available Sources and Signals
Beyond the signals available on the COVIDcast dashboard, numerous other signals are
-available through our [data export tool](https://delphi.cmu.edu/covidcast/export/) or directly through the API.
-
-## Constructing API Queries
-
-The COVIDcast API is based on HTTP GET queries and returns data in JSON form.
-The base URL is `https://api.delphi.cmu.edu/epidata/covidcast/`.
-
-See [this documentation](README.md) for details on specifying epiweeks, dates,
-and lists.
-
-### Query Parameters
-
-#### Required
-
-| Parameter | Description | Type |
-| --- | --- | --- |
-| `data_source` | name of upstream data source (e.g., `doctor-visits` or `fb-survey`; [see full list](covidcast_signals.md)) | string |
-| `signal` | name of signal derived from upstream data (see notes below) | string |
-| `time_type` | temporal resolution of the signal (e.g., `day`, `week`; see [date coding details](covidcast_times.md)) | string |
-| `geo_type` | spatial resolution of the signal (e.g., `county`, `hrr`, `msa`, `dma`, `state`) | string |
-| `time_values` | time unit (e.g., date) over which underlying events happened | `list` of time values (e.g., 20200401) |
-| `geo_value` | unique code for each location, depending on `geo_type` (see [geographic coding details](covidcast_geography.md)), or `*` for all | string |
-
-The current set of signals available for each data source is returned by the
-[`covidcast_meta`](covidcast_meta.md) endpoint.
-
-#### Alternate Required Parameters
-
-The following parameters help specify multiple source-signal, timetype-timevalue or geotype-geovalue pairs. Use them instead of the usual required parameters.
-
-| Parameter | Replaces | Format | Description | Example |
-| --- | --- | --- | --- | --- |
-| `signal` | `data_source`, `signal` | `signal={source}:{signal1},{signal2}` | Specify multiple source-signal pairs, grouped by source | `signal=src1:sig1`, `signal=src1:sig1,sig2`, `signal=src1:*`, `signal=src1:sig1;src2:sig3` |
-| `time` | `time_type`, `time_values` | `time={timetype}:{timevalue1},{timevalue2}` | Specify multiple timetype-timevalue pairs, grouped by timetype | `time=day:*`, `time=day:20201201`, `time=day:20201201,20201202`, `time=day:20201201-20201204` |
-| `geo` | `geo_type`, `geo_value` | `geo={geotype}:{geovalue1},{geovalue2}` | Specify multiple geotype-geovalue pairs, grouped by geotype | `geo=fips:*`, `geo=fips:04019`, `geo=fips:04019,19143`, `geo=fips:04019;msa:40660`, `geo=fips:*;msa:*` |
-
-#### Optional
-
-Estimates for a specific `time_value` and `geo_value` are sometimes updated
-after they are first published. Many of our data sources issue corrections or
-backfill estimates as data arrives; see the [documentation for each source](covidcast_signals.md)
-for details.
-
-The default API behavior is to return the most recently issued value for each
-`time_value` selected.
-
-We also provide access to previous versions of data using the optional query
-parameters below.
-
-| Parameter | Description | Type |
-| --- | --- | --- |
-| `as_of` | maximum time unit (e.g., date) when the signal data were published (return most recent for each `time_value`) | time value (e.g., 20200401) |
-| `issues` | time unit (e.g., date) when the signal data were published (return all matching records for each `time_value`) | `list` of time values (e.g., 20200401) |
-| `lag` | time delta (e.g. days) between when the underlying events happened and when the data were published | integer |
-
-Use cases:
-
-* To pretend like you queried the API on June 1, such that the returned results
- do not include any updates that became available after June 1, use
- `as_of=20200601`.
-* To retrieve only data that was published or updated on June 1, and exclude
- records whose most recent update occurred earlier than June 1, use
- `issues=20200601`.
-* To retrieve all data that was published between May 1 and June 1, and exclude
- records whose most recent update occurred earlier than May 1, use
- `issues=20200501-20200601`. The results will include all matching issues for
- each `time_value`, not just the most recent.
-* To retrieve only data that was published or updated exactly 3 days after the
- underlying events occurred, use `lag=3`.
-
-You should specify only one of these three parameters in any given query.
-
-**Note:** Each issue in the versioning system contains only the records added or updated during that time unit; we exclude records whose values
-remain the same as a previous issue. If you have a research problem that would
-require knowing when we last confirmed an unchanged value, please get in touch.
-
-### Response
-
-| Field | Description | Type |
-| --- | --- | --- |
-| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
-| `epidata` | list of results, 1 per geo/time pair | array of objects |
-| `epidata[].source` | selected `data_source` | string |
-| `epidata[].signal` | selected `signal` | string |
-| `epidata[].geo_type` | selected `geo_type` | string |
-| `epidata[].geo_value` | location code, depending on `geo_type` | string |
-| `epidata[].time_type` | selected `time_type` | string |
-| `epidata[].time_value` | time unit (e.g. date) over which underlying events happened (see [date coding details](covidcast_times.md)) | integer |
-| `epidata[].value` | value (statistic) derived from the underlying data source | float |
-| `epidata[].stderr` | approximate standard error of the statistic with respect to its sampling distribution, `null` when not applicable | float |
-| `epidata[].direction` | trend classifier (+1 -> increasing, 0 -> steady or not determined, -1 -> decreasing) | integer |
-| `epidata[].sample_size` | number of "data points" used in computing the statistic, `null` when not applicable | float |
-| `epidata[].issue` | time unit (e.g. date) when this statistic was published | integer |
-| `epidata[].lag` | time delta (e.g. days) between when the underlying events happened and when this statistic was published | integer |
-| `epidata[].missing_value` | an integer code that is zero when the `value` field is present and non-zero when the data is missing (see [missing codes](missing_codes.md)) | integer |
-| `epidata[].missing_stderr` | an integer code that is zero when the `stderr` field is present and non-zero when the data is missing (see [missing codes](missing_codes.md)) | integer |
-| `epidata[].missing_sample_size` | an integer code that is zero when the `sample_size` field is present and non-zero when the data is missing (see [missing codes](missing_codes.md)) | integer |
-| `message` | `success` or error message | string |
-
-**Note:** `result` code 2, "too many results", means that the number of results
-you requested was greater than the API's maximum results limit. Results will be
-returned, but not all of the results you requested. API clients should check the
-results code and consider breaking up requests for e.g. large time intervals into multiple
-API calls.
-
-### Alternative Response Formats
-
-In addition to the default EpiData Response format, users can customize the response format using the `format=` parameter.
-
-#### JSON List Response
-
-When setting the format parameter to `format=json`, it will return a plain list of the `epidata` response objects without the `result` and `message` wrapper. The status of the query is returned via HTTP status codes. For example, a status code of 200 means the query succeeded, while 400 indicates that the query has a missing, misspelled, or otherwise invalid parameter. For all status codes != 200, the returned JSON includes details about what part of the query couldn't be interpreted.
-
-#### CSV File Response
-
-When setting the format parameter to `format=csv`, it will return a CSV file with same columns as the response objects. HTTP status codes are used to communicate success/failure, similar to `format=json`.
-
-#### JSON New Lines Response
-
-When setting the format parameter to `format=jsonl`, it will return each row as an JSON file separated by a single new line character `\n`. This format is useful for incremental streaming of the results. Similar to the JSON list response status codes are used.
-
-### Limit Returned Fields
-
-The `fields` parameter can be used to limit which fields are included in each returned row. This is useful in web applications to reduce the amount of data transmitted. The `fields` parameter supports two syntaxes: allow and deny. Using allowlist syntax, only the listed fields will be returned. For example, `fields=geo_value,value` will drop all fields from the returned data except for `geo_value` and `value`. To use denylist syntax instead, prefix each field name with a dash (-) to exclude it from the results. For example, `fields=-direction` will include all fields in the returned data except for the `direction` field.
-
-
-## Example URLs
-
-### Facebook Survey CLI on 2020-04-06 to 2010-04-10 (county 06001)
-
-https://api.delphi.cmu.edu/epidata/covidcast/?data_source=fb-survey&signal=smoothed_cli&time_type=day&geo_type=county&time_values=20200406-20200410&geo_value=06001
-
-or
-
-https://api.delphi.cmu.edu/epidata/covidcast/?signal=fb-survey:smoothed_cli&time=day:20200406-20200410&geo=county:06001
-
-Both of these URLs are equivalent and can be used to get the following result:
-
-```json
-{
- "result": 1,
- "epidata": [
- {
- "geo_value": "06001",
- "time_value": 20200407,
- "direction": null,
- "value": 1.1293550689064,
- "stderr": 0.53185454111042,
- "sample_size": 281.0245
- },
- ...
- ],
- "message": "success"
-}
-```
-
-### Facebook Survey CLI on 2020-04-06 (all counties)
-
-https://api.delphi.cmu.edu/epidata/covidcast/?data_source=fb-survey&signal=smoothed_cli&time_type=day&geo_type=county&time_values=20200406&geo_value=*
-
-```json
-{
- "result": 1,
- "epidata": [
- {
- "geo_value": "01000",
- "time_value": 20200406,
- "direction": null,
- "value": 1.1693378,
- "stderr": 0.1909232,
- "sample_size": 1451.0327
- },
- ...
- ],
- "message": "success"
-}
-```
+available through our [data export tool](https://delphi.cmu.edu/covidcast/export/) or directly through the API.
\ No newline at end of file
diff --git a/docs/api/covidcast_api_queries.md b/docs/api/covidcast_api_queries.md
new file mode 100644
index 000000000..c13109d15
--- /dev/null
+++ b/docs/api/covidcast_api_queries.md
@@ -0,0 +1,180 @@
+---
+title: Constructing API Queries
+parent: Main Endpoint (COVIDcast)
+nav_order: 4
+---
+# Constructing API Queries
+
+The COVIDcast API is based on HTTP GET queries and returns data in JSON form.
+The base URL is .
+
+See [this documentation](README.md) for details on specifying epiweeks, dates,
+and lists.
+
+## Query Parameters
+
+### Required
+
+| Parameter | Description | Type |
+| --- | --- | --- |
+| `data_source` | name of upstream data source (e.g., `doctor-visits` or `fb-survey`; [see full list](covidcast_signals.md)) | string |
+| `signal` | name of signal derived from upstream data (see notes below) | string |
+| `time_type` | temporal resolution of the signal (e.g., `day`, `week`; see [date coding details](covidcast_times.md)) | string |
+| `geo_type` | spatial resolution of the signal (e.g., `county`, `hrr`, `msa`, `dma`, `state`) | string |
+| `time_values` | time unit (e.g., date) over which underlying events happened | `list` of time values (e.g., 20200401) |
+| `geo_value` | unique code for each location, depending on `geo_type` (see [geographic coding details](covidcast_geography.md)), or `*` for all | string |
+
+The current set of signals available for each data source is returned by the
+[`covidcast_meta`](covidcast_meta.md) endpoint.
+
+### Alternate Required Parameters
+
+The following parameters help specify multiple source-signal, timetype-timevalue or geotype-geovalue pairs. Use them instead of the usual required parameters.
+
+| Parameter | Replaces | Format | Description | Example |
+| --- | --- | --- | --- | --- |
+| `signal` | `data_source`, `signal` | `signal={source}:{signal1},{signal2}` | Specify multiple source-signal pairs, grouped by source | `signal=src1:sig1`, `signal=src1:sig1,sig2`, `signal=src1:*`, `signal=src1:sig1;src2:sig3` |
+| `time` | `time_type`, `time_values` | `time={timetype}:{timevalue1},{timevalue2}` | Specify multiple timetype-timevalue pairs, grouped by timetype | `time=day:*`, `time=day:20201201`, `time=day:20201201,20201202`, `time=day:20201201-20201204` |
+| `geo` | `geo_type`, `geo_value` | `geo={geotype}:{geovalue1},{geovalue2}` | Specify multiple geotype-geovalue pairs, grouped by geotype | `geo=fips:*`, `geo=fips:04019`, `geo=fips:04019,19143`, `geo=fips:04019;msa:40660`, `geo=fips:*;msa:*` |
+
+### Optional
+
+Estimates for a specific `time_value` and `geo_value` are sometimes updated
+after they are first published. Many of our data sources issue corrections or
+backfill estimates as data arrives; see the [documentation for each source](covidcast_signals.md)
+for details.
+
+The default API behavior is to return the most recently issued value for each
+`time_value` selected.
+
+We also provide access to previous versions of data using the optional query
+parameters below.
+
+| Parameter | Description | Type |
+| --- | --- | --- |
+| `as_of` | maximum time unit (e.g., date) when the signal data were published (return most recent for each `time_value`) | time value (e.g., 20200401) |
+| `issues` | time unit (e.g., date) when the signal data were published (return all matching records for each `time_value`) | `list` of time values (e.g., 20200401) |
+| `lag` | time delta (e.g. days) between when the underlying events happened and when the data were published | integer |
+
+Use cases:
+
+* To pretend like you queried the API on June 1, such that the returned results
+ do not include any updates that became available after June 1, use
+ `as_of=20200601`.
+* To retrieve only data that was published or updated on June 1, and exclude
+ records whose most recent update occurred earlier than June 1, use
+ `issues=20200601`.
+* To retrieve all data that was published between May 1 and June 1, and exclude
+ records whose most recent update occurred earlier than May 1, use
+ `issues=20200501-20200601`. The results will include all matching issues for
+ each `time_value`, not just the most recent.
+* To retrieve only data that was published or updated exactly 3 days after the
+ underlying events occurred, use `lag=3`.
+
+You should specify only one of these three parameters in any given query.
+
+**Note:** Each issue in the versioning system contains only the records added or updated during that time unit; we exclude records whose values
+remain the same as a previous issue. If you have a research problem that would
+require knowing when we last confirmed an unchanged value, please get in touch.
+
+## Response
+
+| Field | Description | Type |
+| --- | --- | --- |
+| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
+| `epidata` | list of results, 1 per geo/time pair | array of objects |
+| `epidata[].source` | selected `data_source` | string |
+| `epidata[].signal` | selected `signal` | string |
+| `epidata[].geo_type` | selected `geo_type` | string |
+| `epidata[].geo_value` | location code, depending on `geo_type` | string |
+| `epidata[].time_type` | selected `time_type` | string |
+| `epidata[].time_value` | time unit (e.g. date) over which underlying events happened (see [date coding details](covidcast_times.md)) | integer |
+| `epidata[].value` | value (statistic) derived from the underlying data source | float |
+| `epidata[].stderr` | approximate standard error of the statistic with respect to its sampling distribution, `null` when not applicable | float |
+| `epidata[].direction` | trend classifier (+1 -> increasing, 0 -> steady or not determined, -1 -> decreasing) | integer |
+| `epidata[].sample_size` | number of "data points" used in computing the statistic, `null` when not applicable | float |
+| `epidata[].issue` | time unit (e.g. date) when this statistic was published | integer |
+| `epidata[].lag` | time delta (e.g. days) between when the underlying events happened and when this statistic was published | integer |
+| `epidata[].missing_value` | an integer code that is zero when the `value` field is present and non-zero when the data is missing (see [missing codes](missing_codes.md)) | integer |
+| `epidata[].missing_stderr` | an integer code that is zero when the `stderr` field is present and non-zero when the data is missing (see [missing codes](missing_codes.md)) | integer |
+| `epidata[].missing_sample_size` | an integer code that is zero when the `sample_size` field is present and non-zero when the data is missing (see [missing codes](missing_codes.md)) | integer |
+| `message` | `success` or error message | string |
+
+**Note:** `result` code 2, "too many results", means that the number of results
+you requested was greater than the API's maximum results limit. Results will be
+returned, but not all of the results you requested. API clients should check the
+results code and consider breaking up requests for e.g. large time intervals into multiple
+API calls.
+
+## Alternative Response Formats
+
+In addition to the default EpiData Response format, users can customize the response format using the `format=` parameter.
+
+### JSON List Response
+
+When setting the format parameter to `format=json`, it will return a plain list of the `epidata` response objects without the `result` and `message` wrapper. The status of the query is returned via HTTP status codes. For example, a status code of 200 means the query succeeded, while 400 indicates that the query has a missing, misspelled, or otherwise invalid parameter. For all status codes != 200, the returned JSON includes details about what part of the query couldn't be interpreted.
+
+### CSV File Response
+
+When setting the format parameter to `format=csv`, it will return a CSV file with same columns as the response objects. HTTP status codes are used to communicate success/failure, similar to `format=json`.
+
+### JSON New Lines Response
+
+When setting the format parameter to `format=jsonl`, it will return each row as an JSON file separated by a single new line character `\n`. This format is useful for incremental streaming of the results. Similar to the JSON list response status codes are used.
+
+## Limit Returned Fields
+
+The `fields` parameter can be used to limit which fields are included in each returned row. This is useful in web applications to reduce the amount of data transmitted. The `fields` parameter supports two syntaxes: allow and deny. Using allowlist syntax, only the listed fields will be returned. For example, `fields=geo_value,value` will drop all fields from the returned data except for `geo_value` and `value`. To use denylist syntax instead, prefix each field name with a dash (-) to exclude it from the results. For example, `fields=-direction` will include all fields in the returned data except for the `direction` field.
+
+
+# Example URLs
+
+## Facebook Survey CLI on 2020-04-06 to 2010-04-10 (county 06001)
+
+
+
+or
+
+
+
+Both of these URLs are equivalent and can be used to get the following result:
+
+```json
+{
+ "result": 1,
+ "epidata": [
+ {
+ "geo_value": "06001",
+ "time_value": 20200407,
+ "direction": null,
+ "value": 1.1293550689064,
+ "stderr": 0.53185454111042,
+ "sample_size": 281.0245
+ },
+ ...
+ ],
+ "message": "success"
+}
+```
+
+## Facebook Survey CLI on 2020-04-06 (all counties)
+
+
+
+```json
+{
+ "result": 1,
+ "epidata": [
+ {
+ "geo_value": "01000",
+ "time_value": 20200406,
+ "direction": null,
+ "value": 1.1693378,
+ "stderr": 0.1909232,
+ "sample_size": 1451.0327
+ },
+ ...
+ ],
+ "message": "success"
+}
+```
diff --git a/docs/api/covidcast_changelog.md b/docs/api/covidcast_changelog.md
index f1efed34e..97ce40e81 100644
--- a/docs/api/covidcast_changelog.md
+++ b/docs/api/covidcast_changelog.md
@@ -1,10 +1,16 @@
---
title: Signal Changelog
parent: Main Endpoint (COVIDcast)
-nav_order: 8
+nav_order: 92
---
-# COVIDcast Signal Changelog
+# COVIDcast Signal Changes
+
+## Table of contents
+{: .no_toc .text-delta}
+
+1. TOC
+{:toc}
When Delphi makes substantial changes to a signal's computation, we will
typically publish it under a new name rather than revising the existing signal.
@@ -17,98 +23,8 @@ we **strongly recommend** that anyone using the API to download data regularly
should subscribe to this list. We will only use the list to announce API
changes, data corrections, and other information relevant to API users.
-For current information on how up-to-date our public health and behavior data is, how much of the country is covered by our public health and behavior data, and the data versioning effects present in our public health and behavior data, please see Delphi's [Indicator Status Overview page](https://delphi.cmu.edu/covidcast/indicator-status/).
-
-## Table of contents
-{: .no_toc .text-delta}
-
-1. TOC
-{:toc}
-
-## Sources and Signals
-### `doctor-visits`
-#### 9 November 2020
-We went from a custom geo-mapping file (for aggregating from county->(msa, hrr, state)) to a central geo file based on rigorously sourced US census data.
-
-### `fb-survey`
-
-#### 3 June 2020
-
-Duplicate survey weights had corrupted historical figures for the following signals and dates. The correct data has been restored to the API.
-* `raw_wcli`
- * `county`: 20200406, 20200408, 20200410, 20200430
- * `hrr`: 20200406, 20200408-20200410, 20200430
- * `msa`: 20200408, 20200410, 20200430
- * `state`: 20200408-20200410, 20200430
-* `smoothed_wcli`
- * `county`: 20200406, 20200408-20200414, 20200430-20200506
- * `hrr`: 20200406-20200415, 20200430-20200506
- * `msa`: 20200408-20200414, 20200430-20200506
- * `state`: 20200408-20200416, 20200430-20200506
-
-#### 20 November 2020
-
-Due to a bug in our data processing system, estimates of the percentage of people reporting that they have been tested for COVID-19 calculated before October 8th were incorrect.
-We incorrectly treated an answer of “no” as a missing response, which affected the `smoothed_tested_14d` and `smoothed_wtested_14d` signals from the `fb-survey` source.
-
-As of Nov. 20th, the error has been corrected and all affected data reissued.
-
-### `hospital-admissions`
-#### 20 October 2020
-We went from a custom geo mapping file (for aggregating from zip->(county, msa, hrr, state)) to a central geo file based on rigorously sourced US census data.
-
-### `jhu-csse`
-
-#### 3 June 2020
-
-We now include figures on Puerto Rico for all `jhu-csse` signals at the state level.
-
-#### 1 September 2020
-
-NY Boroughs county FIPS (36005, 36047, 36061, 36081, 36085) are now split in proportion to the population of each county, instead of being reported in aggregate in FIPS 36061.
-
-#### 7 October 2020
-
-The following changes were made to all `jhu-csse` signals related to geocoding:
-- NY Boroughs county FIPS (36005, 36047, 36061, 36081, 36085) are now [differentiated by JHU](https://github.com/CSSEGISandData/COVID-19/issues/3084),
-- “Unassigned” and “Out of State” counts are assigned to a megaFIPS at the county level (XX000 where XX is the state FIPS code) and will now be incorporated into the state totals
-- The split of the Kansas City, Missouri into its four sub-counties is now done with a more precise population proportion,
-- The split of the Dukes and Nantucket, Massachusetts FIPS codes into the two sub-counties is now done with a more precise population proportion,
-- Some counts are reported in the Utah territories JHU UIDs 84070015-84070020. These are now aggregated properly into the state megaFIPS 49000, which will be aggregated in state-level information.
-
-### `indicator-combination`
-
-#### 3 June 2020
-
-Standard errors are now included in the `nmf_day_doc_fbc_fbs_ght` signal for all geo levels and dates, representing the estimated uncertainty in this signal. This uncertainty comes because the signal is a combination of other signals based on survey estimates or other estimates with margins of error.
-
-* `nmf_day_doc_fbc_fbs_ght`
- * all geo levels
- * all dates
-
-#### 12 October 2020
-
-The 10 October 2020 issue of all `indicator-combination` deaths signals has been removed from the API. These signals are primarily constructed of USAFacts data, whose 10 October 2020 issue was discovered to be corrupt on 11 October and repaired on 12 October. Subsequent issues have adequate coverage of all regions and dates included in the 10 October issue, so this change only affects forecasters who intend to pull training data with an `as_of` or `issues` parameter set to 20201010.
-
-### `quidel`
-
-#### 22 October 2020
-We went from a custom geo mapping file (for aggregating from zip->(county, msa, hrr, state)) to a central geo file based on rigorously sourced US census data.
-
-### `safegraph`
-
-#### 19 April 2021
-
-The Safegraph social distancing metrics are no longer being updated. Weekly patterns are still available.
-
-#### 3 November 2020
-We went from a custom geo mapping file (for aggregating from county->state) to a central geo file based on rigorously sourced US census data.
-
-### `usa-facts`
-
-#### 3 November 2020
-We went from a custom geo mapping file (for aggregating from county->(msa, hrr, state)) to a central geo file based on rigorously sourced US census data.
-
-#### 12 October 2020
-
-The 10 October 2020 issue of all `usa-facts` deaths signals has been removed from the API. The file for deaths provided by USAFacts on 10 October included case data instead. The resulting spurious 100× increase in magnitude of COVIDcast `usa-facts` deaths signals was noticed on 11 October and repaired on 12 October. Subsequent issues have adequate coverage of all regions and dates included in the 10 October issue, so this change only affects forecasters that intend to pull training data with an `as_of` or `issues` parameter set to 20201010.
+For current information on how up-to-date our public health and behavior data
+is, how much of the country is covered by our public health and behavior data,
+and the data versioning effects present in our public health and behavior data,
+please see Delphi's [Indicator Status Overview
+page](https://delphi.cmu.edu/covidcast/indicator-status/).
diff --git a/docs/api/covidcast_clients.md b/docs/api/covidcast_clients.md
index d4fe77699..f852bfafd 100644
--- a/docs/api/covidcast_clients.md
+++ b/docs/api/covidcast_clients.md
@@ -2,8 +2,14 @@
title: API Clients
parent: Main Endpoint (COVIDcast)
nav_order: 1
+nav_exclude: true
+redirect_to: client_libraries.html
---
+
+
+[Redirecting to Client Libraries...](client_libraries.html)
+
# Main Endpoint API Clients
To access COVIDcast data, we recommend using the following client libraries:
diff --git a/docs/api/covidcast_geography.md b/docs/api/covidcast_geography.md
index a88b17cd3..06e93f42b 100644
--- a/docs/api/covidcast_geography.md
+++ b/docs/api/covidcast_geography.md
@@ -1,7 +1,7 @@
---
title: Geographic Coding
parent: Main Endpoint (COVIDcast)
-nav_order: 5
+nav_order: 90
---
# COVIDcast Geographic Coding
diff --git a/docs/api/covidcast_licensing.md b/docs/api/covidcast_licensing.md
index d6efaf62c..db454e737 100644
--- a/docs/api/covidcast_licensing.md
+++ b/docs/api/covidcast_licensing.md
@@ -34,7 +34,7 @@ Academic publications may cite our paper:
These data sources are provided under the terms of the [Creative Commons
Attribution license](https://creativecommons.org/licenses/by/4.0/):
-* [COVID-19 Trends and Impact Survey](covidcast-signals/fb-survey.md)
+* [COVID-19 Trends and Impact Survey](covidcast-signals/covid-trends-and-impact-survey.md)
* [Doctor Visits](covidcast-signals/doctor-visits.md)
* [Hospital Admissions](covidcast-signals/hospital-admissions.md)
* [Indicator Combination](covidcast-signals/indicator-combination.md) (signals with names beginning `nmf_*`)
diff --git a/docs/api/covidcast_meta.md b/docs/api/covidcast_meta.md
index fb5221579..736cafcbf 100644
--- a/docs/api/covidcast_meta.md
+++ b/docs/api/covidcast_meta.md
@@ -14,9 +14,8 @@ geographic levels at which they are reported.
## The API
-The base URL is: https://api.delphi.cmu.edu/epidata/covidcast_meta/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
### Parameters
@@ -24,29 +23,30 @@ None required.
### Response
-| Field | Description | Type |
-|---------------------------|---------------------------------------------------------------------|------------------|
-| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
-| `epidata` | list of results, one per name/geo_type pair | array of objects |
-| `epidata[].data_source` | data source | string |
-| `epidata[].signal` | signal name | string |
-| `epidata[].time_type` | temporal resolution of the signal (e.g., `day`, `week`) | string |
-| `epidata[].geo_type` | geographic resolution (e.g. `county`, `hrr`, `msa`, `dma`, `state`) | string |
-| `epidata[].min_time` | minimum observation time (e.g., 20200406) | integer |
-| `epidata[].max_time` | maximum observation time (e.g., 20200413) | integer |
-| `epidata[].num_locations` | number of distinct geographic locations with data | integer |
-| `epidata[].min_value` | minimum value | float |
-| `epidata[].max_value` | maximum value | float |
-| `epidata[].mean_value` | mean of value | float |
-| `epidata[].stdev_value` | standard deviation of value | float |
-| `epidata[].max_issue` | most recent date data was issued (e.g., 20200710) | integer |
-| `epidata[].min_lag` | smallest lag from observation to issue, in `time_type` units | integer |
-| `epidata[].max_lag` | largest lag from observation to issue, in `time_type` units | integer |
-| `message` | `success` or error message | string |
+| Field | Description | Type |
+|---------------------------|---------------------------------------------------------------------|-------------------|
+| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
+| `epidata` | list of results, one per name/geo_type pair | array of objects |
+| `epidata[].data_source` | data source | string |
+| `epidata[].signal` | signal name | string |
+| `epidata[].time_type` | temporal resolution of the signal (e.g., `day`, `week`) | string |
+| `epidata[].geo_type` | geographic resolution (e.g. `county`, `hrr`, `msa`, `dma`, `state`) | string |
+| `epidata[].min_time` | minimum observation time | integer (YYYYMMDD)|
+| `epidata[].max_time` | maximum observation time | integer (YYYYMMDD)|
+| `epidata[].num_locations` | number of distinct geographic locations with data | integer |
+| `epidata[].min_value` | minimum value | float |
+| `epidata[].max_value` | maximum value | float |
+| `epidata[].mean_value` | mean of value | float |
+| `epidata[].stdev_value` | standard deviation of value | float |
+| `epidata[].last_update` | most recent date when data was updated | integer (YYYYMMDD)|
+| `epidata[].max_issue` | most recent date data was issued | integer (YYYYMMDD)|
+| `epidata[].min_lag` | smallest lag from observation to issue, in `time_type` units | integer |
+| `epidata[].max_lag` | largest lag from observation to issue, in `time_type` units | integer |
+| `message` | `success` or error message | string |
## Example URLs
-https://api.delphi.cmu.edu/epidata/covidcast_meta/
+
```json
{
@@ -74,27 +74,19 @@ https://api.delphi.cmu.edu/epidata/covidcast_meta/
## Code Samples
-Libraries are available for [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js), [Python](https://pypi.org/project/delphi-epidata/), and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
-The following samples show how to import the library and fetch Delphi's COVID-19 Surveillance Streams metadata.
-
-### JavaScript (in a web browser)
+Python and R users are advised to use the dedicated API client, which provides support to return metadata as a data frame. The Python client includes a `metadata()` method for this purpose, while the R client offers a `covidcast_meta()` function to achieve the same.
-````html
-
-
-
-
-````
+Alternatively, libraries are available for [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js), [Python](https://pypi.org/project/delphi-epidata/), and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
+The following samples show how to import the library and fetch Delphi's COVID-19 Surveillance Streams metadata.
-### Python
+
+
-Python users seeking to use the COVIDcast API to fetch data should instead
-consider using the [dedicated API client](covidcast_clients.md), which provides
-a `metadata()` method to return metadata as a data frame.
+
Optionally install the package using pip(env):
````bash
@@ -110,12 +102,9 @@ from delphi_epidata import Epidata
res = Epidata.covidcast_meta()
print(res['result'], res['message'], len(res['epidata']))
````
+
-### R
-
-R users seeking to use the COVIDcast API to fetch data should instead consider
-using the [dedicated API client](covidcast_clients.md), which provides a
-`covidcast_meta()` function to return metadata as a data frame.
+
````R
# Import
@@ -124,3 +113,20 @@ source('delphi_epidata.R')
res <- Epidata$covidcast_meta()
cat(paste(res$result, res$message, length(res$epidata), "\n"))
````
+
+
+
+
+````html
+
+
+
+
+````
+
+
+
diff --git a/docs/api/covidcast_signals.md b/docs/api/covidcast_signals.md
index 1f5ce38b6..9a1f9e418 100644
--- a/docs/api/covidcast_signals.md
+++ b/docs/api/covidcast_signals.md
@@ -30,11 +30,11 @@ dashboard](https://delphi.cmu.edu/covidcast/):
| Kind | Name | Source | Signal |
|---|---|---|---|
-| Public Behavior | People Wearing Masks | [`fb-survey`](covidcast-signals/fb-survey.md) | `smoothed_wwearing_mask_7d` |
-| Public Behavior | Vaccine Acceptance | [`fb-survey`](covidcast-signals/fb-survey.md) | `smoothed_wcovid_vaccinated_appointment_or_accept` |
+| Public Behavior | People Wearing Masks | [`fb-survey`](covidcast-signals/covid-trends-and-impact-survey.md) | `smoothed_wwearing_mask_7d` |
+| Public Behavior | Vaccine Acceptance | [`fb-survey`](covidcast-signals/covid-trends-and-impact-survey.md) | `smoothed_wcovid_vaccinated_appointment_or_accept` |
| Public Behavior | COVID Symptom Searches on Google | [`google-symptoms`](covidcast-signals/google-symptoms.md) | `sum_anosmia_ageusia_smoothed_search` |
-| Early Indicators | COVID-Like Symptoms | [`fb-survey`](covidcast-signals/fb-survey.md) | `smoothed_wcli` |
-| Early Indicators | COVID-Like Symptoms in Community | [`fb-survey`](covidcast-signals/fb-survey.md) | `smoothed_whh_cmnty_cli` |
+| Early Indicators | COVID-Like Symptoms | [`fb-survey`](covidcast-signals/covid-trends-and-impact-survey.md) | `smoothed_wcli` |
+| Early Indicators | COVID-Like Symptoms in Community | [`fb-survey`](covidcast-signals/covid-trends-and-impact-survey.md) | `smoothed_whh_cmnty_cli` |
| Early Indicators | COVID-Related Doctor Visits | [`doctor-visits`](covidcast-signals/doctor-visits.md) | `smoothed_adj_cli` |
| Cases and Testing | COVID Cases | [`jhu-csse`](covidcast-signals/jhu-csse.md) | `confirmed_7dav_incidence_prop` |
| Late Indicators | COVID Hospital Admissions | [`hhs`](covidcast-signals/hhs.md) | `confirmed_admissions_covid_1d_prop_7dav` |
diff --git a/docs/api/covidcast_times.md b/docs/api/covidcast_times.md
index 0eace1551..cd6a38d37 100644
--- a/docs/api/covidcast_times.md
+++ b/docs/api/covidcast_times.md
@@ -1,7 +1,7 @@
---
title: Date Coding and Revisions
parent: Main Endpoint (COVIDcast)
-nav_order: 6
+nav_order: 91
---
# Date Coding and Revisions
@@ -39,7 +39,7 @@ The available time types include:
* `week`: A weekly observation, recording events over 7 days. The `time_value`
and `issue` are reported with a year and a week number ranging from 1 to 53,
in `YYYYWW` format. These weeks are [MMWR
- weeks](https://wwwn.cdc.gov/nndss/document/MMWR_Week_overview.pdf) as defined
+ weeks](https://ndc.services.cdc.gov/wp-content/uploads/MMWR_week_overview.pdf) as defined
by the National Notifiable Diseases Surveillance System, also known as
"epiweeks". (The [API clients](covidcast_clients.md) convert these into date
objects representing the first day of the MMWR week, and for those not using
diff --git a/docs/api/date_formats.md b/docs/api/date_formats.md
new file mode 100644
index 000000000..414d2f6dc
--- /dev/null
+++ b/docs/api/date_formats.md
@@ -0,0 +1,53 @@
+---
+title: Date Formats
+parent: Other Endpoints (COVID-19 and Other Diseases)
+nav_order: 901
+---
+
+# Date Formats
+{: .no_toc}
+
+This page documents the valid date and time formats accepted by various API endpoints.
+
+## Table of contents
+{: .no_toc .text-delta}
+
+1. TOC
+{:toc}
+
+## Epiweeks
+
+Epiweeks (Epidemiological Weeks) use the [U.S. CDC definition](https://ndc.services.cdc.gov/wp-content/uploads/MMWR_week_overview.pdf). That is, the first epiweek each year is the week, starting on a Sunday, containing January 4.
+
+**Format:** `YYYYWW`
+* `YYYY`: Four-digit year
+* `WW`: Two-digit week (01-53)
+
+Example: `201501` represents the first epiweek of 2015.
+
+See [this page](https://www.cmmcp.org/mosquito-surveillance-data/pages/epi-week-calendars-2008-2020) for more information and calendars.
+
+## Dates
+
+Dates generally follow the ISO 8601 basic format, but without hyphens.
+
+**Format:** `YYYYMMDD`
+* `YYYY`: Four-digit year
+* `MM`: Two-digit month (01-12)
+* `DD`: Two-digit day (01-31)
+
+Example: `20150201` represents February 1st, 2015.
+
+## Specifying Lists and Ranges
+
+Many API parameters accept lists of values or ranges.
+
+`list` parameters consist of a comma-separated list of individual values or, for numeric parameters (like epiweeks or dates), a hyphenated range of values.
+
+**Examples:**
+
+* **Single Value:** `param=201530`
+* **List of Values:** `param=201401,201501,201601`
+* **Range:** `param=200501-200552`
+* **Mixed List and Range:** `param=201440,201501-201510`
+* **Date Range:** `param=20070101-20071231`
diff --git a/docs/api/delphi.md b/docs/api/delphi.md
index dae9c672b..4fa6fd594 100644
--- a/docs/api/delphi.md
+++ b/docs/api/delphi.md
@@ -1,29 +1,56 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive Delphi Forecasts
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# Delphi Forecasts
+{: .no_toc}
-This is the documentation of the API for accessing the Delphi Forecast (`delphi`) endpoint of
-the [Delphi](https://delphi.cmu.edu/)'s epidemiological data.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `delphi` |
+| **Data Source** | [Delphi](https://delphi.cmu.edu/) |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Systems available** | `af`, `eb`, `ec`, `sp`, `st` (see [details below](#forecasting-systems)) |
+| **Reporting Cadence** | Inactive - No longer updated since 2020w19 |
+| **Temporal Scope Start** | Varies by system (earliest 2014w41) |
+| **License** | [CC BY](https://creativecommons.org/licenses/by/4.0/) |
+
+## Overview
+{: .no_toc}
+
+This data source provides access to experimental and retrospective Delphi forecasting systems and nowcasting outputs.
General topics not specific to any particular endpoint are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## Delphi Forecast Data
+### Forecasting Systems
+
+The following systems are available, representing different forecasting models for ILINet % weighted ILI:
+
+| Code | Name |
+| :--- | :--- |
+| `af` | [Archefilter](http://reports-archive.adm.cs.cmu.edu/anon/cbd/CMU-CB-16-101.pdf#Appendix.1.B) |
+| `eb` | [Empirical Bayes](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1004382) |
+| `ec` | [Epicast](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005248) |
+| `sp` | [Pinned Spline](http://reports-archive.adm.cs.cmu.edu/anon/cbd/CMU-CB-16-101.pdf#Appendix.1.A) |
+| `st` | [Delphi-Stat](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1006134)
+
-...
+## Table of contents
+{: .no_toc .text-delta}
+
+1. TOC
+{:toc}
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/delphi/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
@@ -31,8 +58,8 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
| Parameter | Description | Type |
|-----------|-------------|--------------------------------------|
-| `system` | system | system name from (...) |
-| `epiweek` | epiweek | epiweek when forecast was made |
+| `system` | system | system name (`af`, `eb`, `ec`, `sp`, `st`) |
+| `epiweek` | epiweek (see [Date Formats](date_formats.html)) | epiweek when forecast was made |
## Response
@@ -43,24 +70,28 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
| `epidata[].system` | system | string |
| `epidata[].epiweek` | epiweek | integer |
| `epidata[].forecast` | forecast structure | object |
-| `epidata[].forecast.season` | year (yyyy) | integer |
-| `epidata[].forecast.ili_bins` | | integer |
+| `epidata[].forecast._version` | forecast version | integer |
+| `epidata[].forecast.baselines` | baseline values for each region | object |
+| `epidata[].forecast.baselines.` | baseline value for \ | float |
| `epidata[].forecast.data` | forecast data for each region | object |
| `epidata[].forecast.data.` | forecast data for \ | object |
| `epidata[].forecast.data..` | distribution for \ (`peak`, `peakweek`, `onset`, `x1`, `x2`, `x3`, `x4`) | object |
-| ... | ... | ... |
-| `epidata[].forecast.name` | name = "delphi-epicast" | string |
-| `epidata[].forecast.year_weeks` | number of weeks in year | integer |
-| `epidata[].forecast.ili_bin_size` | float |
-| `epidata[].forecast.season_weeks` | number of weeks in season | integer |
-| `epidata[].forecast._version` | forecast version | integer |
+| `epidata[].forecast.data...dist` | probability distribution | array of float |
+| `epidata[].forecast.data...point` | point estimate | float |
+| `epidata[].forecast.data...none` | probability of "none" (if applicable) | float |
| `epidata[].forecast.epiweek` | forecast epiweek | integer |
+| `epidata[].forecast.ili_bin_size` | size of ILI bins | float |
+| `epidata[].forecast.ili_bins` | number of ILI bins | integer |
+| `epidata[].forecast.name` | system name | string |
+| `epidata[].forecast.season` | season year (yyyy) | integer |
+| `epidata[].forecast.season_weeks` | number of weeks in season | integer |
+| `epidata[].forecast.year_weeks` | number of weeks in year | integer |
| `message` | `success` or error message | string |
# Example URLs
-### Delphi on 2020w01 (EC)
-https://api.delphi.cmu.edu/epidata/delphi/?system=ec&epiweek=202001
+### Delphi on 2015w01 (EC)
+
```json
{
@@ -142,4 +173,100 @@ https://api.delphi.cmu.edu/epidata/delphi/?system=ec&epiweek=202001
# Code Samples
-
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch Delphi Forecast data for system `ec` on epiweek `201501`.
+
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.delphi('ec', 201501)
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_delphi(system = 'ec', epiweek = 201501)
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
+
+Optionally install the package using pip(env):
+```bash
+pip install delphi-epidata
+```
+Place `delphi_epidata.py` from this repo next to your python script.
+
+```python
+# Import
+from delphi_epidata import Epidata
+# Fetch data
+res = Epidata.delphi('ec', 201501)
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
+# Fetch data
+res <- Epidata$delphi(system = 'ec', epiweek = 201501)
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/dengue_digital_surveillance.md b/docs/api/dengue_digital_surveillance.md
index 9351e7dff..76cc303f2 100644
--- a/docs/api/dengue_digital_surveillance.md
+++ b/docs/api/dengue_digital_surveillance.md
@@ -1,51 +1,202 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive Dengue Digital Surveillance
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
permalink: api/dengue_sensors.html
---
# Dengue Digital Surveillance Sensors
+{: .no_toc}
-This is the API documentation for accessing the Dengue Digital Surveillance
-Sensors (`dengue_sensors`) endpoint of [Delphi](https://delphi.cmu.edu/)'s
-epidemiological data.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `dengue_sensors` |
+| **Data Source** | Various digital data streams |
+| **Geographic Levels** | Countries and territories in the Americas (see [Geographic Codes](geographic_codes.html#countries-and-territories-in-the-americas))
*Note: Data availability varies by country.* |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Reporting Cadence** | Inactive - No longer updated since 2020w32|
+| **Temporal Scope Start** | 2014w04 |
+| **License** | [CC BY](https://creativecommons.org/licenses/by/4.0/) |
+
+
+## Overview
+{: .no_toc}
+
+This endpoint provides digital surveillance sensor estimates for dengue activity, derived from various data streams.
General topics not specific to any particular endpoint are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## Delphi's Dengue Digital Surveillance Sensors Data
+### Available Signals
-...
+The following signals are available:
+
+| Name | Description |
+| :--- | :--- |
+| `gft` | Google Flu Trends |
+| `ght` | Google Health Trends |
+| `twtr` | HealthTweets |
+| `wiki` | Wikipedia access |
+| `cdc` | CDC Page Hits |
+| `epic` | Epicast 1-week-ahead point prediction |
+| `quid` | Flu lab test data |
+| `sar3` | Seasonal Autoregression (order 3) |
+| `arch` | Best-fit Archetype at 1-week-ahead |
+
+## Table of contents
+{: .no_toc .text-delta}
+
+1. TOC
+{:toc}
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/dengue_sensors/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
### Required
-
+| Parameter | Description | Type |
+| --- | --- | --- |
+| `auth` | password | string |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+| `name` | name | `list` of names (see [Available Signals](#available-signals)) |
+| `locations` | locations | `list` of location labels (see [Geographic Codes](geographic_codes.html#countries-and-territories-in-the-americas)) |
+
## Response
-| Field | Description | Type |
-|-----------|-----------------------------------------------------------------|------------------|
-| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
-| `epidata` | list of results | array of objects |
-| ... | ... | ... |
-| `message` | `success` or error message | string |
+| Field | Description | Type |
+|-----------------------|-----------------------------------------------------------------|------------------|
+| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
+| `epidata` | list of results | array of objects |
+| `epidata[].location` | location label | string |
+| `epidata[].epiweek` | epiweek | integer |
+| `epidata[].name` | name | string |
+| `epidata[].value` | value | float |
+| `message` | `success` or error message | string |
# Example URLs
-
+### Dengue Sensors on 2015w01 (Puerto Rico)
+
+
+```json
+{
+ "result": 1,
+ "epidata": [
+ {
+ "location": "pr",
+ "epiweek": 201501,
+ "name": "ght",
+ "value": 103.676
+ }
+ ],
+ "message": "success"
+}
+```
# Code Samples
-
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch Dengue Sensors data for Puerto Rico for epiweek `201501`.
+
+
+
+
+
+
+Install the package using pip:
+
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.dengue_sensors('auth_token', ['ght'], ['pr'], [201501])
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pvt_dengue_sensors(auth = 'auth_token', names = 'ght', locations = 'pr', epiweeks = 201501)
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using our client libraries: [epidatr](https://cmu-delphi.github.io/epidatr/) for R and [epidatpy](https://cmu-delphi.github.io/epidatpy/) for Python. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
+
+Optionally install the package using pip(env):
+```bash
+pip install delphi-epidata
+```
+
+```python
+# Import
+from delphi_epidata import Epidata
+# Fetch data
+res = Epidata.dengue_sensors('auth_token', ['gft'], ['pr'], [201501])
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
+# Fetch data
+res <- Epidata$dengue_sensors(auth = "auth_token", sensors = list("gft"), locations = list("pr"), epiweeks = list(201501))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/dengue_nowcast.md b/docs/api/dengue_nowcast.md
index 52dc80fca..9f269f99b 100644
--- a/docs/api/dengue_nowcast.md
+++ b/docs/api/dengue_nowcast.md
@@ -1,50 +1,185 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive Dengue Nowcast
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# Delphi's Dengue Nowcast
+{: .no_toc}
-This is the API documentation for accessing the Dengue Nowcast
-(`dengue_nowcast`) endpoint of [Delphi](https://delphi.cmu.edu/)'s
-epidemiological data.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `dengue_nowcast` |
+| **Data Source** | [Delphi](https://delphi.cmu.edu/) |
+| **Geographic Levels** | Countries and territories in the Americas (see [Geographic Codes](geographic_codes.html#countries-and-territories-in-the-americas))
*Note: Data availability varies by country.* |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Reporting Cadence** | Inactive - No longer updated since 2020w32 |
+| **Temporal Scope Start** | 2014w09 |
+| **License** | [CC BY](https://creativecommons.org/licenses/by/4.0/) |
+
+
+## Overview
+{: .no_toc}
+
+This endpoint provides nowcast esimtates of dengue incidence, based on historical data and reported case counts.
General topics not specific to any particular endpoint are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## Delphi's Dengue Nowcast Data
+## Table of contents
+{: .no_toc .text-delta}
-...
+1. TOC
+{:toc}
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/dengue_nowcast/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
### Required
-
+| Parameter | Description | Type |
+| --- | --- | --- |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+| `locations` | locations | `list` of location labels (see [Geographic Codes](geographic_codes.html#countries-and-territories-in-the-americas)) |
## Response
-| Field | Description | Type |
-|-----------|-----------------------------------------------------------------|------------------|
-| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
-| `epidata` | list of results | array of objects |
-| ... | ... | ... |
-| `message` | `success` or error message | string |
+| Field | Description | Type |
+|-----------------------|-----------------------------------------------------------------|------------------|
+| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
+| `epidata` | list of results | array of objects |
+| `epidata[].location` | location label | string |
+| `epidata[].epiweek` | epiweek | integer |
+| `epidata[].value` | nowcast value | float |
+| `epidata[].std` | standard deviation | float |
+| `message` | `success` or error message | string |
# Example URLs
-
+### Dengue Nowcast on 2015w01 (Puerto Rico)
+
+
+```json
+{
+ "result": 1,
+ "epidata": [
+ {
+ "location": "pr",
+ "epiweek": 201501,
+ "value": 12.34,
+ "std": 1.23
+ }
+ ],
+ "message": "success"
+}
+```
# Code Samples
-
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch Dengue Nowcast data for Puerto Rico for epiweeks `201401` to `202301`.
+
+
+
+
+
+
+Install the package using pip:
+
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.dengue_nowcast(['pr'], EpiRange(201401, 202301))
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_dengue_nowcast(locations = 'pr', epiweeks = epirange(201401, 202301))
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
+
+Optionally install the package using pip(env):
+
+```bash
+pip install delphi-epidata
+```
+
+Otherwise, place `delphi_epidata.py` from this repo next to your python script.
+
+```python
+# Import
+from delphi_epidata import Epidata
+# Fetch data
+res = Epidata.dengue_nowcast(['pr'], [201501])
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
+# Fetch data
+res <- Epidata$dengue_nowcast(locations = list("pr"), epiweeks = list(201501))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/digital_surveillance_sensors.md b/docs/api/digital_surveillance_sensors.md
index 6437d58a3..be0e74823 100644
--- a/docs/api/digital_surveillance_sensors.md
+++ b/docs/api/digital_surveillance_sensors.md
@@ -1,13 +1,23 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive Digital Surveillance Sensors
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
permalink: api/sensors.html
---
# Digital Surveillance Sensors
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `sensors` |
+| **Data Source** | Various digital data streams |
+| **Geographic Levels** | National, HHS regions, Census divisions, and US states (see [Geographic Codes](geographic_codes.html#us-regions-and-states)) |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Reporting Cadence** | Inactive - No longer updated since 2022w36 |
+| **Temporal Scope Start** | 2010w40 |
+| **License** | [CC BY](https://creativecommons.org/licenses/by/4.0/) |
+
This is the documentation of the API for accessing the Digital Surveillance Sensors (`sensors`) endpoint of
the [Delphi](https://delphi.cmu.edu/)'s epidemiological data.
@@ -16,25 +26,21 @@ General topics not specific to any particular endpoint are discussed in the
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## Delphi's Digital Surveillance Sensors Data
-
-...
-
-**Note:** this repository was built to support modeling and forecasting efforts
-surrounding seasonal influenza (and dengue). In the current COVID-19 pandemic,
-syndromic surveillance data, like ILI data (influenza-like illness) through
-FluView, will likely prove very useful. However, **we urge caution to users
-examining the digital surveillance sensors**, like ILI Nearby, Google Flu
-Trends, etc., during the COVID-19 pandemic, because these were designed to track
-ILI as driven by seasonal influenza, and were NOT designed to track ILI during
+{: .note}
+> **Note:** This repository was built to support modelling and forecasting efforts
+> surrounding seasonal influenza (and dengue). In the current COVID-19 pandemic,
+> syndromic surveillance data, like ILI data (influenza-like illness) through
+> FluView, will likely prove very useful. However, **we urge caution to users
+> examining the digital surveillance sensors**, like ILI Nearby, Google Flu
+> Trends, etc., during the COVID-19 pandemic, because these were designed to track
+> ILI as driven by seasonal influenza, and were NOT designed to track ILI during
the COVID-19 pandemic.
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/sensors/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
@@ -42,13 +48,14 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
| Parameter | Description | Type |
| --- | --- | --- |
-| `epiweeks` | epiweeks | `list` of epiweeks |
-| `locations` | locations | `list` of [region](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/regions.txt)/[state](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/states.txt) labels |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+| `locations` | locations | `list` of location codes: `nat`, HHS regions, Census divisions, or state codes (see [Geographic Codes](geographic_codes.html#us-regions-and-states)) |
| `names` | sensor names | `list` of string |
-Notes:
-* Names of open sensors (no `auth` token required): `sar3`, `epic`, `arch`
-* Names of sensors requiring `auth` token: `twtr`, `gft`, `ght`, `ghtj`, `cdc`, `quid`, `wiki`
+{: .note}
+> **Notes:**
+> * Names of open sensors (no `auth` token required): `sar3`, `epic`, `arch`
+> * Names of sensors requiring `auth` token: `twtr`, `gft`, `ght`, `ghtj`, `cdc`, `quid`, `wiki`
### Optional
@@ -58,8 +65,6 @@ Notes:
## Response
-
-
| Field | Description | Type |
|----------------------|-----------------------------------------------------------------|------------------|
| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
@@ -73,7 +78,7 @@ Notes:
# Example URLs
### Delphi's Digital Surveillance SAR3 Sensor on 2020w01 (national)
-https://api.delphi.cmu.edu/epidata/sensors/?names=sar3&locations=nat&epiweeks=202001
+
```json
{
@@ -93,45 +98,106 @@ https://api.delphi.cmu.edu/epidata/sensors/?names=sar3&locations=nat&epiweeks=20
# Code Samples
-Libraries are available for [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js), [Python](https://pypi.org/project/delphi-epidata/), and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
-The following samples show how to import the library and fetch national Delphi's Digital Surveillance SAR3 Sensor data for epiweeks `201940` and `202001-202010` (11 weeks total).
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch national Delphi's Digital Surveillance SAR3 Sensor data for epiweeks `201501-202001`.
-### JavaScript (in a web browser)
+
+
+
+
+
+Install the package using pip:
+
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.sensors(['nat'], ['sar3'], EpiRange(201501, 202001))
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pvt_sensors(auth = 'SECRET_API_AUTH_SENSORS', locations = 'nat',
+names = 'sar3', epiweeks = epirange(201501, 202001))
+print(res)
+```
+
-### Python
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
Optionally install the package using pip(env):
-````bash
+
+```bash
pip install delphi-epidata
-````
+```
Otherwise, place `delphi_epidata.py` from this repo next to your python script.
-````python
+```python
# Import
from delphi_epidata import Epidata
# Fetch data
-res = Epidata.sensors(['nat'], ['sar3'], [201940, Epidata.range(202001, 202010)])
+res = Epidata.sensors(['nat'], ['sar3'], Epidata.range(201501, 202001))
print(res['result'], res['message'], len(res['epidata']))
-````
+```
+
-### R
+
-````R
-# Import
-source('delphi_epidata.R')
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
# Fetch data
-res <- Epidata$sensors(list('nat'), list('sar3') list(201940, Epidata$range(202001, 202010)))
-cat(paste(res$result, res$message, length(res$epidata), "\n"))
-````
+res <- Epidata$sensors(locations = list("nat"), sensors = list("sar3"), epiweeks = Epidata$range(201501, 202001))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/ecdc_ili.md b/docs/api/ecdc_ili.md
index c379fe369..27b54eccf 100644
--- a/docs/api/ecdc_ili.md
+++ b/docs/api/ecdc_ili.md
@@ -1,63 +1,205 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive ECDC ILI
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# ECDC ILI
+{: .no_toc}
-This is the API documentation for accessing the ECDC ILI (`ecdc_ili`) endpoint
-of [Delphi](https://delphi.cmu.edu/)'s epidemiological data.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `ecdc_ili` |
+| **Data Source** | [European Centre for Disease Prevention and Control (ECDC)](https://www.ecdc.europa.eu/en/home) |
+| **Geographic Levels** | European countries (see [Geographic Codes](geographic_codes.html#european-countries)) |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Reporting Cadence** | Inactive - No longer updated since 2020w12 |
+| **Temporal Scope Start** | 2018w40 |
+| **License** | This was scraped from a publicly-accessible website, but no explicit license terms were found. |
+
+
+## Overview
+{: .no_toc}
+
+This data source provides weekly influenza-like illness (ILI) data for European countries, as reported by the European Centre for Disease Prevention and Control (ECDC).
General topics not specific to any particular endpoint are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## ECDC ILI Data
+## Table of contents
+{: .no_toc .text-delta}
+
+1. TOC
+{:toc}
+
-ECDC ILI data from ECDC website. ...
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/ecdc_ili/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
### Required
-| Parameter | Description | Type |
-|------------|-------------|-------------------------------------------------------------------------------------------------------------|
-| `epiweeks` | epiweeks | `list` of epiweeks |
-| `regions` | regions | `list` of [location](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/ecdc_regions.txt) labels |
+| Parameter | Description | Type |
+| --- | --- | --- |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+| `regions` | regions | `list` of European country labels (see [Geographic Codes](geographic_codes.html#european-countries)) |
### Optional
-| Parameter | Description | Type |
-|-----------|--------------------------------------------|--------------------|
-| `issues` | issues | `list` of epiweeks |
-| `lag` | # weeks between each epiweek and its issue | integer |
+| Parameter | Description | Type |
+| --- | --- | --- |
+| `issues` | issues (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+| `lag` | # weeks between each epiweek and its issue | integer |
-Notes:
-- If both `issues` and `lag` are specified, only `issues` is used.
-If neither is specified, the current issues are used.
+{: .note}
+> **Notes:**
+> - If both `issues` and `lag` are specified, only `issues` is used.
+> - If neither is specified, the current issues are used.
## Response
-| Field | Description | Type |
-|-----------|-----------------------------------------------------------------|------------------|
-| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
-| `epidata` | list of results | array of objects |
-| ... | ... | ... |
-| `message` | `success` or error message | string |
+| Field | Description | Type |
+|---------------------------|-----------------------------------------------------------------|------------------|
+| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
+| `epidata` | list of results | array of objects |
+| `epidata[].release_date` | date of release | string |
+| `epidata[].region` | region name | string |
+| `epidata[].issue` | epiweek of issue | integer |
+| `epidata[].epiweek` | epiweek of data | integer |
+| `epidata[].lag` | lag in weeks | integer |
+| `epidata[].count` | number of ILI cases | integer |
+| `epidata[].rate` | ILI rate | float |
+| `message` | `success` or error message | string |
# Example URLs
-
+### ECDC ILI in Austria on 2020w01
+
+
+```json
+{
+ "result": 1,
+ "epidata": [
+ {
+ "release_date": "2020-01-10",
+ "region": "Austria",
+ "issue": 202001,
+ "epiweek": 202001,
+ "lag": 0,
+ "count": 123,
+ "rate": 12.34
+ }
+ ],
+ "message": "success"
+}
+```
# Code Samples
-
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch ECDC ILI data for Austria for epiweeks `202001` and `202002`.
+
+
+
+
+
+
+Install the package using pip:
+
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.ecdc_ili(['austria'], [202001, 202002])
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_ecdc_ili(regions = 'austria', epiweeks = c(202001, 202002))
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
+
+Optionally install the package using pip(env):
+
+```bash
+pip install delphi-epidata
+```
+
+Otherwise, place `delphi_epidata.py` from this repo next to your python script.
+
+```python
+# Import
+from delphi_epidata import Epidata
+# Fetch data
+res = Epidata.ecdc_ili(['austria'], [202001, 202002])
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
+# Fetch data
+res <- Epidata$ecdc_ili(regions = list("austria"), epiweeks = list(202001, 202002))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/flusurv.md b/docs/api/flusurv.md
index 79ddd15ef..eacbefe79 100644
--- a/docs/api/flusurv.md
+++ b/docs/api/flusurv.md
@@ -1,24 +1,37 @@
---
-title: inactive Flusurv
+title: Flusurv
parent: Data Sources and Signals
grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
+nav_order: 3
---
# FluSurv
+{: .no_toc}
-This is the API documentation for accessing the FluSurv (`flusurv`) endpoint of
-[Delphi](https://delphi.cmu.edu/)'s epidemiological data.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `flusurv` |
+| **Data Source** | [CDC FluSurv-NET](https://gis.cdc.gov/GRASP/Fluview/FluHospRates.html) |
+| **Geographic Levels** | Specific catchment areas (Network, State, or County-level catchments). See [Geographic Codes](geographic_codes.html#flusurv-locations) for full list |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Temporal Scope Start** | 2003w40 |
+| **Reporting Cadence** | Weekly |
+| **License** | [Publicly Accessible US Government](https://www.usa.gov/government-works) |
+
+
+
+
+## Overview
+{: .no_toc}
+
+This data source provides laboratory-confirmed influenza hospitalization rates from the from the [CDC's Influenza Hospitalization Surveillance Network (FluSurv-NET)](https://www.cdc.gov/fluview/overview/influenza-hospitalization-surveillance.html?CDC_AAref_Val=https://www.cdc.gov/flu/weekly/influenza-hospitalization-surveillance.htm). The data includes age-stratified hospitalization rates and rates by race, sex, and flu type, when available.
General topics not specific to any particular endpoint are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## FluSurv Data
-
-FluSurv-NET data (flu hospitaliation rates) from CDC.
-
See also:
-
-
@@ -26,11 +39,93 @@ See also:
The US Influenza Hospitalization Surveillance Network. Emerging Infectious
Diseases, 21(9), 1543-1550. .
+## Table of contents
+{: .no_toc .text-delta}
+
+1. TOC
+{:toc}
+
+
+## Estimation
+
+The rates provided in this dataset are pulled directly from the CDC's GRASP (Geospatial Research, Analysis, and Services Program) API.
+
+For a specific location and stratum (e.g., Age 0-4), the rate represents the number of residents of the catchment area hospitalized with laboratory-confirmed influenza divided by the total population of that stratum in that catchment area, multiplied by 100,000.
+
+### Processing Details
+The Delphi pipeline scrapes the CDC GRASP API to emulate browser requests.
+* **Duplicate Handling:** In rare instances where the source API provides two differing rates for the same location, epiweek, and demographic group, the pipeline is configured to retain the first value returned by the API.
+* **Seasonality:** Data is processed based on "seasons" defined by the CDC, but is stored and served by Delphi indexed by Epiweek.
+
+## Strata Definitions
+
+The signals are broken down into specific demographic groups. The suffix of the signal name corresponds to the groups below.
+
+### Age Groups
+The dataset includes both historical age groupings (0-4) and newer, more granular groupings (0tlt1, etc.) added in recent years.
+
+| Signal Suffix | Age Group |
+| :--- | :--- |
+| `age_0` | 0-4 yr |
+| `age_1` | 5-17 yr |
+| `age_2` | 18-49 yr |
+| `age_3` | 50-64 yr |
+| `age_4` | 65+ yr |
+| `age_5` | 65-74 yr |
+| `age_6` | 75-84 yr |
+| `age_7` | 85+ yr |
+| `age_0tlt1` | 0 to <1 yr |
+| `age_1t4` | 1-4 yr |
+| `age_5t11` | 5-11 yr |
+| `age_12t17` | 12-17 yr |
+| `age_18t29` | 18-29 yr |
+| `age_30t39` | 30-39 yr |
+| `age_40t49` | 40-49 yr |
+| `age_gte75` | >= 75 yr |
+| `age_lt18` | < 18 yr |
+| `age_gte18` | >= 18 yr |
+
+### Race and Ethnicity
+The dataset tracks 5 specific racial and ethnic groups.
+
+| Signal Suffix | Group Description |
+| :--- | :--- |
+| `race_white` | White |
+| `race_black` | Black |
+| `race_hisp` | Hispanic/Latino |
+| `race_asian` | Asian/Pacific Islander |
+| `race_natamer` | American Indian/Alaska Native |
+
+### Sex
+
+| Signal Suffix | Group Description |
+| :--- | :--- |
+| `sex_male` | Male |
+| `sex_female` | Female |
+
+### Influenza Type
+
+| Signal Suffix | Group Description |
+| :--- | :--- |
+| `flu_a` | Influenza A |
+| `flu_b` | Influenza B |
+
+## Lag and Backfill
+
+FluSurv-NET data is subject to reporting lags and revisions. The CDC may update past weekly rates as more hospitalization data becomes available or is corrected.
+
+The Delphi API tracks these changes via the `issue` date (inferred from the `loaddatetime` provided by the CDC API). When new data is fetched from the CDC, if a rate for a past week has changed, the database is updated to reflect the new value, allowing users to query historical versions of the data using the `lag` or `issues` parameters.
+
+## Limitations
+
+* This data does not cover the entire United States. It covers specific catchment areas within 13 states (EIP sites) and additional states participating in the IHSP. Rates are representative of these specific populations and may not perfectly generalize to the entire national population.
+* As with all surveillance data, recent weeks may be subject to significant backfill.
+* Not all strata (e.g., specific age bands or racial groups) may be available for all locations or all historical dates, depending on the data collection practices at the time.
+
# The API
The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
@@ -38,19 +133,20 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
| Parameter | Description | Type |
| --- | --- | --- |
-| `epiweeks` | epiweeks | `list` of epiweeks |
-| `locations` | locations | `list` of [location](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/flusurv_locations.txt) labels |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+| `locations` | locations | `list` of location labels (see [Geographic Codes](geographic_codes.html#flusurv-locations)) |
### Optional
| Parameter | Description | Type |
|-----------|--------------------------------------------|--------------------|
-| `issues` | issues | `list` of epiweeks |
+| `issues` | issues (see [Date Formats](date_formats.html)) | `list` of epiweeks |
| `lag` | # weeks between each epiweek and its issue | integer |
-Notes:
-- If both `issues` and `lag` are specified, only `issues` is used.
-If neither is specified, the current issues are used.
+{: .note}
+> **Notes:**
+> - If both `issues` and `lag` are specified, only `issues` is used.
+> - If neither is specified, the current issues are used.
## Response
@@ -94,12 +190,13 @@ If neither is specified, the current issues are used.
| `epidata[].season` | indicates the start and end years of the winter flu season in the format YYYY-YY (e.g. 2022-23 indicates the flu season running late 2022 through early 2023) | string |
| `message` | `success` or error message | string |
-Notes:
-* The `flusurv` age groups are, in general, not the same as the ILINet
+{: .note}
+> **Note:**
+> * The `flusurv` age groups are, in general, not the same as the ILINet
(`fluview`) age groups. However, the following groups are equivalent:
- - flusurv age_0 == fluview age_0 (0-4 years)
- - flusurv age_3 == fluview age_4 (50-64 years)
- - flusurv age_4 == fluview age_5 (65+ years)
+> - flusurv age_0 == fluview age_0 (0-4 years)
+> - flusurv age_3 == fluview age_4 (50-64 years)
+> - flusurv age_4 == fluview age_5 (65+ years)
# Example URLs
@@ -130,45 +227,116 @@ Notes:
# Code Samples
-Libraries are available for [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js), [Python](https://pypi.org/project/delphi-epidata/), and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
-The following samples show how to import the library and fetch CA FluView Clinical data for epiweeks `201940` and `202001-202010` (11 weeks total).
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch CA FluView Clinical data for epiweeks `201701-201801`.
+
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pub_flusurv(locations="CA", epiweeks=EpiRange(201701, 201801))
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_flusurv(locations = "CA", epiweeks = epirange(201701, 201801))
+print(res)
+```
+
-### JavaScript (in a web browser)
+
-````html
+The JavaScript client is available [here](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js).
+
+```html
-````
+```
+
+
+
+
+### Legacy Clients
-### Python
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
Optionally install the package using pip(env):
-````bash
+```bash
pip install delphi-epidata
-````
+```
Otherwise, place `delphi_epidata.py` from this repo next to your python script.
-````python
+```python
# Import
from delphi_epidata import Epidata
# Fetch data
-res = Epidata.flusurv(['ca'], [201940, Epidata.range(202001, 202010)])
+res = Epidata.flusurv(['CA'], [Epidata.range(201701, 201801)])
print(res['result'], res['message'], len(res['epidata']))
-````
+```
+
-### R
+
-````R
-# Import
-source('delphi_epidata.R')
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
# Fetch data
-res <- Epidata$flusurv(list('ca'), list(201940, Epidata$range(202001, 202010)))
-cat(paste(res$result, res$message, length(res$epidata), "\n"))
-````
+res <- Epidata$flusurv(locations = list("CA"), epiweeks = list(Epidata$range(201701, 201801)))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/fluview.md b/docs/api/fluview.md
index 34d878cd7..11b7aadb8 100644
--- a/docs/api/fluview.md
+++ b/docs/api/fluview.md
@@ -5,31 +5,69 @@ grand_parent: Other Endpoints (COVID-19 and Other Diseases)
nav_order: 1
---
-# FluView
+# FluView (ILINet)
+{: .no_toc}
-This is the API documentation for accessing the FluView (`fluview`) endpoint of
-[Delphi](https://delphi.cmu.edu/)'s epidemiological data.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `fluview` |
+| **Data Source** | [United States Centers for Disease Control and Prevention (CDC)](http://gis.cdc.gov/grasp/fluview/fluportaldashboard.html) |
+| **Geographic Levels** | National, states, HHS regions, Census divisions (see [Geographic Codes](geographic_codes.html#us-regions-and-states)), and cities (see [FluView Cities](geographic_codes.html#fluview-cities)) |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Reporting Cadence** | Weekly (typically Fridays) |
+| **Temporal Scope Start** | 1997w40 |
+| **License** | [Publicly Accessible US Government](https://www.usa.gov/government-works) |
+
+## Overview
+{: .no_toc}
+
+Influenza-like illness (ILI) from U.S. Outpatient Influenza-like Illness Surveillance Network (ILINet).
General topics not specific to any particular endpoint are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## FluView Data
+## Table of contents
+{: .no_toc .text-delta}
-Influenza-like illness (ILI) from U.S. Outpatient Influenza-like Illness Surveillance Network (ILINet).
- - Data source: [United States Centers for Disease Control and Prevention](http://gis.cdc.gov/grasp/fluview/fluportaldashboard.html) (CDC)
- - Temporal Resolution: Weekly* from 1997w40
- - Spatial Resolution: National, [HHS regions](https://www.hhs.gov/about/agencies/iea/regional-offices/index.html), [Census divisions](https://www2.census.gov/geo/pdfs/maps-data/maps/reference/us_regdiv.pdf), most States and Territories, and some Cities (full list [here](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/acquisition/fluview/fluview_locations.py))
- - Open access
+1. TOC
+{:toc}
+
+## Estimation
+
+### Definition of ILI
+For this system, ILI is defined as fever (temperature of 100°F [37.8°C] or greater) and a cough and/or a sore throat without a known cause other than influenza.
+
+### Weighted vs. Unweighted ILI
+The `fluview` endpoint provides two percentage metrics: `ili` (unweighted) and `wili` (weighted).
+
+* **Unweighted (`ili`):** Calculated simply as the number of ILI cases divided by the total number of patients seen:
+
+ $$ILI = 100 \cdot \frac{\text{num\_ili}}{\text{num\_patients}}$$
+
+* **Weighted (`wili`):** To produce a representative estimate for larger regions (like National or HHS Regions), the CDC weights the state-level data by state population. This corrects for the fact that some states may have higher provider participation rates than others relative to their actual population.
+
+ $$wILI_{region} = \sum_{s \in region} \left( \%ILI_s \times \frac{Pop_s}{Pop_{region}} \right)$$
+
+### Imputation
+State-level data was not publicly available from the CDC prior to the 2010-2011 flu season (2010w40). For dates prior to this, and for occasional missing reports, Delphi uses a sensor fusion approach (OLS regression) to impute state-level values based on the available regional data.
+
+Private imputed data may require specific authorization via the `auth` parameter.
-\* Data is usually released on Friday
+## Lag and Backfill
+
+The data is preliminary and subject to revision. Participating providers may report data late, or correct previously reported data. The `issues` and `lag` parameters in the API allow you to access historical versions of the data as they were reported on specific dates.
+
+## Limitations
+
+ILINet is a voluntary system. While it covers all states, the coverage within a state may not be perfectly representative of the entire population. Also, ILI is a syndromic definition, not a laboratory diagnosis. It captures patients with flu-like symptoms, which can be caused by other respiratory pathogens (including SARS-CoV-2 and RSV).
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/fluview/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
@@ -37,52 +75,54 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
| Parameter | Description | Type |
| --- | --- | --- |
-| `epiweeks` | epiweeks | `list` of epiweeks |
-| `regions` | regions | `list` of [region](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/regions.txt) labels |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+| `regions` | regions | `list` of region labels: `nat`, states, `hhs1`-`hhs10`, `cen1`-`cen9` (see [Geographic Codes](geographic_codes.html#us-regions-and-states)) |
### Optional
| Parameter | Description | Type |
|-----------|--------------------------------------------|--------------------|
-| `issues` | issues | `list` of epiweeks |
+| `issues` | issues (see [Date Formats](date_formats.html)) | `list` of epiweeks |
| `lag` | # weeks between each epiweek and its issue | integer |
| `auth` | password for private imputed data | string |
-Notes:
-- If both `issues` and `lag` are specified, only `issues` is used.
-If neither is specified, the current issues are used.
+{: .note}
+> **Notes:**
+> - If both `issues` and `lag` are specified, only `issues` is used.
+> - If neither is specified, the current issues are used.
## Response
| Field | Description | Type |
-|---------------------------|-----------------------------------------------------------------|------------------|
+|---------------------------|-----------------------------------------------------------------|---------------------|
| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
| `epidata` | list of results | array of objects |
-| `epidata[].release_date` | | string or null |
-| `epidata[].region` | | string |
-| `epidata[].issue` | | integer |
-| `epidata[].epiweek` | | integer |
-| `epidata[].lag` | | integer |
-| `epidata[].num_ili` | | integer |
-| `epidata[].num_patients` | | integer |
-| `epidata[].num_providers` | | integer |
-| `epidata[].num_age_0` | | integer or null |
-| `epidata[].num_age_1` | | integer or null |
-| `epidata[].num_age_2` | | integer or null |
-| `epidata[].num_age_3` | | integer or null |
-| `epidata[].num_age_4` | | integer or null |
-| `epidata[].num_age_5` | | integer or null |
+| `epidata[].release_date` | date when data was released | string or null |
+| `epidata[].region` | region identifier | string |
+| `epidata[].issue` | epiweek of publication | integer |
+| `epidata[].epiweek` | epiweek for which data is valid | integer |
+| `epidata[].lag` | number of weeks between epiweek and issue | integer |
+| `epidata[].num_ili` | number of ILI cases | integer |
+| `epidata[].num_patients` | total number of patients | integer |
+| `epidata[].num_providers` | number of reporting providers | integer |
+| `epidata[].num_age_0` | number of ILI cases for ages 0-4 | integer or null |
+| `epidata[].num_age_1` | number of ILI cases for ages 5-24 | integer or null |
+| `epidata[].num_age_2` | number of ILI cases for ages 25-49 | integer or null |
+| `epidata[].num_age_3` | number of ILI cases for ages 50-64 | integer or null |
+| `epidata[].num_age_4` | number of ILI cases for ages 65+ | integer or null |
+| `epidata[].num_age_5` | number of ILI cases with unknown age | integer or null |
| `epidata[].wili` | weighted percent influenza-like illness | float |
| `epidata[].ili` | percent influenza-like illness | float |
| `message` | `success` or error message | string |
-Notes:
-- If authorized via `auth`, private data is not included.
+{: .note}
+> **Notes:**
+> - If authorized via `auth`, private data is not included.
# Example URLs
### FluView on 2015w01 (national)
-https://api.delphi.cmu.edu/epidata/fluview/?regions=nat&epiweeks=201501
+
```json
{
@@ -113,55 +153,119 @@ https://api.delphi.cmu.edu/epidata/fluview/?regions=nat&epiweeks=201501
### FluView in HHS Regions 4 and 6 for the 2014/2015 flu season
-https://api.delphi.cmu.edu/epidata/fluview/?regions=hhs4,hhs6&epiweeks=201440-201520
+
### Updates to FluView on 2014w53, reported from 2015w01 through 2015w10 (national)
-https://api.delphi.cmu.edu/epidata/fluview/?regions=nat&epiweeks=201453&issues=201501-201510
+
# Code Samples
-Libraries are available for [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js), [Python](https://pypi.org/project/delphi-epidata/), and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
-The following samples show how to import the library and fetch national FluView data for epiweeks `201440` and `201501-201510` (11 weeks total).
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch national FluView data for epiweeks `201501-201510`.
+
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pub_fluview(regions="nat", epiweeks=EpiRange(201501, 201510))
+print(res)
+```
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_fluview(regions = "nat", epiweeks = epirange(201501, 201510))
+print(res)
+```
+
-### JavaScript (in a web browser)
+
-````html
+The JavaScript client is available [here](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js).
+
+```html
-````
+ EpidataAsync.fluview('nat', [EpidataAsync.range(201501, 201510)]).then((res) => {
+
+
+### Legacy Clients
-### Python
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
Optionally install the package using pip(env):
-````bash
+```bash
pip install delphi-epidata
-````
+```
Otherwise, place `delphi_epidata.py` from this repo next to your python script.
-````python
+```python
# Import
from delphi_epidata import Epidata
# Fetch data
-res = Epidata.fluview(['nat'], [201440, Epidata.range(201501, 201510)])
+res = Epidata.fluview(['nat'], [Epidata.range(201501, 201510)])
print(res['result'], res['message'], len(res['epidata']))
-````
+```
+
-### R
+
-````R
-# Import
-source('delphi_epidata.R')
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
# Fetch data
-res <- Epidata$fluview(list('nat'), list(201440, Epidata$range(201501, 201510)))
-cat(paste(res$result, res$message, length(res$epidata), "\n"))
-````
+res <- Epidata$fluview(regions = list("nat"), epiweeks = list(Epidata$range(201501, 201510)))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/fluview_clinical.md b/docs/api/fluview_clinical.md
index ca2b7b801..e42c23f98 100644
--- a/docs/api/fluview_clinical.md
+++ b/docs/api/fluview_clinical.md
@@ -2,29 +2,45 @@
title: FluView Clinical
parent: Data Sources and Signals
grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 1
+nav_order: 2
---
# FluView Clinical
+{: .no_toc}
-This is the API documentation for accessing the FluView Clinical
-(`fluview_clinical`) endpoint of [Delphi](https://delphi.cmu.edu/)'s
-epidemiological data.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `fluview_clinical` |
+| **Data Source** | [United States Centers for Disease Control and Prevention (CDC)](http://gis.cdc.gov/grasp/fluview/fluportaldashboard.html) |
+| **Geographic Levels** | National, HHS regions, states, and Census divisions (see [Geographic Codes](geographic_codes.html#us-regions-and-states)) |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Reporting Cadence** | Weekly (typically Fridays) |
+| **Temporal Scope Start** | 2016w40 |
+| **License** | [Publicly Accessible US Government](https://www.usa.gov/government-works) |
+
+
+## Overview
+{: .no_toc}
+
+This data source provides age-stratified clinical data on laboratory-confirmed influenza from the US Flu View system.
General topics not specific to any particular endpoint are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## FluView Clinical Data
+## Table of contents
+{: .no_toc .text-delta}
+
+1. TOC
+{:toc}
-...
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/fluview_clinical/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
@@ -32,19 +48,20 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
| Parameter | Description | Type |
| --- | --- | --- |
-| `epiweeks` | epiweeks | `list` of epiweeks |
-| `regions` | regions | `list` of [region](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/regions.txt) labels |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+| `regions` | regions | `list` of region labels: `nat`, states, `hhs1`-`hhs10`, `cen1`-`cen9` (see [Geographic Codes](geographic_codes.html#us-regions-and-states)) |
### Optional
| Parameter | Description | Type |
|-----------|--------------------------------------------|--------------------|
-| `issues` | issues | `list` of epiweeks |
+| `issues` | issues (see [Date Formats](date_formats.html)) | `list` of epiweeks |
| `lag` | # weeks between each epiweek and its issue | integer |
-Notes:
-- If both `issues` and `lag` are specified, only `issues` is used.
-If neither is specified, the current issues are used.
+{: .note}
+> **Notes:**
+> - If both `issues` and `lag` are specified, only `issues` is used.
+> - If neither is specified, the current issues are used.
## Response
@@ -52,89 +69,142 @@ If neither is specified, the current issues are used.
|------------------------------|-----------------------------------------------------------------|------------------|
| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
| `epidata` | list of results | array of objects |
-| `epidata[].release_date` | | string |
-| `epidata[].region` | | string |
-| `epidata[].issue` | | integer |
-| `epidata[].epiweek` | | integer |
-| `epidata[].lag` | | integer |
-| `epidata[].total_specimens` | | integer |
-| `epidata[].total_a` | | integer |
-| `epidata[].total_b` | | integer |
-| `epidata[].percent_positive` | | float |
-| `epidata[].percent_a` | | float |
-| `epidata[].percent_b` | | float |
+| `epidata[].release_date` | date when data was released | string |
+| `epidata[].region` | region identifier | string |
+| `epidata[].issue` | epiweek of publication | integer |
+| `epidata[].epiweek` | epiweek for which data is valid | integer |
+| `epidata[].lag` | number of weeks between epiweek and issue | integer |
+| `epidata[].total_specimens` | total number of specimens tested | integer |
+| `epidata[].total_a` | total specimens positive for influenza A | integer |
+| `epidata[].total_b` | total specimens positive for influenza B | integer |
+| `epidata[].percent_positive` | percentage of specimens testing positive for influenza | float |
+| `epidata[].percent_a` | percentage of specimens testing positive for influenza A | float |
+| `epidata[].percent_b` | percentage of specimens testing positive for influenza B | float |
| `message` | `success` or error message | string |
# Example URLs
### FluView Clinical on 2020w01 (national)
-https://api.delphi.cmu.edu/epidata/fluview_clinical/?regions=nat&epiweeks=202001
+
```json
{
"result": 1,
"epidata": [
{
- "release_date": "2020-04-10",
+ "release_date": "2021-10-08",
"region": "nat",
- "issue": 202014,
+ "issue": 202139,
"epiweek": 202001,
- "lag": 13,
- "total_specimens": 64980,
- "total_a": 5651,
- "total_b": 9647,
- "percent_positive": 23.5426,
- "percent_a": 8.69652,
- "percent_b": 14.8461
- },
- ...
+ "lag": 91,
+ "total_specimens": 65177,
+ "total_a": 5645,
+ "total_b": 9664,
+ "percent_positive": 23.4883,
+ "percent_a": 8.66103,
+ "percent_b": 14.8273
+ }
],
"message": "success"
}
```
-
# Code Samples
-Libraries are available for [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js), [Python](https://pypi.org/project/delphi-epidata/), and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
-The following samples show how to import the library and fetch national FluView Clinical data for epiweeks `201940` and `202001-202010` (11 weeks total).
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch national FluView Clinical data for epiweeks `201601-201701`.
+
+
+
-### JavaScript (in a web browser)
+
-````html
-
-
-
-
-````
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+res = Epidata.fluview_clinical(['nat'], [Epidata.range(201601, 201701)])
+print(res['result'], res['message'], len(res['epidata']))
+```
+
-### Python
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_fluview_clinical(regions = "nat", epiweeks = epirange(201601, 201701))
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
Optionally install the package using pip(env):
-````bash
+```bash
pip install delphi-epidata
-````
+```
-Otherwise, place `delphi_epidata.py` from this repo next to your python script.
+Place `delphi_epidata.py` from this repo next to your python script.
-````python
+```python
# Import
from delphi_epidata import Epidata
# Fetch data
-res = Epidata.fluview_clinical(['nat'], [201940, Epidata.range(202001, 202010)])
+res = Epidata.fluview_clinical(['nat'], [Epidata.range(201601, 201701)])
print(res['result'], res['message'], len(res['epidata']))
-````
+```
+
-### R
+
-````R
-# Import
-source('delphi_epidata.R')
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
# Fetch data
-res <- Epidata$fluview_clinical(list('nat'), list(201940, Epidata$range(202001, 202010)))
-cat(paste(res$result, res$message, length(res$epidata), "\n"))
-````
+res <- Epidata$fluview_clinical(regions = list("nat"), epiweeks = list(Epidata$range(201601, 201701)))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+ ```html
+
+
+
+
+ ```
+
+
+
diff --git a/docs/api/fluview_meta.md b/docs/api/fluview_meta.md
index 0826a98ba..831e65439 100644
--- a/docs/api/fluview_meta.md
+++ b/docs/api/fluview_meta.md
@@ -7,6 +7,16 @@ nav_order: 1
# FluView Metadata
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `fluview_meta` |
+| **Data Source** | [United States Centers for Disease Control and Prevention (CDC)](http://gis.cdc.gov/grasp/fluview/fluportaldashboard.html) |
+| **License** | [Publicly Accessible US Government](https://www.usa.gov/government-works) |
+
+## Overview
+{: .no_toc}
+
This is the API documentation for accessing the FluView metadata
(`fluview_meta`) endpoint of [Delphi](https://delphi.cmu.edu/)'s epidemiological
data.
@@ -16,15 +26,20 @@ General topics not specific to any particular endpoint are discussed in the
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
+## Table of contents
+{: .no_toc .text-delta}
+
+1. TOC
+{:toc}
+
## FluView Metadata
Returns information about the [`fluview` endpoint](fluview.md).
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/fluview_meta/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
@@ -44,7 +59,7 @@ There are no parameters for this endpoint.
# Example URLs
### FluView Metadata
-https://api.delphi.cmu.edu/epidata/fluview_meta/
+
```json
{
@@ -59,3 +74,38 @@ https://api.delphi.cmu.edu/epidata/fluview_meta/
"message": "success"
}
```
+
+# Code Samples
+
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch FluView metadata.
+
+
+
+
+
+
+```python
+# Import
+from epidatpy import EpiDataContext
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pub_fluview_meta()
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_fluview_meta()
+print(res)
+```
+
+
+
diff --git a/docs/api/geographic_codes.md b/docs/api/geographic_codes.md
new file mode 100644
index 000000000..fe2fcaecc
--- /dev/null
+++ b/docs/api/geographic_codes.md
@@ -0,0 +1,467 @@
+---
+title: Geographic Codes
+parent: Other Endpoints (COVID-19 and Other Diseases)
+nav_order: 900
+---
+
+# Geographic Codes
+{: .no_toc}
+
+This page documents the valid geographic codes accepted by various API endpoints.
+
+## Table of contents
+{: .no_toc .text-delta}
+
+1. TOC
+{:toc}
+
+## Countries and Territories in the Americas
+
+Multiple endpoints accept ISO 3166-1 alpha-2 country codes for countries and territories in the Americas.
+
+{: .note}
+> **Note:** While the API accepts codes for all countries listed below, data may not be available for every country or territory.
+
+### Supported Codes
+
+| Code | Name |
+|---|---|
+| AG | Antigua and Barbuda |
+| AI | Anguilla |
+| AR | Argentina |
+| AW | Aruba |
+| BB | Barbados |
+| BL | Saint Barthelemy |
+| BM | Bermuda |
+| BO | Bolivia |
+| BQ | Bonaire, Saint Eustatius and Saba |
+| BR | Brazil |
+| BS | Bahamas |
+| BZ | Belize |
+| CA | Canada |
+| CL | Chile |
+| CO | Colombia |
+| CR | Costa Rica |
+| CU | Cuba |
+| CW | Curaçao |
+| DO | Dominican Republic |
+| EC | Ecuador |
+| GD | Grenada |
+| GF | French Guiana |
+| GP | Guadeloupe |
+| GT | Guatemala |
+| GY | Guyana |
+| HN | Honduras |
+| HT | Haiti |
+| JM | Jamaica |
+| KN | Saint Kitts and Nevis |
+| KY | Cayman Islands |
+| LC | Saint Lucia |
+| MF | Saint Martin (French part) |
+| MQ | Martinique |
+| MS | Montserrat |
+| MX | Mexico |
+| NI | Nicaragua |
+| PA | Panama |
+| PE | Peru |
+| PR | Puerto Rico |
+| PY | Paraguay |
+| SR | Suriname |
+| SV | El Salvador |
+| SX | Sint Maarten (Dutch part) |
+| TC | Turks and Caicos Islands |
+| TT | Trinidad and Tobago |
+| US | United States of America |
+| UY | Uruguay |
+| VC | Saint Vincent and the Grenadines |
+| VE | Venezuela |
+| VG | Virgin Islands (UK) |
+| VI | Virgin Islands (US) |
+
+
+
+## US Regions and States
+
+Multiple endpoints use standard US geographic codes. These include the national code, HHS regions, Census divisions, and state codes.
+
+### National Code
+
+| Code | Name |
+|---|---|
+| nat | United States (National) |
+
+### HHS Regions
+
+The US Department of Health and Human Services divides the country into 10 regions.
+
+| Code | Region | States |
+|---|---|---|
+| hhs1 | Region 1 | CT, ME, MA, NH, RI, VT |
+| hhs2 | Region 2 | NJ, NY, PR, VI |
+| hhs3 | Region 3 | DE, DC, MD, PA, VA, WV |
+| hhs4 | Region 4 | AL, FL, GA, KY, MS, NC, SC, TN |
+| hhs5 | Region 5 | IL, IN, MI, MN, OH, WI |
+| hhs6 | Region 6 | AR, LA, NM, OK, TX |
+| hhs7 | Region 7 | IA, KS, MO, NE |
+| hhs8 | Region 8 | CO, MT, ND, SD, UT, WY |
+| hhs9 | Region 9 | AZ, CA, HI, NV, AS, GU, MP |
+| hhs10 | Region 10 | AK, ID, OR, WA |
+
+### Census Divisions
+
+The US Census Bureau divides the country into 9 divisions.
+
+| Code | Division | States |
+|---|---|---|
+| cen1 | New England | CT, ME, MA, NH, RI, VT |
+| cen2 | Mid-Atlantic | NJ, NY, PA |
+| cen3 | East North Central | IL, IN, MI, OH, WI |
+| cen4 | West North Central | IA, KS, MN, MO, NE, ND, SD |
+| cen5 | South Atlantic | DE, DC, FL, GA, MD, NC, SC, VA, WV |
+| cen6 | East South Central | AL, KY, MS, TN |
+| cen7 | West South Central | AR, LA, OK, TX |
+| cen8 | Mountain | AZ, CO, ID, MT, NV, NM, UT, WY |
+| cen9 | Pacific | AK, CA, HI, OR, WA |
+
+### US States and Territories
+
+Full list of 51 US states and territories used by multiple endpoints:
+
+#### US States
+
+| Code | Name |
+|---|---|
+| AK | Alaska |
+| AL | Alabama |
+| AR | Arkansas |
+| AZ | Arizona |
+| CA | California |
+| CO | Colorado |
+| CT | Connecticut |
+| DC | District of Columbia |
+| DE | Delaware |
+| FL | Florida |
+| GA | Georgia |
+| HI | Hawaii |
+| IA | Iowa |
+| ID | Idaho |
+| IL | Illinois |
+| IN | Indiana |
+| KS | Kansas |
+| KY | Kentucky |
+| LA | Louisiana |
+| MA | Massachusetts |
+| MD | Maryland |
+| ME | Maine |
+| MI | Michigan |
+| MN | Minnesota |
+| MO | Missouri |
+| MS | Mississippi |
+| MT | Montana |
+| NC | North Carolina |
+| ND | North Dakota |
+| NE | Nebraska |
+| NH | New Hampshire |
+| NJ | New Jersey |
+| NM | New Mexico |
+| NV | Nevada |
+| NY | New York |
+| OH | Ohio |
+| OK | Oklahoma |
+| OR | Oregon |
+| PA | Pennsylvania |
+| RI | Rhode Island |
+| SC | South Carolina |
+| SD | South Dakota |
+| TN | Tennessee |
+| TX | Texas |
+| UT | Utah |
+| VA | Virginia |
+| VT | Vermont |
+| WA | Washington |
+| WI | Wisconsin |
+| WV | West Virginia |
+| WY | Wyoming |
+
+#### US Territories
+
+| Code | Name |
+|---|---|
+| PR | Puerto Rico |
+| VI | Virgin Islands |
+| GU | Guam |
+| AS | American Samoa |
+| MP | Northern Mariana Islands |
+| FM | Federated States of Micronesia |
+| MH | Marshall Islands |
+| PW | Palau |
+
+## Selected US cities
+
+Selected US cities used by multiple endpoints.
+
+| Code |
+|---|
+| Abilene_TX |
+| Akron_OH |
+| Albany_NY |
+| Albuquerque_NM |
+| Alexandria_VA |
+| Allentown_PA |
+| Amarillo_TX |
+| Anaheim_CA |
+| Anchorage_AK |
+| Ann_Arbor_MI |
+| Arlington_TX |
+| Arlington_VA |
+| Atlanta_GA |
+| Austin_TX |
+| Bakersfield_CA |
+| Baltimore_MD |
+| Baton_Rouge_LA |
+| Berkeley_CA |
+| Birmingham_AL |
+| Boise_ID |
+| Boston_MA |
+| Boulder_CO |
+| Buffalo_NY |
+| Cary_NC |
+| Charlotte_NC |
+| Chicago_IL |
+| Cleveland_OH |
+| Colorado_Springs_CO |
+| Columbia_SC |
+| Columbus_OH |
+| Dallas_TX |
+| Dayton_OH |
+| Denver_CO |
+| Des_Moines_IA |
+| Durham_NC |
+| Eugene_OR |
+| Fresno_CA |
+| Ft_Worth_TX |
+| Gainesville_FL |
+| Grand_Rapids_MI |
+| Greensboro_NC |
+| Greenville_SC |
+| Honolulu_HI |
+| Houston_TX |
+| Indianapolis_IN |
+| Irvine_CA |
+| Irving_TX |
+| Jacksonville_FL |
+| Jackson_MS |
+| Kansas_City_MO |
+| Knoxville_TN |
+| Las_Vegas_NV |
+| Lexington_KY |
+| Lincoln_NE |
+| Little_Rock_AR |
+| Los_Angeles_CA |
+| Lubbock_TX |
+| Madison_WI |
+| Memphis_TN |
+| Mesa_AZ |
+| Miami_FL |
+| Milwaukee_WI |
+| Nashville_TN |
+| Newark_NJ |
+| New_Orleans_LA |
+| New_York_NY |
+| Norfolk_VA |
+| Oakland_CA |
+| Oklahoma_City_OK |
+| Omaha_NE |
+| Orlando_FL |
+| Philadelphia_PA |
+| Phoenix_AZ |
+| Pittsburgh_PA |
+| Plano_TX |
+| Portland_OR |
+| Providence_RI |
+| Raleigh_NC |
+| Reno_NV |
+| Reston_VA |
+| Richmond_VA |
+| Rochester_NY |
+| Roswell_GA |
+| Sacramento_CA |
+| Salt_Lake_City_UT |
+| Santa_Clara_CA |
+| San_Antonio_TX |
+| San_Diego_CA |
+| San_Francisco_CA |
+| San_Jose_CA |
+| Scottsdale_AZ |
+| Seattle_WA |
+| Somerville_MA |
+| Spokane_WA |
+| Springfield_MO |
+| State_College_PA |
+| St_Louis_MO |
+| St_Paul_MN |
+| Sunnyvale_CA |
+| Tampa_FL |
+| Tempe_AZ |
+| Tucson_AZ |
+| Tulsa_OK |
+| Washington_DC |
+| Wichita_KS |
+
+## NIDSS
+
+Geographic codes used by [NIDSS Flu](nidss_flu.html) and [NIDSS Dengue](nidss_dengue.html) endpoints.
+
+### Taiwan Regions
+
+Regions of Taiwan.
+
+| Code |
+|---|
+| nationwide |
+| central |
+| eastern |
+| kaoping |
+| northern |
+| southern |
+| taipei |
+
+### Taiwan Cities and Counties
+
+Administrative divisions of Taiwan.
+
+| Code |
+|---|
+| changhua_county |
+| chiayi_city |
+| chiayi_county |
+| hsinchu_city |
+| hsinchu_county |
+| hualien_county |
+| kaohsiung_city |
+| keelung_city |
+| kinmen_county |
+| lienchiang_county |
+| miaoli_county |
+| nantou_county |
+| new_taipei_city |
+| penghu_county |
+| pingtung_county |
+| taichung_city |
+| tainan_city |
+| taipei_city |
+| taitung_county |
+| taoyuan_city |
+| yilan_county |
+| yunlin_county |
+
+## European Countries
+
+European countries and regions used by the [ECDC ILI](ecdc_ili.html) endpoint.
+
+| Name |
+|---|
+| Armenia |
+| Austria |
+| Azerbaijan |
+| Belarus |
+| Belgium |
+| Czech Republic |
+| Denmark |
+| Estonia |
+| Finland |
+| France |
+| Georgia |
+| Iceland |
+| Ireland |
+| Israel |
+| Italy |
+| Kazakhstan |
+| Kosovo* |
+| Kyrgyzstan |
+| Latvia |
+| Lithuania |
+| Luxembourg |
+| Malta |
+| Moldova |
+| Montenegro |
+| Netherlands |
+| North Macedonia |
+| Norway |
+| Poland |
+| Portugal |
+| Romania |
+| Russia |
+| Serbia |
+| Slovakia |
+| Slovenia |
+| Spain |
+| Switzerland |
+| Tajikistan |
+| Turkey |
+| Turkmenistan |
+| Ukraine |
+| United Kingdom - England |
+| United Kingdom - Northern Irel |
+| United Kingdom - Scotland |
+| United Kingdom - Wales |
+| Uzbekistan |
+
+## FluSurv Locations
+
+Locations used by the [FluSurv](flusurv.html) endpoint.
+
+| Code | Description |
+|---|---|
+| CA | California |
+| CO | Colorado |
+| CT | Connecticut |
+| GA | Georgia |
+| IA | Iowa |
+| ID | Idaho |
+| MD | Maryland |
+| MI | Michigan |
+| MN | Minnesota |
+| NM | New Mexico |
+| NY_albany | New York (Albany) |
+| NY_rochester | New York (Rochester) |
+| OH | Ohio |
+| OK | Oklahoma |
+| OR | Oregon |
+| RI | Rhode Island |
+| SD | South Dakota |
+| TN | Tennessee |
+| UT | Utah |
+| network_all | All Networks |
+| network_eip | Emerging Infections Program |
+| network_ihsp | Influenza Hospitalization Surveillance Project |
+
+## Republic of Korea
+
+Geographic codes used by the [KCDC ILI](kcdc_ili.html) endpoint.
+
+| Code | Name |
+|---|---|
+| ROK | Republic of Korea |
+
+
+## FluView Cities
+
+Specific cities used by the [FluView](fluview.html) endpoint.
+
+| City | Code |
+|---|---|
+| Chicago | ord |
+| Los Angeles | lax |
+| New York City | jfk |
+
+### Note on New York
+
+In the CDC FluView system, New York State and New York City are often reported separately.
+* `ny_minus_jfk` represents New York State **excluding** NYC.
+* `jfk` represents New York City.
+* `ny` represents the entire state (the sum of the two).
diff --git a/docs/api/gft.md b/docs/api/gft.md
index ced862113..d8abbc695 100644
--- a/docs/api/gft.md
+++ b/docs/api/gft.md
@@ -1,33 +1,44 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive Google Flu Trends
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# Google Flu Trends
+{: .no_toc}
-This is the API documentation for accessing the Google Flu Trends (`gft`)
-endpoint of [Delphi](https://delphi.cmu.edu/)'s epidemiological data.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `gft` |
+| **Data Source** | [Google Flu Trends Estimates](https://www.google.com/publicdata/explore?ds=z3bsqef7ki44ac_) ([context](https://en.wikipedia.org/wiki/Google_Flu_Trends)) |
+| **Geographic Levels** | National, HHS regions, US states (see [US Regions and States](geographic_codes.html#us-regions-and-states)), and select cities (see [Selected US Cities](geographic_codes.html#selected-us-cities)) |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Reporting Cadence** | Inactive - No longer updated since 2015w32 |
+| **Temporal Scope Start** | 2003w40 |
+| **License** | [Google Terms of Service](https://policies.google.com/terms) |
+
+
+## Overview
+{: .no_toc}
+
+This data source provides influenza activity estimates from Google Flu Trends, which used search query data to track ILI activity.
General topics not specific to any particular endpoint are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## Google Flu Trends Data
+## Table of contents
+{: .no_toc .text-delta}
-Estimate of influenza activity based on volume of certain search queries. Google has discontinued Flu Trends, and this is now a static endpoint.
- - Data Source: [Google Flu Trends Estimates](https://www.google.com/publicdata/explore?ds=z3bsqef7ki44ac_) ([context](https://en.wikipedia.org/wiki/Google_Flu_Trends))
- - Temporal Resolution: Weekly from 2003w40 until 2015w32
- - Spatial Resolution: National, [HHS regions](http://www.hhs.gov/iea/regional/) ([1+10](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/regions.txt)); by state/territory ([50+1](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/states.txt)); and by city ([97](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/cities.txt))
- - Open access
+1. TOC
+{:toc}
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/gft/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
@@ -35,8 +46,8 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
| Parameter | Description | Type |
| --- | --- | --- |
-| `epiweeks` | epiweeks | `list` of epiweeks |
-| `locations` | locations | `list` of [region](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/regions.txt)/[state](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/states.txt)/[city](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/cities.txt) labels |
+| `locations` | Locations to fetch. National, HHS regions, US states (see [US Regions and States](geographic_codes.html#us-regions-and-states)), and select cities (see [Selected US Cities](geographic_codes.html#selected-us-cities)). | `list` of strings |
+| `epiweeks` | Epiweeks to fetch. Supports [`epirange()`] and defaults to all ("*") dates. | `list` of epiweeks |
## Response
@@ -45,14 +56,14 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
| `epidata` | list of results | array of objects |
| `epidata[].location` | location | string |
-| `epidata[].epiweek` | epiweek | epiweek |
-| `epidata[].num` | number | integer |
+| `epidata[].epiweek` | epiweek | integer |
+| `epidata[].num` | GFT estimate | integer |
| `message` | `success` or error message | string |
# Example URLs
### Google Flu Trends on 2015w01 (national)
-https://api.delphi.cmu.edu/epidata/gft/?locations=nat&epiweeks=201501
+
```json
{
@@ -71,45 +82,101 @@ https://api.delphi.cmu.edu/epidata/gft/?locations=nat&epiweeks=201501
# Code Samples
-Libraries are available for [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js), [Python](https://pypi.org/project/delphi-epidata/), and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
-The following samples show how to import the library and fetch Google Flu Trends data for epiweeks `201440` and `201501-201510` (11 weeks total).
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch Google Flu Trends data for epiweeks `201501-201510`.
-### JavaScript (in a web browser)
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pub_gft(locations='nat', epiweeks=EpiRange(201501, 201510))
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_gft(locations = 'nat', epiweeks = epirange(201501, 201510))
+print(res)
+```
+
-### Python
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
Optionally install the package using pip(env):
-````bash
+```bash
pip install delphi-epidata
-````
+```
Otherwise, place `delphi_epidata.py` from this repo next to your python script.
-````python
+```python
# Import
from delphi_epidata import Epidata
# Fetch data
-res = Epidata.gft(['nat'], [201440, Epidata.range(201501, 201510)])
+res = Epidata.gft(['nat'], Epidata.range(201501, 201510))
print(res['result'], res['message'], len(res['epidata']))
-````
+```
+
-### R
+
-````R
-# Import
-source('delphi_epidata.R')
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
# Fetch data
-res <- Epidata$gft(list('nat'), list(201440, Epidata$range(201501, 201510)))
-cat(paste(res$result, res$message, length(res$epidata), "\n"))
-````
+res <- Epidata$gft(locations = list("nat"), epiweeks = Epidata$range(201501, 201510))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/ght.md b/docs/api/ght.md
index 20698e753..0d49b50f6 100644
--- a/docs/api/ght.md
+++ b/docs/api/ght.md
@@ -1,13 +1,24 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive Google Health Trends
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# Google Health Trends
+{: .no_toc}
-This is the API documentation for accessing the [Google Health Trends](https://trends.google.com/trends/fullscreen/m/IN) (`ght`)
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `ght` |
+| **Data Source** | Google Health Trends |
+| **Geographic Levels** | [US States](geographic_codes.html#us-states-and-territories) and national level (US) |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Reporting Cadence** | Inactive - No longer updated since 2022w36 |
+| **Temporal Scope Start** | 1993w01 |
+| **License** | [Google Terms of Service](https://policies.google.com/terms) |
+
+This is the API documentation for accessing the Google Health Trends (`ght`)
endpoint of [Delphi](https://delphi.cmu.edu/)'s epidemiological data.
General topics not specific to any particular endpoint are discussed in the
@@ -15,21 +26,23 @@ General topics not specific to any particular endpoint are discussed in the
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## Google Health Trends Data
-Estimate of influenza activity based on volume of certain search queries.
This data may be useful for real-time monitoring of diseases, as in:
-
- Herman Anthony Carneiro, Eleftherios Mylonakis. [Google Trends: A Web-Based Tool for Real-Time Surveillance of Disease Outbreaks](https://doi.org/10.1086/630200). Clinical Infectious Diseases, Volume 49, Issue 10, 15 November 2009, Pages 1557–1564.
- Abel Brodeur, Andrew E. Clark, Sarah Fleche, Nattavudh Powdthavee.
[COVID-19, lockdowns and well-being: Evidence from Google Trends](https://doi.org/10.1016/j.jpubeco.2020.104346). Journal of Public Economics, Volume 193, 2021, 104346.
- Sudhakar V. Nuti, Brian Wayda, Isuru Ranasinghe, Sisi Wang, Rachel P. Dreyer, Serene I. Chen, Karthik Murugiah. [The Use of Google Trends in Health Care Research: A Systematic Review](https://doi.org/10.1371/journal.pone.0109583), October 2014.
+## Table of contents
+{: .no_toc .text-delta}
+
+1. TOC
+{:toc}
+
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/ght/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
@@ -38,23 +51,249 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
| Parameter | Description | Type |
| --- | --- | --- |
| `auth` | password | string |
-| `epiweeks` | epiweeks | `list` of epiweeks |
-| `locations` | locations | `list` of [state](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/states.txt) and/or `US` labels |
-| `query` | search query or topic ID (see https://www.freebase.com/) | string |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+| `locations` | locations | `list` of state codes (see [Geographic Codes](geographic_codes.html#us-states-and-territories)) and/or `US` |
+| `query` | search query or topic ID (see [Valid Queries](#valid-queries)) | string |
+
+#### Valid Queries
+
+
+Click to expand full list of valid queries
+
+* `/m/0cycc`
+* `influenza type a`
+* `flu duration`
+* `flu fever`
+* `treating flu`
+* `fever flu`
+* `flu recovery`
+* `braun thermoscan`
+* `oscillococcinum`
+* `treating the flu`
+* `cold or flu`
+* `flu versus cold`
+* `flu remedies`
+* `contagious flu`
+* `type a influenza`
+* `flu or cold`
+* `duration of flu`
+* `cold versus flu`
+* `flu cough`
+* `flu headache`
+* `thermoscan`
+* `influenza incubation period`
+* `flu lasts`
+* `length of flu`
+* `flu stomach`
+* `cold vs flu`
+* `flu and fever`
+* `getting over the flu`
+* `influenza a`
+* `treatment for flu`
+* `flu length`
+* `treatment for the flu`
+* `influenza symptoms`
+* `over the counter flu`
+* `flu complications`
+* `cold and flu symptoms`
+* `influenza incubation`
+* `treatment of flu`
+* `human temperature`
+* `low body`
+* `flu contagious`
+* `robitussin ac`
+* `flu how long`
+* `ear thermometer`
+* `flu contagious period`
+* `treat flu`
+* `cough flu`
+* `low body temperature`
+* `expectorant`
+* `flu and cold`
+* `rapid flu`
+* `flu vs. cold`
+* `how to treat the flu`
+* `how long does the flu last?`
+* `viral pneumonia`
+* `flu in kids`
+* `type a flu`
+* `influenza treatment`
+* `fighting the flu`
+* `flu relief`
+* `treat the flu`
+* `flu medicine`
+* `dangerous fever`
+* `what is influenza`
+* `tussin`
+* `low body temp`
+* `flu care`
+* `flu in infants`
+* `flu dizziness`
+* `feed a fever`
+* `flu vs cold`
+* `flu vomiting`
+* `bacterial pneumonia`
+* `flu activity`
+* `flu chills`
+* `anas barbariae`
+* `flu germs`
+* `tylenol cold`
+* `how to get over the flu`
+* `flu in children`
+* `influenza a and b`
+* `duration of the flu`
+* `cold symptoms`
+* `flu report`
+* `rapid flu test`
+* `flu relapse`
+* `get over the flu`
+* `flu during pregnancy`
+* `flu recovery time`
+* `cure for flu`
+* `tamiflu and breastfeeding`
+* `flu chest pain`
+* `flu treatment`
+* `flu nausea`
+* `remedies for the flu`
+* `tamiflu in pregnancy`
+* `side effects of tamiflu`
+* `how to treat flu`
+* `viral bronchitis`
+* `flu how long contagious`
+* `flu remedy`
+
+
## Response
-| Field | Description | Type |
-|-----------|-----------------------------------------------------------------|------------------|
-| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
-| `epidata` | list of results | array of objects |
-| ... | ... | ... |
-| `message` | `success` or error message | string |
+| Field | Description | Type |
+|-----------------------|-----------------------------------------------------------------|------------------|
+| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
+| `epidata` | list of results | array of objects |
+| `epidata[].location` | location label | string |
+| `epidata[].epiweek` | epiweek | integer |
+| `epidata[].query` | search query | string |
+| `epidata[].value` | search volume | float |
+| `message` | `success` or error message | string |
# Example URLs
-
+### Google Health Trends for "how to get over the flu" on 2015w01 (US)
+
+
+```json
+{
+ "result": 1,
+ "epidata": [
+ {
+ "location": "US",
+ "epiweek": 201501,
+ "query": "flu",
+ "value": 9.113
+ }
+ ],
+ "message": "success"
+}
+```
# Code Samples
-
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch GHT data for "how to get over the flu" in the US for epiweek `201501`.
+
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.ght('auth_token', ['US'], [201501], 'how to get over the flu')
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pvt_ght(auth = 'auth_token', locations = 'US', epiweeks = 201501,
+ query = "how to get over the flu")
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
+
+Optionally install the package using pip(env):
+```bash
+pip install delphi-epidata
+```
+
+Otherwise, place `delphi_epidata.py` from this repo next to your python script.
+
+```python
+# Import
+from delphi_epidata import Epidata
+# Fetch data
+res = Epidata.ght('auth_token', ['US'], [201501], 'how to get over the flu')
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
+# Fetch data
+res <- Epidata$ght(auth = "auth_token", locations = list("US"), epiweeks = list(201501), query = "how to get over the flu")
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/glossary.md b/docs/api/glossary.md
new file mode 100644
index 000000000..84f9898a2
--- /dev/null
+++ b/docs/api/glossary.md
@@ -0,0 +1,16 @@
+---
+title: Glossary (link to Google Doc)
+nav_order: 4
+---
+
+# Glossary
+
+This page is currently hosted on [Google Docs](https://docs.google.com/document/d/17tJSp43lNZdZHCzza9_6ZT2gun0gJD_6zlgllmPTg-E/edit?usp=sharing).
+
+
+
+
+
+
diff --git a/docs/api/ili_nearby_nowcast.md b/docs/api/ili_nearby_nowcast.md
index defd13b22..01d11e543 100644
--- a/docs/api/ili_nearby_nowcast.md
+++ b/docs/api/ili_nearby_nowcast.md
@@ -1,36 +1,50 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive ILI Nearby Nowcast
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
permalink: api/nowcast.html
---
# ILI Nearby Nowcast
+{: .no_toc}
-This is the documentation of the API for accessing the ILI Nearby (`nowcast`) endpoint of
-the [Delphi](https://delphi.cmu.edu/)'s epidemiological data.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `nowcast` |
+| **Data Source** | [Delphi's ILI Nearby system](https://delphi.cmu.edu/nowcast/) |
+| **Dataset Type** | Predictive (Leading Indicator) |
+| **Geographic Levels** | National, HHS regions, Census divisions, and US states (see [Geographic Codes](geographic_codes.html#us-regions-and-states)) |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Reporting Cadence** | Inactive - No longer updated since 2022w36 |
+| **Temporal Scope Start** | 2010w45 |
+| **License** | [CC BY](https://creativecommons.org/licenses/by/4.0/) |
+
+## Overview
+{: .no_toc}
+
+The ILI Nearby endpoint provides a "nowcast" predictive estimate of the percentage of outpatient visits due to Influenza-Like Illness (ILI).
+
+This system uses a sensor-fusion approach to estimate the current level of flu activity before the official CDC reports are finalized. It is available:
+* **National/Regional:** 7 days before the first official CDC ILINet report.
+* **State-level:** 5 days before the first official CDC ILINet report.
General topics not specific to any particular endpoint are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## ILI Nearby Data
-A nowcast of U.S. national, regional, and state-level (weighted) %ILI, available seven days (regionally) or five days (state-level) before the first ILINet report for the corresponding week.
- - Source: [Delphi's ILI Nearby system](https://delphi.cmu.edu/nowcast/)
- - Temporal Resolution: Weekly, from 2010w30*
- - Spatial Resolution: National, [HHS regions](http://www.hhs.gov/iea/regional/), [Census divisions](http://www.census.gov/econ/census/help/geography/regions_and_divisions.html) ([1+10+9](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/regions.txt)), and by state/territory ([51](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/states.txt))
- - Open access
+# Table of contents
+{: .no_toc .text-delta}
-\* Data is usually released on Friday and updated on Sunday and Monday
+1. TOC
+{:toc}
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/nowcast/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
@@ -38,8 +52,8 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
| Parameter | Description | Type |
| --- | --- | --- |
-| `epiweeks` | epiweeks | `list` of epiweeks |
-| `locations` | locations | `list` of [region](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/regions.txt)/[state](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/states.txt) labels |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+| `locations` | locations | `list` of location codes: `nat`, HHS regions, Census divisions, or state codes (see [Geographic Codes](geographic_codes.html#us-regions-and-states)) |
## Response
@@ -47,16 +61,16 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
|----------------------|-----------------------------------------------------------------|------------------|
| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
| `epidata` | list of results | array of objects |
-| `epidata[].location` | | string |
-| `epidata[].epiweek` | | integer |
-| `epidata[].value` | | float |
-| `epidata[].std` | | float |
+| `epidata[].location` | location identifier (e.g., 'nat', state code, HHS region, census division) | string |
+| `epidata[].epiweek` | epiweek for the nowcast estimate | integer |
+| `epidata[].value` | nowcast estimate of %ILI (percentage of outpatient visits due to ILI) | float |
+| `epidata[].std` | standard deviation of the nowcast estimate | float |
| `message` | `success` or error message | string |
# Example URLs
### ILI Nearby on 2020w01 (national)
-https://api.delphi.cmu.edu/epidata/nowcast/?locations=nat&epiweeks=202001
+
```json
{
@@ -76,45 +90,102 @@ https://api.delphi.cmu.edu/epidata/nowcast/?locations=nat&epiweeks=202001
# Code Samples
-Libraries are available for [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js), [Python](https://pypi.org/project/delphi-epidata/), and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
-The following samples show how to import the library and fetch national ILI Nearby data for epiweeks `201940` and `202001-202010` (11 weeks total).
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch national ILI Nearby data for epiweeks `202001-202010` (10 weeks total).
-### JavaScript (in a web browser)
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pub_nowcast(locations=['nat'], epiweeks=EpiRange(202001, 202010))
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_nowcast(locations = 'nat', epiweeks = epirange(202001, 202010))
+print(res)
+```
+
+
+
-### Python
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
Optionally install the package using pip(env):
-````bash
+```bash
pip install delphi-epidata
-````
+```
Otherwise, place `delphi_epidata.py` from this repo next to your python script.
-````python
+```python
# Import
from delphi_epidata import Epidata
# Fetch data
-res = Epidata.nowcast(['nat'], [201940, Epidata.range(202001, 202010)])
+res = Epidata.nowcast(['nat'], Epidata.range(202001, 202010))
print(res['result'], res['message'], len(res['epidata']))
-````
+```
+
-### R
+
-````R
-# Import
-source('delphi_epidata.R')
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
# Fetch data
-res <- Epidata$nowcast(list('nat'), list(201940, Epidata$range(202001, 202010)))
-cat(paste(res$result, res$message, length(res$epidata), "\n"))
-````
+res <- Epidata$nowcast(locations = list("nat"), epiweeks = Epidata$range(202001, 202010))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
+```
diff --git a/docs/api/inactive_other.md b/docs/api/inactive_other.md
new file mode 100644
index 000000000..3b9361088
--- /dev/null
+++ b/docs/api/inactive_other.md
@@ -0,0 +1,12 @@
+---
+title: Inactive Sources (Other)
+parent: Data Sources and Signals
+grand_parent: Other Endpoints (COVID-19 and Other Diseases)
+nav_order: 99
+has_children: true
+---
+
+# Inactive Other Sources
+{: .no_toc}
+
+These Other Endpoint data sources are no longer actively updated.
diff --git a/docs/api/kcdc_ili.md b/docs/api/kcdc_ili.md
index 340d886d2..52192a4c9 100644
--- a/docs/api/kcdc_ili.md
+++ b/docs/api/kcdc_ili.md
@@ -1,11 +1,27 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive KCDC ILI
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# KCDC ILI
+{: .no_toc}
+
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `kcdc_ili` |
+| **Data Source** | [Korea Disease Control and Prevention Agency (KCDC) ILI surveillance](https://www.kdca.go.kr/) |
+| **Geographic Levels** | ROK (Republic of Korea) (see [Geographic Codes](geographic_codes.md#republic-of-korea)) |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Reporting Cadence** | Inactive - No longer updated since 2020w44 |
+| **Temporal Scope Start** | 2004w36 |
+| **License** | This was scraped from a publicly-accessible government website, but no explicit license terms were found. |
+
+## Overview
+{: .no_toc}
+
+This data source provides weekly influenza-like illness (ILI) data for the Republic of Korea, as reported by the Korea Centers for Disease Control and Prevention (KCDC).
This is the API documentation for accessing the KCDC ILI (`kcdc_ili`) endpoint of [Delphi](https://delphi.cmu.edu/)'s epidemiological data.
@@ -14,49 +30,173 @@ General topics not specific to any particular endpoint are discussed in the
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## KCDC ILI Data
+## Table of contents
+{: .no_toc .text-delta}
+
+1. TOC
+{:toc}
-KCDC ILI data from KCDC website. ...
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/kcdc_ili/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
### Required
-| Parameter | Description | Type |
-|------------|-------------|--------------------|
-| `epiweeks` | epiweeks | `list` of epiweeks |
-| `regions` | regions | `ROK` |
+| Parameter | Description | Type |
+| --- | --- | --- |
+| `regions` | Regions to fetch. See [Geographic Codes](geographic_codes.html#republic-of-korea). | `list` of strings |
+| `epiweeks` | Epiweeks to fetch. Supports [`epirange()`] and defaults to all ("*") dates. | `list` of epiweeks |
### Optional
-| Parameter | Description | Type |
-|-----------|--------------------------------------------|--------------------|
-| `issues` | issues | `list` of epiweeks |
-| `lag` | # weeks between each epiweek and its issue | integer |
+| Parameter | Description | Type |
+| --- | --- | --- |
+| `issues` | Optionally, the issue(s) (see [Date Formats](date_formats.html)) of the data to fetch. | `list` of epiweeks |
+| `lag` | Optionally, the lag of the issues to fetch. | integer |
-Notes:
-- If both `issues` and `lag` are specified, only `issues` is used.
-If neither is specified, the current issues are used.
+{: .note}
+> **Notes:**
+> - If both `issues` and `lag` are specified, only `issues` is used.
+> - If neither is specified, the current issues are used.
## Response
-| Field | Description | Type |
-|-----------|-----------------------------------------------------------------|------------------|
-| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
-| `epidata` | list of results | array of objects |
-| ... | ... | ... |
-| `message` | `success` or error message | string |
+| Field | Description | Type |
+|---------------------------|-----------------------------------------------------------------|------------------|
+| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
+| `epidata` | list of results | array of objects |
+| `epidata[].release_date` | date of release | string |
+| `epidata[].region` | region name | string |
+| `epidata[].issue` | epiweek of issue | integer |
+| `epidata[].epiweek` | epiweek of data | integer |
+| `epidata[].lag` | lag in weeks | integer |
+| `epidata[].ili` | percent ILI | float |
+| `epidata[].visits` | number of visits | integer |
+| `message` | `success` or error message | string |
# Example URLs
-
+### KCDC ILI in ROK on 2020w01
+
+
+```json
+{
+ "result": 1,
+ "epidata": [
+ {
+ "release_date": "2020-01-10",
+ "region": "ROK",
+ "issue": 202001,
+ "epiweek": 202001,
+ "lag": 44,
+ "ili": 49.8,
+ }
+ ],
+ "message": "success"
+}
+```
# Code Samples
-
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch KCDC ILI data for ROK for epiweeks `202001` and `202002`.
+
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pub_kcdc_ili(regions=['ROK'], epiweeks=[202001, 202002])
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_kcdc_ili(regions = 'ROK', epiweeks = c(202001, 202002))
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
+
+Optionally install the package using pip(env):
+```bash
+pip install delphi-epidata
+```
+
+Otherwise, place `delphi_epidata.py` from this repo next to your python script.
+
+```python
+# Import
+from delphi_epidata import Epidata
+# Fetch data
+res = Epidata.kcdc_ili(['ROK'], [202001, 202002])
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
+# Fetch data
+res <- Epidata$kcdc_ili(regions = list("ROK"), epiweeks = list(202001, 202002))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/nidss_dengue.md b/docs/api/nidss_dengue.md
index 33cd2ffc3..5fa43f6fc 100644
--- a/docs/api/nidss_dengue.md
+++ b/docs/api/nidss_dengue.md
@@ -1,11 +1,25 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive NIDSS Dengue
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# NIDSS Dengue
+{: .no_toc}
+
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `nidss_dengue` |
+| **Data Source** | [Taiwan CDC](http://nidss.cdc.gov.tw/en/SingleDisease.aspx?dc=1&dt=4&disease=061&position=1)|
+| **Geographic Levels** | Taiwan regions and cities/counties (see [Geographic Codes](geographic_codes.html#nidss)) |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Reporting Cadence** | Inactive - No longer updated since 2018w10 |
+| **Temporal Scope Start** | 2003w01 |
+| **License** | [Open Access](https://data.gov.tw/license) |
+
+## Overview
+{: .no_toc}
This is the documentation of the API for accessing the Taiwan National Infectious Disease Statistics System Dengue (`nidss_dengue`) endpoint of
the [Delphi](https://delphi.cmu.edu/)'s epidemiological data.
@@ -15,19 +29,17 @@ General topics not specific to any particular endpoint are discussed in the
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## NIDSS Dengue Data
+## Table of contents
+{: .no_toc .text-delta}
+
+1. TOC
+{:toc}
-Counts of confirmed dengue cases from Taiwan's National Infectious Disease Statistics System (NIDSS).
- - Data source: [Taiwan CDC](http://nidss.cdc.gov.tw/en/SingleDisease.aspx?dc=1&dt=4&disease=061&position=1)
- - Temporal Resolution: Weekly from 2003w01
- - Spatial Resolution: By [hexchotomy region](https://en.wikipedia.org/wiki/Regions_of_Taiwan#Hexchotomy) ([6+1](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/nidss_regions.txt)) and by [city/county](https://en.wikipedia.org/wiki/List_of_administrative_divisions_of_Taiwan) ([22](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/nidss_locations.txt))
- - Open access
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/nidss_dengue/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
@@ -35,8 +47,8 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
| Parameter | Description | Type |
| --- | --- | --- |
-| `epiweeks` | epiweeks | `list` of epiweeks |
-| `locations` | locations | `list` of [region](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/nidss_regions.txt) and/or [location](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/nidss_locations.txt) labels |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+| `locations` | locations | `list` of Taiwan region and/or location labels (see [Geographic Codes](geographic_codes.html#nidss)) |
## Response
@@ -52,7 +64,7 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
# Example URLs
### NIDSS Dengue on 2015w01 (nationwide)
-https://api.delphi.cmu.edu/epidata/nidss_dengue/?locations=nationwide&epiweeks=201501
+
```json
{
@@ -71,49 +83,105 @@ https://api.delphi.cmu.edu/epidata/nidss_dengue/?locations=nationwide&epiweeks=2
# Code Samples
-Libraries are available for [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js), [Python](https://pypi.org/project/delphi-epidata/), and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
-The following samples show how to import the library and fetch national NIDSS Dengue data for epiweeks `201440` and `201501-201510` (11 weeks total).
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch national NIDSS Dengue data for epiweeks `201501-201510` (10 weeks total).
-### JavaScript (in a web browser)
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pub_nidss_dengue(locations=['nationwide'], epiweeks=EpiRange(201501, 201510))
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_nidss_dengue(locations = 'nationwide', epiweeks = epirange(201501, 201510))
+print(res)
+```
+
+
+
-### Python
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
Optionally install the package using pip(env):
-````bash
+```bash
pip install delphi-epidata
-````
+```
Otherwise, place `delphi_epidata.py` from this repo next to your python script.
-````python
+```python
# Import
from delphi_epidata import Epidata
# Fetch data
-res = Epidata.nidss_dengue(['nationwide'], [201440, Epidata.range(201501, 201510)])
+res = Epidata.nidss_dengue(['nationwide'], Epidata.range(201501, 201510))
print(res['result'], res['message'], len(res['epidata']))
-````
+```
+
+# Source and Licensing
-### R
+The full text of the NIDSS Dengue license information is available on the Taiwan Digital Development Department's [website](https://data.gov.tw/license).
+
-````R
-# Import
-source('delphi_epidata.R')
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
# Fetch data
-res <- Epidata$nidss_dengue(list('nationwide'), list(201440, Epidata$range(201501, 201510)))
-cat(paste(res$result, res$message, length(res$epidata), "\n"))
-````
+res <- Epidata$nidss_dengue(regions = list("nationwide"), epiweeks = Epidata$range(201501, 201510))
+print(res$message)
+print(length(res$epidata))
+```
+
-# Source and Licensing
+
+
+
+
+```html
+
+
+
+
+```
+
-The full text of the NIDSS Dengue license information is available on the Taiwan Digital Development Department's [website](https://data.gov.tw/license).
\ No newline at end of file
+
diff --git a/docs/api/nidss_flu.md b/docs/api/nidss_flu.md
index d35e991d3..b693c9aea 100644
--- a/docs/api/nidss_flu.md
+++ b/docs/api/nidss_flu.md
@@ -1,11 +1,27 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive NIDSS Flu
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# NIDSS Flu
+{: .no_toc}
+
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `nidss_flu` |
+| **Source** | [Taiwan CDC](http://nidss.cdc.gov.tw/en/CDCWNH01.aspx?dc=wnh) |
+| **Geographic Levels** | Taiwan regions (see [Geographic Codes](geographic_codes.html#taiwan-regions)) |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Reporting Cadence** | Inactive - No longer updated since 2018w10 |
+| **Temporal Scope Start** | 2008w14 |
+| **License** | [Open Access](https://data.gov.tw/license) |
+
+## Overview
+{: .no_toc}
+
+This data source provides weekly influenza case counts for Taiwan, as reported by the National Infectious Disease Statistics System (NIDSS).
This is the documentation of the API for accessing the Taiwan National Infectious Disease Statistics System Flu (`nidss_flu`) endpoint of
the [Delphi](https://delphi.cmu.edu/)'s epidemiological data.
@@ -15,21 +31,16 @@ General topics not specific to any particular endpoint are discussed in the
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## NIDSS Flu Data
-
-Outpatient ILI from Taiwan's National Infectious Disease Statistics System (NIDSS).
- - Source: [Taiwan CDC](http://nidss.cdc.gov.tw/en/CDCWNH01.aspx?dc=wnh)
- - Temporal Resolution: Weekly* from 2008w14
- - Spatial Resolution: By [hexchotomy region](https://en.wikipedia.org/wiki/Regions_of_Taiwan#Hexchotomy) ([6+1](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/nidss_regions.txt))
- - Open access
+## Table of contents
+{: .no_toc .text-delta}
-\* Data is usually released on Tuesday
+1. TOC
+{:toc}
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/nidss_flu/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
@@ -37,14 +48,14 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
| Parameter | Description | Type |
| --- | --- | --- |
-| `epiweeks` | epiweeks | `list` of epiweeks |
-| `regions` | regions | `list` of [region](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/nidss_regions.txt) labels |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+| `regions` | regions | `list` of Taiwan region labels (see [Geographic Codes](geographic_codes.html#taiwan-regions)) |
### Optional
| Parameter | Description | Type |
|-----------|--------------------------------------------|--------------------|
-| `issues` | issues | `list` of epiweeks |
+| `issues` | issues (see [Date Formats](date_formats.html)) | `list` of epiweeks |
| `lag` | # weeks between each epiweek and its issue | integer |
Notes:
@@ -69,7 +80,7 @@ If neither is specified, the current issues are used.
# Example URLs
### NIDSS Flu on 2015w01 (nationwide)
-https://api.delphi.cmu.edu/epidata/nidss_flu/?regions=nationwide&epiweeks=201501
+
```json
{
@@ -92,49 +103,105 @@ https://api.delphi.cmu.edu/epidata/nidss_flu/?regions=nationwide&epiweeks=201501
# Code Samples
-Libraries are available for [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js), [Python](https://pypi.org/project/delphi-epidata/), and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
-The following samples show how to import the library and fetch national NIDSS Flu data for epiweeks `201440` and `201501-201510` (11 weeks total).
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch national NIDSS Flu data for epiweeks `201501-201510` (10 weeks total).
-### JavaScript (in a web browser)
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pub_nidss_flu(regions=['nationwide'], epiweeks=EpiRange(201501, 201510))
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_nidss_flu(regions = 'nationwide', epiweeks = epirange(201501, 201510))
+print(res)
+```
+
+
+
-### Python
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
Optionally install the package using pip(env):
-````bash
+```bash
pip install delphi-epidata
-````
+```
Otherwise, place `delphi_epidata.py` from this repo next to your python script.
-````python
+```python
# Import
from delphi_epidata import Epidata
# Fetch data
-res = Epidata.nidss_flu(['nationwide'], [201440, Epidata.range(201501, 201510)])
+res = Epidata.nidss_flu(['nationwide'], Epidata.range(201501, 201510))
print(res['result'], res['message'], len(res['epidata']))
-````
+```
-### R
+# Source and Licensing
-````R
-# Import
-source('delphi_epidata.R')
+The full text of the NIDSS Flu license information is available on the Taiwan Digital Development Department's [website](https://data.gov.tw/license).
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
# Fetch data
-res <- Epidata$nidss_flu(list('nationwide'), list(201440, Epidata$range(201501, 201510)))
-cat(paste(res$result, res$message, length(res$epidata), "\n"))
-````
+res <- Epidata$nidss_flu(regions = list("nationwide"), epiweeks = Epidata$range(201501, 201510))
+print(res$message)
+print(length(res$epidata))
+```
+
-# Source and Licensing
+
+
+
+
+```html
+
+
+
+
+```
+
-The full text of the NIDSS Flu license information is available on the Taiwan Digital Development Department's [website](https://data.gov.tw/license).
\ No newline at end of file
+
diff --git a/docs/api/norostat.md b/docs/api/norostat.md
index 80c289c84..53e9e9164 100644
--- a/docs/api/norostat.md
+++ b/docs/api/norostat.md
@@ -1,51 +1,183 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive NoroSTAT
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# NoroSTAT
+{: .no_toc}
-This is the documentation of the API for accessing the NoroSTAT (`norostat`) endpoint of
-the [Delphi](https://delphi.cmu.edu/)'s epidemiological data.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `norostat` |
+| **Data Source** | [CDC NoroSTAT](https://www.cdc.gov/norovirus/php/reporting/norostat-data.html) metadata endpoint (requires authentication) |
+| **Dataset Type** | Surveillance (Inactive) |
+| **Geographic Levels** | Only a specific list of full state names are permitted. See the `locations` output of the [meta_norostat](meta_norostat.html#norostat-metadata-1) endpoint for the allowed values. |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Reporting Cadence** | Inactive - No longer updated since 2020w30. |
+| **Temporal Scope Start** | 2012w31 |
+| **License** | [Publicly Accessible US Government](https://www.usa.gov/government-works) |
+
+## Overview
+{: .no_toc}
+
+This data source provides norovirus surveillance data for US states, collected through the NoroSTAT system.
General topics not specific to any particular endpoint are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-**NOTE**: Delphi stopped stopped acquiring data from this data source in November 2020.
+## Table of contents
+{: .no_toc .text-delta}
-## NoroSTAT Data
+1. TOC
+{:toc}
-...
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/norostat/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
### Required
-
+| Parameter | Description | Type |
+| --- | --- | --- |
+| `auth` | password | string |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+| `locations` | locations | `string` with specific list of full state names |
## Response
-| Field | Description | Type |
-|-----------|-----------------------------------------------------------------|------------------|
-| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
-| `epidata` | list of results | array of objects |
-| ... | ... | ... |
-| `message` | `success` or error message | string |
+| Field | Description | Type |
+|---------------------------|-----------------------------------------------------------------|------------------|
+| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
+| `epidata` | list of results | array of objects |
+| `epidata[].release_date` | date when data was released | date (YYYY-MM-DD)|
+| `epidata[].epiweek` | epiweek for the data point | integer |
+| `epidata[].value` | count of norovirus outbreaks | integer |
+| `message` | `success` or error message | string |
# Example URLs
-
+### NoroSTAT on 2015w01
+
+
+```json
+{
+ "result": 1,
+ "epidata": [
+ {
+ "release_date": "2014-10-21",
+ "epiweek": 201233,
+ "value": 2
+ }
+ ],
+ "message": "success"
+}
+```
# Code Samples
-
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch NoroSTAT data for the most recent available states for epiweek `201501`.
+
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pvt_norostat(auth='auth_token', locations=['Minnesota, Ohio, Oregon, Tennessee, and Wisconsin'], epiweeks=[201501])
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pvt_norostat(auth = 'auth_token', locations = 'Minnesota, Ohio, Oregon, Tennessee, and Wisconsin', epiweeks = 201501)
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
+
+Optionally install the package using pip(env):
+```bash
+pip install delphi-epidata
+```
+
+Otherwise, place `delphi_epidata.py` from this repo next to your python script.
+
+```python
+# Import
+from delphi_epidata import Epidata
+# Fetch data
+res = Epidata.norostat('auth_token', ['Minnesota, Ohio, Oregon, Tennessee, and Wisconsin'], [201501])
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
+# Fetch data
+res <- Epidata$norostat(auth = "auth_token", locations = list("Minnesota, Ohio, Oregon, Tennessee, and Wisconsin"), epiweeks = list(201501))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/norostat_meta.md b/docs/api/norostat_meta.md
index 47b99dfd0..5f43349ef 100644
--- a/docs/api/norostat_meta.md
+++ b/docs/api/norostat_meta.md
@@ -1,12 +1,21 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive NoroSTAT Metadata
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
permalink: api/meta_norostat.html
---
# NoroSTAT Metadata
+{: .no_toc}
+
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `meta_norostat` |
+| **Data Source** | [CDC NoroSTAT](https://www.cdc.gov/norovirus/php/reporting/norostat-data.html) |
+| **Reporting Cadence** | Inactive - Delphi stopped stopped acquiring data from this data source in November 2020. |
+
+
This is the documentation of the API for accessing the NoroSTAT Metadata (`meta_norostat`) endpoint of
the [Delphi](https://delphi.cmu.edu/)'s epidemiological data.
@@ -16,35 +25,169 @@ General topics not specific to any particular endpoint are discussed in the
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## NoroSTAT Metadata
+## Table of contents
+{: .no_toc .text-delta}
-...
+1. TOC
+{:toc}
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/meta_norostat/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
### Required
-
+| Parameter | Description | Type |
+| --- | --- | --- |
+| `auth` | password | string |
## Response
-| Field | Description | Type |
-|-----------|-----------------------------------------------------------------|------------------|
-| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
-| `epidata` | list of results | array of objects |
-| ... | ... | ... |
-| `message` | `success` or error message | string |
+| Field | Description | Type |
+|-------------------------------|-----------------------------------------------------------------|------------------|
+| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
+| `epidata` | metadata object containing locations and releases | object |
+| `epidata.locations` | list of location sets available over time | array of objects |
+| `epidata.locations[].location`| comma-separated list of state names available in this release | string |
+| `epidata.releases` | list of data release dates | array of objects |
+| `epidata.releases[].release_date` | date when data was released (YYYY-MM-DD) | string |
+| `message` | `success` or error message | string |
# Example URLs
-
+### NoroSTAT Metadata
+
+
+```json
+{
+ "result": 1,
+ "epidata": {
+ "locations": [
+ {
+ "location": "Massachusetts, Michigan, Minnesota, Nebraska, New Mexico, Ohio, Oregon, South Carolina, Tennessee, Virginia, Wisconsin, and Wyoming"
+ },
+ {
+ "location": "Massachusetts, Michigan, Minnesota, New Mexico, Ohio, Oregon, South Carolina, Tennessee, Virginia, Wisconsin, and Wyoming"
+ },
+ {
+ "location": "Massachusetts, Michigan, Minnesota, Ohio, Oregon, South Carolina, Tennessee, Virginia, and Wisconsin"
+ },
+ {
+ "location": "Michigan, Minnesota, Ohio, Oregon, South Carolina, Tennessee, and Wisconsin"
+ },
+ {
+ "location": "Minnesota, Ohio, Oregon, Tennessee, and Wisconsin"
+ }
+ ],
+ "releases": [
+ {"release_date": "2014-10-21"},
+ {"release_date": "2015-03-30"},
+ ...]
+ },
+ "message": "success"
+}
+```
# Code Samples
-
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch NoroSTAT Metadata.
+
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pvt_meta_norostat(auth='auth_token')
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pvt_meta_norostat(auth = 'auth_token')
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
+
+Optionally install the package using pip(env):
+```bash
+pip install delphi-epidata
+```
+
+Otherwise, place `delphi_epidata.py` from this repo next to your python script.
+
+```python
+# Import
+from delphi_epidata import Epidata
+# Fetch data
+res = Epidata.meta_norostat('auth_token')
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
+# Fetch data
+res <- Epidata$meta_norostat(auth = "auth_token")
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/paho_dengue.md b/docs/api/paho_dengue.md
index 70d3bb300..ef2bf62cc 100644
--- a/docs/api/paho_dengue.md
+++ b/docs/api/paho_dengue.md
@@ -1,49 +1,193 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive PAHO Dengue
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# PAHO Dengue
+{: .no_toc}
-This is the documentation of the API for accessing the PAHO Dengue (`paho_dengue`) endpoint of
-the [Delphi](https://delphi.cmu.edu/)'s epidemiological data.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `paho_dengue` |
+| **Data Source** | [Pan American Health Organization (PAHO) Dengue surveillance](https://www.paho.org/en/arbo-portal/dengue-data-and-analysis) |
+| **Geographic Levels** | Countries and territories in the Americas (see [Geographic Codes](geographic_codes.html#countries-and-territories-in-the-americas))
*Note: Data availability varies by country.* |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Reporting Cadence** | Inactive - No longer updated since 2020w31 |
+| **Temporal Scope Start** | 2014w01 |
+| **License** | This was scraped from a publicly-accessible website, but no explicit license terms were found. |
+
+## Overview
+{: .no_toc}
+
+This data source provides weekly dengue case counts for countries and territories in the Americas, as reported by the Pan American Health Organization (PAHO).
General topics not specific to any particular endpoint are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## PAHO Dengue Data
+## Table of contents
+{: .no_toc .text-delta}
+
+1. TOC
+{:toc}
+
-...
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/paho_dengue/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
### Required
-
+| Parameter | Description | Type |
+| --- | --- | --- |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+| `regions` | regions | `list` of region labels (see [Geographic Codes](geographic_codes.html#paho-dengue)) |
## Response
-| Field | Description | Type |
-|-----------|-----------------------------------------------------------------|------------------|
-| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
-| `epidata` | list of results | array of objects |
-| ... | ... | ... |
-| `message` | `success` or error message | string |
+| Field | Description | Type |
+|------------------------------|-----------------------------------------------------------------|------------------|
+| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
+| `epidata` | list of results | array of objects |
+| `epidata[].release_date` | date when data was released | date (YYYY-MM-DD)|
+| `epidata[].region` | region label (ISO 3166-1 alpha-2 code) | string |
+| `epidata[].serotype` | dengue serotype information | string |
+| `epidata[].issue` | epiweek when data was issued | integer |
+| `epidata[].epiweek` | epiweek for the data point | integer |
+| `epidata[].lag` | number of weeks between epiweek and issue | integer |
+| `epidata[].total_pop` | total population (in thousands) | integer |
+| `epidata[].num_dengue` | total number of dengue cases | integer |
+| `epidata[].num_severe` | number of severe dengue cases | integer |
+| `epidata[].num_deaths` | number of dengue-related deaths | integer |
+| `epidata[].incidence_rate` | incidence rate per 100,000 population | float |
+| `message` | `success` or error message | string |
# Example URLs
-
+### PAHO Dengue on 2015w01 (Canada)
+
+
+```json
+{
+ "result": 1,
+ "epidata": [
+ {
+ "release_date": "2020-08-07",
+ "region": "CA",
+ "serotype": " ",
+ "issue": 202032,
+ "epiweek": 201501,
+ "lag": 291,
+ "total_pop": 0,
+ "num_dengue": 0,
+ "num_severe": 0,
+ "num_deaths": 0,
+ "incidence_rate": 0.0
+ }
+ ],
+ "message": "success"
+}
+```
# Code Samples
-
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch PAHO Dengue data for Canada for epiweek `201501`.
+
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pub_paho_dengue(regions=['ca'], epiweeks=[201501])
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_paho_dengue(regions = 'ca', epiweeks = 201501)
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
+
+Place `delphi_epidata.py` from this repo next to your python script.
+
+```python
+# Import
+from delphi_epidata import Epidata
+# Fetch data
+res = Epidata.paho_dengue(['ca'], [201501])
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
+# Fetch data
+res <- Epidata$paho_dengue(regions = list("ca"), epiweeks = list(201501))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/quidel.md b/docs/api/quidel.md
index 28655e219..590f2232d 100644
--- a/docs/api/quidel.md
+++ b/docs/api/quidel.md
@@ -1,23 +1,40 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive Quidel
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# Quidel
+{: .no_toc}
-This is the documentation of the API for accessing the Quidel (`quidel`) endpoint of the Delphi’s epidemiological data.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `quidel` |
+| **Data Source** | QuidelOrtho Corp. influenza testing data |
+| **Geographic Levels** | HHS regions (see [Geographic Codes](geographic_codes.html#hhs-regions)) |
+| **Temporal Granularity** | Weekly (Epiweek) |
+| **Reporting Cadence** | Inactive - No longer updated since 2020w15|
+| **Temporal Scope Start** | 2015w35 |
+
+
+
+## Overview
+{: .no_toc}
+
+This data source provides influenza testing data from Quidel Corporation, covering HHS health regions in the United States.
General topics not specific to any particular endpoint are discussed in the [API overview](https://cmu-delphi.github.io/delphi-epidata/). Such topics include: [contributing](https://cmu-delphi.github.io/delphi-epidata/api/README.html#contributing), [citing](https://cmu-delphi.github.io/delphi-epidata/api/README.html#citing), and [data licensing](https://cmu-delphi.github.io/delphi-epidata/api/README.html#data-licensing).
-## Quidel Data
+## Table of contents
+{: .no_toc .text-delta}
-Data provided by Quidel Corp., which contains flu lab test results.
+1. TOC
+{:toc}
## The API
-The base URL is: https://api.delphi.cmu.edu/epidata/quidel/
+The base URL is:
See this [documentation](https://cmu-delphi.github.io/delphi-epidata/api/README.html) for details on specifying epiweeks, dates, and lists.
@@ -28,14 +45,142 @@ See this [documentation](https://cmu-delphi.github.io/delphi-epidata/api/README.
| Parameter | Description | Type |
| --- | --- | --- |
| `auth` | password | string |
-| `epiweeks` | epiweeks | `list` of epiweeks |
-| `locations` | locations | `list` of `hhs<#>` [region](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/regions.txt) labels |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+| `locations` | locations | `list` of `hhs<#>` region labels (see [Geographic Codes](geographic_codes.html#hhs-regions)) |
## Response
-| Field | Description | Type |
-|-----------|-----------------------------------------------------------------|------------------|
-| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
-| `epidata` | list of results | array of objects |
-| ... | ... | ... |
-| `message` | `success` or error message | string |
\ No newline at end of file
+| Field | Description | Type |
+|-----------------------|-----------------------------------------------------------------|------------------|
+| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
+| `epidata` | list of results | array of objects |
+| `epidata[].location` | HHS region label | string |
+| `epidata[].epiweek` | epiweek for the data point | integer |
+| `epidata[].value` | percentage of positive influenza tests | float |
+| `message` | `success` or error message | string |
+
+# Example URLs
+
+### Quidel on 2015w35-2020w01 (HHS Region 1)
+
+
+```json
+{
+ "result": 1,
+ "epidata": [
+ {
+ "location": "hhs1",
+ "epiweek": 201535,
+ "value": 2.0
+ },
+ {
+ "location": "hhs1",
+ "epiweek": 201536,
+ "value": 6.16667
+ },
+ ...
+ ],
+ "message": "success"
+}
+```
+
+# Code Samples
+
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch Quidel data for HHS Region 1 for epiweeks `201535-202001`.
+
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pvt_quidel(auth='auth_token', locations=['hhs1'], epiweeks=EpiRange(201535, 202001))
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pvt_quidel(auth = 'auth_token', locations = 'hhs1', epiweeks = epirange(201535, 202001))
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
+
+Optionally install the package using pip(env):
+```bash
+pip install delphi-epidata
+```
+
+Otherwise, place `delphi_epidata.py` from this repo next to your python script.
+
+```python
+# Import
+from delphi_epidata import Epidata
+# Fetch data
+res = Epidata.quidel('auth_token', ['hhs1'], Epidata.range(201535, 202001))
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
+# Fetch data
+res <- Epidata$quidel(auth = "auth_token", locations = list("hhs1"), epiweeks = Epidata$range(201535, 202001))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/twitter.md b/docs/api/twitter.md
index e14d940b6..65c026422 100644
--- a/docs/api/twitter.md
+++ b/docs/api/twitter.md
@@ -1,33 +1,47 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive Twitter Stream
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# Twitter Stream
+{: .no_toc}
-This is the API documentation for accessing the Twitter Stream (`twitter`)
-endpoint of [Delphi](https://delphi.cmu.edu/)'s epidemiological data.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `twitter` |
+| **Data Source** | [HealthTweets](http://www.healthtweets.org/) |
+| **Geographic Levels** | National, HHS regions, Census divisions, and US states (see [Geographic Codes](geographic_codes.html#us-regions-and-states)) |
+| **Temporal Granularity** | Daily and Weekly (Epiweek) |
+| **Reporting Cadence** | Inactive - No longer updated since 2020w31 (2020-12-07)|
+| **Temporal Scope Start** | 2011w48 (2011-11-27) |
+
+
+
+## Overview
+{: .no_toc}
+
+Estimate of influenza activity based on analysis of language used in tweets.
General topics not specific to any particular endpoint are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## Twitter Stream Data
+## Table of contents
+{: .no_toc .text-delta}
-Estimate of influenza activity based on analysis of language used in tweets.
- - Source: [HealthTweets](http://www.healthtweets.org/)
- - Temporal Resolution: Daily and weekly from 2011-12-01 (2011w48)
- - Spatial Resolution: National, [HHS regions](http://www.hhs.gov/iea/regional/), and [Census divisions](http://www.census.gov/econ/census/help/geography/regions_and_divisions.html) ([1+10+9](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/regions.txt)); and by state/territory ([51](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/states.txt))
- - Restricted access: Delphi doesn't have permission to share this dataset
+1. TOC
+{:toc}
+
+{: .note}
+> **Note:** Restricted access: Delphi doesn't have permission to share this dataset.
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/twitter/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
@@ -36,32 +50,45 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
| Parameter | Description | Type |
| --- | --- | --- |
| `auth` | password | string |
-| `locations` | locations | `list` of [region](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/regions.txt)/[state](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/states.txt) labels |
-| `dates` | dates | `list` of dates |
-| `epiweeks` | epiweeks | `list` of epiweeks |
+| `locations` | locations | `list` of location codes: `nat`, HHS regions, Census divisions, or state codes (see [Geographic Codes](geographic_codes.html#us-regions-and-states)) |
+| `dates` | dates (see [Date Formats](date_formats.html)) | `list` of dates |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
-Note:
-- Only one of `dates` and `epiweeks` is required. If both are provided, `epiweeks` is ignored.
+{: .note}
+> **Note:** Only one of `dates` and `epiweeks` is required. If both are provided, `epiweeks` is ignored.
## Response
-| Field | Description | Type |
-|-----------|-----------------------------------------------------------------|------------------|
-| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
-| `epidata` | list of results | array of objects |
-| ... | ... | ... |
-| `message` | `success` or error message | string |
+| Field | Description | Type |
+|-----------------------|-----------------------------------------------------------------|------------------|
+| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
+| `epidata` | list of results | array of objects |
+| `epidata[].location` | location label | string |
+| `epidata[].date` | date (yyyy-MM-dd) | string |
+| `epidata[].epiweek` | epiweek | integer |
+| `epidata[].num` | number of tweets | integer |
+| `epidata[].total` | total tweets | integer |
+| `epidata[].percent` | percent of tweets | float |
+| `message` | `success` or error message | string |
# Example URLs
### Twitter on 2015w01 (national)
-https://api.delphi.cmu.edu/epidata/twitter/?auth=...&locations=nat&epiweeks=201501
+
```json
{
- "result":1,
- "epidata":[...],
- "message":"success"
+ "result": 1,
+ "epidata": [
+ {
+ "location": "nat",
+ "num": 3067,
+ "total": 443291,
+ "epiweek": 201501,
+ "percent": 0.6919
+ }
+ ],
+ "message": "success"
}
```
# Citing the Survey
@@ -70,8 +97,106 @@ Researchers who use the Twitter Stream data for research are asked to credit and
> Mark Dredze, Renyuan Cheng, Michael J Paul, David A Broniatowski. HealthTweets.org: A Platform for Public Health Surveillance using Twitter. AAAI Workshop on the World Wide Web and Public Health
> Intelligence, 2014.
-
+
# Code Samples
-
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch Twitter data for national level for epiweek `201501`.
+
+
+
+
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
+
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pvt_twitter(auth='auth_token', locations=['nat'], time_type="week", time_values=[201501])
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pvt_twitter(auth = 'auth_token', locations = 'nat',
+ time_type = "week", time_values = 201501)
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
+
+Optionally install the package using pip(env):
+```bash
+pip install delphi-epidata
+```
+
+Otherwise, place `delphi_epidata.py` from this repo next to your python script.
+
+```python
+# Import
+from delphi_epidata import Epidata
+# Fetch data
+res = Epidata.twitter('auth_token', ['nat'], time_type="week", time_values=[201501])
+print(res['result'], res['message'], len(res['epidata']))
+```
+
+
+
+
+Place `delphi_epidata.R` from this repo next to your R script.
+
+```R
+source("delphi_epidata.R")
+# Fetch data
+res <- Epidata$twitter(auth = "auth_token", locations = list("nat"), time_type = "week", time_values = list(201501))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/api/wiki.md b/docs/api/wiki.md
index ba780ea6f..dfb64ecab 100644
--- a/docs/api/wiki.md
+++ b/docs/api/wiki.md
@@ -1,34 +1,45 @@
---
+parent: Inactive Sources (Other)
+grand_parent: Data Sources and Signals
title: inactive Wikipedia Access
-parent: Data Sources and Signals
-grand_parent: Other Endpoints (COVID-19 and Other Diseases)
-nav_order: 2
---
# Wikipedia Access
+{: .no_toc}
-This is the API documentation for accessing the Wikipedia Access (`wiki`)
-endpoint of [Delphi](https://delphi.cmu.edu/)'s epidemiological data.
+
+| Attribute | Details |
+| :--- | :--- |
+| **Source Name** | `wiki` |
+| **Data Source** | [Wikimedia pageviews](https://dumps.wikimedia.org/other/pagecounts-raw/) for health-related Wikipedia articles |
+| **Geographic Levels** | Not applicable (article-based) |
+| **Temporal Granularity** | Hourly, Daily, and Weekly (Epiweek) |
+| **Available Articles** | [54 health-related articles](#available-articles) |
+| **Reporting Cadence** | Inactive - No longer updated since 2021w11|
+| **Temporal Scope Start** | 2007w50 (December 9th, 2007) |
+| **License** | [CC BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) |
+
+
+## Overview
+{: .no_toc}
+
+This data source provides pageview counts for Influenza-related Wikipedia articles, which can serve as indicators of public health interest and awareness.
General topics not specific to any particular endpoint are discussed in the
[API overview](README.md). Such topics include:
[contributing](README.md#contributing), [citing](README.md#citing), and
[data licensing](README.md#data-licensing).
-## Wikipedia Access Data
+## Table of contents
+{: .no_toc .text-delta}
-Number of page visits for selected English, Influenza-related wikipedia articles.
- - Source: [Wikimedia](https://dumps.wikimedia.org/other/pagecounts-raw/)
- - Temporal Resolution: Hourly, daily, and weekly from 2007-12-09 (2007w50)
- - Spatial Resolution: N/A
- - Other resolution: By article ([54](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/articles.txt))
- - Open access
+1. TOC
+{:toc}
# The API
-The base URL is: https://api.delphi.cmu.edu/epidata/wiki/
+The base URL is:
-See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
## Parameters
@@ -36,13 +47,78 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
| Parameter | Description | Type |
| --- | --- | --- |
-| `articles` | articles | list of [articles](https://github.com/cmu-delphi/delphi-epidata/blob/main/labels/articles.md) |
+| `articles` | articles | list of [articles](#available-articles) |
| `language` | language (currently `en`, `es`, and `pt` supported) | string |
-| `dates` | dates | `list` of dates |
-| `epiweeks` | epiweeks | `list` of epiweeks |
+| `dates` | dates (see [Date Formats](date_formats.html)) | `list` of dates |
+| `epiweeks` | epiweeks (see [Date Formats](date_formats.html)) | `list` of epiweeks |
+
+#### Available Articles
+
+The following health-related Wikipedia articles are available:
+
+
+Click to expand full list of articles
+
+| Article Name |
+|---|
+| amantadine |
+| antiviral_drugs |
+| avian_influenza |
+| canine_influenza |
+| cat_flu |
+| chills |
+| common_cold |
+| cough |
+| equine_influenza |
+| fatigue_(medical) |
+| fever |
+| flu_season |
+| gastroenteritis |
+| headache |
+| hemagglutinin_(influenza) |
+| human_flu |
+| influenza |
+| influenzalike_illness |
+| influenzavirus_a |
+| influenzavirus_c |
+| influenza_a_virus |
+| influenza_a_virus_subtype_h10n7 |
+| influenza_a_virus_subtype_h1n1 |
+| influenza_a_virus_subtype_h1n2 |
+| influenza_a_virus_subtype_h2n2 |
+| influenza_a_virus_subtype_h3n2 |
+| influenza_a_virus_subtype_h3n8 |
+| influenza_a_virus_subtype_h5n1 |
+| influenza_a_virus_subtype_h7n2 |
+| influenza_a_virus_subtype_h7n3 |
+| influenza_a_virus_subtype_h7n7 |
+| influenza_a_virus_subtype_h7n9 |
+| influenza_a_virus_subtype_h9n2 |
+| influenza_b_virus |
+| influenza_pandemic |
+| influenza_prevention |
+| influenza_vaccine |
+| malaise |
+| myalgia |
+| nasal_congestion |
+| nausea |
+| neuraminidase_inhibitor |
+| orthomyxoviridae |
+| oseltamivir |
+| paracetamol |
+| rhinorrhea |
+| rimantadine |
+| shivering |
+| sore_throat |
+| swine_influenza |
+| viral_neuraminidase |
+| viral_pneumonia |
+| vomiting |
+| zanamivir |
+
+
+
-Note:
-- Only one of `dates` and `epiweeks` is required. If both are provided, `epiweeks` is ignored.
### Optional
@@ -50,25 +126,31 @@ Note:
|-----------|-------------|------------------------|
| `hours` | hours | `list` of hours (0-23) |
+{: .note}
+> **Notes:**
+> - Only one of `dates` and `epiweeks` is required. If both are provided, `epiweeks` is ignored.
+> - `dates`, `epiweeks`, and `hours` are `None` by default.
+> - `language` is `en` by default.
+
## Response
| Field | Description | Type |
|---------------------|-----------------------------------------------------------------|------------------|
| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
| `epidata` | list of results | array of objects |
-| `epidata[].article` | | string |
-| `epidata[].count` | | integer |
-| `epidata[].total` | | integer |
-| `epidata[].hour` | hour (-1 if `hour` not used) | integer |
+| `epidata[].article` | Wikipedia article name | string |
+| `epidata[].count` | number of pageviews | integer |
+| `epidata[].total` | total pageviews | integer |
+| `epidata[].hour` | hour (-1 if `hour` not used) | integer |
| `epidata[].date` | date (yyyy-MM-dd) (only included if `date` used) | string |
| `epidata[].epiweek` | epiweek (only included if `epiweek` used) | integer |
-| `epidata[].value` | | float |
+| `epidata[].value` | normalized pageview count | float |
| `message` | `success` or error message | string |
# Example URLs
### Wikipedia Access article "influenza" on 2020w01
-https://api.delphi.cmu.edu/epidata/wiki/?language=en&articles=influenza&epiweeks=202001
+
```json
{
@@ -88,7 +170,7 @@ https://api.delphi.cmu.edu/epidata/wiki/?language=en&articles=influenza&epiweeks
```
### Wikipedia Access article "influenza" on date 2020-01-01
-https://api.delphi.cmu.edu/epidata/wiki/?language=en&articles=influenza&dates=20200101
+
```json
{
@@ -109,52 +191,101 @@ https://api.delphi.cmu.edu/epidata/wiki/?language=en&articles=influenza&dates=20
# Code Samples
-Libraries are available for [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.js), [Python](https://pypi.org/project/delphi-epidata/), and [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R).
-The following samples show how to import the library and fetch national Wikipedia Access data for article "influenza" on
-epiweeks `201940` and `202001-202010` (11 weeks total) for hours 0 and 12 in English.
+Libraries are available for [R](https://cmu-delphi.github.io/epidatr/) and [Python](https://cmu-delphi.github.io/epidatpy/).
+The following samples show how to import the library and fetch Wikipedia Access data for article "influenza" in English for epiweeks `202001-202010` (10 weeks total) and hours 0 and 12.
-
+
+
-````html
-
-
-
-
-````
+
+
+Install the package using pip:
+```bash
+pip install -e "git+https://github.com/cmu-delphi/epidatpy.git#egg=epidatpy"
+```
-### Python
+```python
+# Import
+from epidatpy import CovidcastEpidata, EpiDataContext, EpiRange
+# Fetch data
+epidata = EpiDataContext()
+res = epidata.pub_wiki(articles=['influenza'], time_values=EpiRange(202001, 202010), time_type='week', language='en', hours=[0, 12])
+print(res)
+```
+
+
+
+
+```R
+library(epidatr)
+# Fetch data
+res <- pub_wiki(articles = "influenza", time_values = epirange(202001, 202010),
+ time_type = "week", language = "en", hours = c(0, 12))
+print(res)
+```
+
+
+
+
+### Legacy Clients
+
+We recommend using the modern client libraries mentioned above. Legacy clients are also available for [Python](https://pypi.org/project/delphi-epidata/), [R](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.R), and [JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.js).
+
+
+
+
+
Optionally install the package using pip(env):
-````bash
+```bash
pip install delphi-epidata
-````
+```
Otherwise, place `delphi_epidata.py` from this repo next to your python script.
-````python
+```python
# Import
from delphi_epidata import Epidata
# Fetch data
-res = Epidata.wiki(['influenza'], None, [201940, Epidata.range(202001, 202010)], [0, 12])
+res = Epidata.wiki(['influenza'], Epidata.range(202001, 202010), {'time_type': 'week', 'language': 'en', 'hours': [0, 12]})
print(res['result'], res['message'], len(res['epidata']))
-````
+```
+
-Note:
-- `dates`, `epiweeks`, and `hours` are `None` by default.
-- `language` is `en` by default.
+
-### R
+Place `delphi_epidata.R` from this repo next to your R script.
-````R
-# Import
-source('delphi_epidata.R')
+```R
+source("delphi_epidata.R")
# Fetch data
-res <- Epidata$wiki(list('nat'), NULL, list(201940, Epidata$range(202001, 202010)), list(0, 12), 'en')
-cat(paste(res$result, res$message, length(res$epidata), "\n"))
-````
+res <- Epidata$wiki(articles = list("influenza"), time_values = Epidata$range(202001, 202010), time_type = "week", options = list(language = "en", hours = list(0, 12)))
+print(res$message)
+print(length(res$epidata))
+```
+
+
+
+
+
+```html
+
+
+
+
+```
+
+
+
diff --git a/docs/assets/js/tabs.js b/docs/assets/js/tabs.js
new file mode 100644
index 000000000..e4ee598a5
--- /dev/null
+++ b/docs/assets/js/tabs.js
@@ -0,0 +1,31 @@
+// Simple Tab Switching Logic
+function activateTab(clickedButton, container) {
+ const buttons = container.querySelectorAll('.tab-header button');
+ const contents = container.querySelectorAll('.tab-content');
+
+ // Deactivate all
+ buttons.forEach(btn => btn.classList.remove('active'));
+ contents.forEach(content => content.classList.remove('active'));
+
+ // Activate clicked button
+ clickedButton.classList.add('active');
+
+ // Activate corresponding content
+ const tabId = clickedButton.dataset.tab;
+ const content = container.querySelector(`.tab-content[data-tab="${tabId}"]`);
+ if (content) {
+ content.classList.add('active');
+ }
+}
+
+function initTabContainer(container) {
+ const buttons = container.querySelectorAll('.tab-header button');
+ buttons.forEach(button => {
+ button.addEventListener('click', () => activateTab(button, container));
+ });
+}
+
+document.addEventListener('DOMContentLoaded', () => {
+ const tabContainers = document.querySelectorAll('.code-tabs');
+ tabContainers.forEach(initTabContainer);
+});
diff --git a/docs/symptom-survey/contingency-tables.md b/docs/symptom-survey/contingency-tables.md
index f92ee1ef4..b05a871aa 100644
--- a/docs/symptom-survey/contingency-tables.md
+++ b/docs/symptom-survey/contingency-tables.md
@@ -30,7 +30,7 @@ territories worldwide, also [through
ICPSR](https://www.icpsr.umich.edu/web/ICPSR/studies/39206).
These tables are more detailed than the [coarse aggregates reported in the
-COVIDcast Epidata API](../api/covidcast-signals/fb-survey.md), which are grouped
+COVIDcast Epidata API](../api/covidcast-signals/covid-trends-and-impact-survey.md), which are grouped
only by geographic region. [Individual response data](survey-files.md) for the
survey is available, but only to researchers who request restricted data access
via ICPSR, whereas these contingency tables are available to the general public.
diff --git a/docs/symptom-survey/data-access.md b/docs/symptom-survey/data-access.md
index 435f07ee2..6c30c759c 100644
--- a/docs/symptom-survey/data-access.md
+++ b/docs/symptom-survey/data-access.md
@@ -13,7 +13,7 @@ well-being. This may help improve our local and national responses to the
pandemic and our understanding of how it has affected society.
[High-level aggregates](../api/covidcast.md) of select survey items are
-publicly available in the [COVIDcast API](../api/covidcast-signals/fb-survey.md).
+publicly available in the [COVIDcast API](../api/covidcast-signals/covid-trends-and-impact-survey.md).
[Finer aggregates](./contingency-tables.md) grouped by various demographic
characteristics are available for download.
diff --git a/docs/symptom-survey/index.md b/docs/symptom-survey/index.md
index 48b42b012..dbba7e899 100644
--- a/docs/symptom-survey/index.md
+++ b/docs/symptom-survey/index.md
@@ -40,7 +40,7 @@ If you have questions about the survey or getting access to data, contact us at
The [survey results dashboard](https://delphi.cmu.edu/covidcast/survey-results/)
provides a high-level summary of survey results. Geographically aggregated data
from this survey is publicly available through the [COVIDcast API](../api/covidcast.md)
-as the [`fb-survey` data source](../api/covidcast-signals/fb-survey.md). Demographic breakdowns of survey
+as the [`fb-survey` data source](../api/covidcast-signals/covid-trends-and-impact-survey.md). Demographic breakdowns of survey
data are publicly available as [downloadable contingency tables](contingency-tables.md).
CTIS data has been used in [numerous peer-reviewed publications](publications.md).
diff --git a/docs/symptom-survey/weights.md b/docs/symptom-survey/weights.md
index 3cd1c60ee..a6a5df858 100644
--- a/docs/symptom-survey/weights.md
+++ b/docs/symptom-survey/weights.md
@@ -10,7 +10,7 @@ nav_order: 5
The survey's individual response files contain respondent weights calculated
by Facebook. These weights are also used to produce our
[public contingency tables](./contingency-tables.md) and the geographic aggregates
-[in the COVIDcast Epidata API](../api/covidcast-signals/fb-survey.md).
+[in the COVIDcast Epidata API](../api/covidcast-signals/covid-trends-and-impact-survey.md).
Facebook has developed a [User Guide for the CTIS
Weights](https://dataforgood.facebook.com/dfg/resources/user-guide-for-ctis-weights)
diff --git a/docs/tabs_demo.md b/docs/tabs_demo.md
new file mode 100644
index 000000000..33adcb6b7
--- /dev/null
+++ b/docs/tabs_demo.md
@@ -0,0 +1,150 @@
+---
+title: Documentation Features Tutorial
+nav_exclude: true
+---
+
+# Documentation Features Tutorial
+{: .no_toc}
+
+
+## Table of Contents
+{: .no_toc .text-delta}
+
+1. TOC
+{:toc}
+
+## Callouts
+
+You can use blockquotes with specific classes to create callouts for notes, warnings, and other important information.
+
+### Syntax
+
+Use the following syntax:
+
+```markdown
+> **Label:** Your text here.
+{: .class-name }
+```
+
+### Available Classes
+
+#### Note
+```markdown
+> **Note:** This is a note.
+{: .note }
+```
+> **Note:** This is a note.
+{: .note }
+
+#### Important
+```markdown
+> **Important:** This is important information.
+{: .important }
+```
+> **Important:** This is important information.
+{: .important }
+
+#### Warning
+```markdown
+> **Warning:** This is a warning.
+{: .warning }
+```
+> **Warning:** This is a warning.
+{: .warning }
+
+#### Tip
+```markdown
+> **Tip:** This is a helpful tip.
+{: .tip }
+```
+> **Tip:** This is a helpful tip.
+{: .tip }
+
+#### Caution
+```markdown
+> **Caution:** Proceed with caution.
+{: .caution }
+```
+> **Caution:** Proceed with caution.
+{: .caution }
+
+## Code Tabs
+
+### Structure
+
+The structure consists of a container `div` with class `code-tabs`, a header `div` with class `tab-header` containing buttons, and multiple content `div`s with class `tab-content`.
+
+**Key Requirements:**
+1. **Container:** ``
+2. **Header:** `