MyNixOS website logo
Description

Access Infectious and Epidemiological Data via 'disease.sh API'.

Provides functions to access real-time infectious disease data from the 'disease.sh API', including COVID-19 global, US states, continent, and country statistics, vaccination coverage, influenza-like illness data from Centers for Disease Control and Prevention (CDC), and more. Also includes curated datasets on a variety of infectious diseases such as influenza, measles, dengue, Ebola, tuberculosis, meningitis, AIDS, and others. The package supports epidemiological research and data analysis by combining API access with high-quality historical and survey datasets on infectious diseases. For more details on the 'disease.sh API', see <https://disease.sh/>.

infectiousR

The infectiousR package provides a seamless interface to access real-time data on infectious diseases through the disease.sh API, a RESTful API offering global health statistics. The package enables users to explore up-to-date information on disease outbreaks, vaccination progress, and surveillance metrics across countries, continents, and U.S. states.

It includes a set of API-related functions to retrieve real-time statistics on COVID-19, influenza-like illnesses from the Centers for Disease Control and Prevention (CDC), and vaccination coverage worldwide.

Installation

You can install the infectiousR package from CRAN with the following R function:


install.packages("infectiousR")

Load the Package


library(infectiousR)

Functions for infectiousR

The infectiousR package provides several core functions to retrieve real-time infectious disease data from the disease.sh API. Below is a list of the main API-access functions included in the package:

  • get_global_covid_stats() – Retrieves global COVID-19 statistics, including total cases, deaths, recoveries, and more.

  • get_covid_stats_by_country_name() – Fetches COVID-19 statistics for a specific country by name (e.g., "Brazil", "India").

  • get_covid_stats_by_country() – Retrieves COVID-19 data for all countries.

  • get_covid_stats_by_continent() – Retrieves COVID-19 data grouped by continent.

  • get_us_states_covid_stats() – Returns COVID-19 statistics for all U.S. states.

  • get_covid_stats_for_state() – Retrieves data for specified U.S. states (e.g., "NEW YORK", "california").

  • get_influenza_cdc_ili() – Accesses influenza-like illness (ILI) data from the CDC.

  • view_datasets_infectiousR() – Lists all curated datasets available in the infectiousR package.

Dataset Suffixes

Each dataset in infectiousR is labeled with a suffix to indicate its type and structure:

  • _df: A standard data frame.

  • _tbl_df: A tibble, a modern version of a data frame with better formatting and functionality.

  • _ts: A time series.

Datasets Included in infectiousR

In addition to API functions, infectiousR includes several preloaded datasets that provide valuable insights into various aspects of infectious diseases such as influenza, measles, dengue, Ebola, tuberculosis, meningitis,AIDS, and others:

  • spanish_flu_df: Contains daily mortality records from the 1918 influenza pandemic.

  • fungal_infections_df: Provides clinical treatment outcomes for systemic fungal infections.

  • aids_azt_df: Documents AIDS symptom progression and zidovudine (AZT) treatment responses.

  • meningitis_df: Records meningococcal disease cases with treatment response metadata (includes missing data indicators).

Example Code:


# Load the package

library(infectiousR)

# List all datasets in the package

view_datasets_infectiousR()

# Load dataset

data(spanish_flu_df)

# Preview the dataset

head(spanish_flu_df)

# Open in Viewer

View(spanish_flu_df)

Metadata

Version

0.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows