| Title: | Retrieve and Explore ERVISS Respiratory Virus Surveillance Data |
|---|---|
| Description: | Provides easy access to ERVISS (European Respiratory Virus Surveillance Summary) data from the EU-ECDC <https://github.com/EU-ECDC/Respiratory_viruses_weekly_data>. Enables retrieval, filtering, and optional visualization of data across European countries. Data is fetched directly from the EU-ECDC Respiratory Viruses Weekly Data repository, with support for both latest data and historical snapshots for reproducible analyses. |
| Authors: | Yohann Mansiaux [aut, cre] |
| Maintainer: | Yohann Mansiaux <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-10 08:48:23 UTC |
| Source: | https://github.com/epiconcept-paris/ervissexplore |
Retrieves and filters data from the ERVISS (European Respiratory Virus Surveillance Summary). This is a generic function that can retrieve any of the available data types.
get_erviss_data( type = ERVISS_TYPES, csv_file = NULL, date_min, date_max, pathogen = "", variant = "", indicator = "", age = "", countries = "", min_value = 0, use_snapshot = FALSE, snapshot_date = NULL )get_erviss_data( type = ERVISS_TYPES, csv_file = NULL, date_min, date_max, pathogen = "", variant = "", indicator = "", age = "", countries = "", min_value = 0, use_snapshot = FALSE, snapshot_date = NULL )
type |
Type of data. One of: "positivity", "variants", "ili_ari_rates", "sari_rates", "sari_positivity", "nonsentinel_severity", "nonsentinel_tests". |
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
pathogen |
Character vector of pathogen names to filter. Used for types: "positivity", "sari_positivity", "nonsentinel_severity", "nonsentinel_tests". Use "" (default) to include all pathogens. |
variant |
Character vector of variant names to filter. Only used for type = "variants". Use "" (default) to include all variants. |
indicator |
Character vector of indicators to filter. The available values depend on the data type. Use "" (default) to include all indicators. |
age |
Character vector of age groups to filter. Used for types: "ili_ari_rates", "sari_rates", "sari_positivity", "nonsentinel_severity", "nonsentinel_tests". Use "" (default) to include all age groups. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
min_value |
Minimum value threshold (default: 0). Only used for type = "variants". |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A data.table containing the filtered data.
# Get positivity data data <- get_erviss_data( type = "positivity", date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2", countries = "France" ) # Get ILI consultation rates data <- get_erviss_data( type = "ili_ari_rates", date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), indicator = "ILIconsultationrate", age = "total" ) # Get non-sentinel severity data data <- get_erviss_data( type = "nonsentinel_severity", date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2", indicator = "hospitaladmissions" )# Get positivity data data <- get_erviss_data( type = "positivity", date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2", countries = "France" ) # Get ILI consultation rates data <- get_erviss_data( type = "ili_ari_rates", date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), indicator = "ILIconsultationrate", age = "total" ) # Get non-sentinel severity data data <- get_erviss_data( type = "nonsentinel_severity", date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2", indicator = "hospitaladmissions" )
Builds the URL to download ERVISS data, either the latest batch or a specific snapshot.
get_erviss_url(type = ERVISS_TYPES, use_snapshot = FALSE, snapshot_date = NULL)get_erviss_url(type = ERVISS_TYPES, use_snapshot = FALSE, snapshot_date = NULL)
type |
Type of data. One of: "positivity", "variants", "ili_ari_rates", "sari_rates", "sari_positivity", "nonsentinel_severity", "nonsentinel_tests". |
use_snapshot |
Logical. If TRUE, returns a snapshot URL; if FALSE (default), returns the URL for the latest data. |
snapshot_date |
Date of the snapshot to retrieve (required if use_snapshot = TRUE). Must be a Date object. |
A character string containing the URL
# Get latest positivity data URL get_erviss_url("positivity") # Get latest variants data URL get_erviss_url("variants") # Get latest ILI/ARI rates data URL get_erviss_url("ili_ari_rates") # Get snapshot URL get_erviss_url("variants", use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))# Get latest positivity data URL get_erviss_url("positivity") # Get latest variants data URL get_erviss_url("variants") # Get latest ILI/ARI rates data URL get_erviss_url("ili_ari_rates") # Get snapshot URL get_erviss_url("variants", use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))
Retrieves and filters SARS-CoV-2 variant data from the ERVISS (European Respiratory Virus Surveillance Summary) for a specified date range, variant(s), and country(ies).
get_erviss_variants( csv_file = NULL, date_min, date_max, variant = "", countries = "", min_value = 0, indicator = "", use_snapshot = FALSE, snapshot_date = NULL )get_erviss_variants( csv_file = NULL, date_min, date_max, variant = "", countries = "", min_value = 0, indicator = "", use_snapshot = FALSE, snapshot_date = NULL )
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
variant |
Character vector of variant names to filter. Use "" (default) to include all variants. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
min_value |
Minimum value threshold to include in the results (default: 0) |
indicator |
Type of indicator: "proportion" or "detections". Use "" (default) to include all indicators. |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A data.table containing the filtered variant data with columns: date, value, variant, countryname, indicator, and other ERVISS fields.
# Get latest variant data for France data <- get_erviss_variants( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), countries = "France" ) # Get specific variants with minimum proportion threshold data <- get_erviss_variants( date_min = as.Date("2024-06-01"), date_max = as.Date("2024-12-31"), variant = c("XFG", "LP.8.1"), min_value = 5 )# Get latest variant data for France data <- get_erviss_variants( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), countries = "France" ) # Get specific variants with minimum proportion threshold data <- get_erviss_variants( date_min = as.Date("2024-06-01"), date_max = as.Date("2024-12-31"), variant = c("XFG", "LP.8.1"), min_value = 5 )
Builds the URL to download ERVISS variants data, either the latest batch or a specific snapshot.
get_erviss_variants_url(use_snapshot = FALSE, snapshot_date = NULL)get_erviss_variants_url(use_snapshot = FALSE, snapshot_date = NULL)
use_snapshot |
Logical. If TRUE, returns a snapshot URL; if FALSE (default), returns the URL for the latest data. |
snapshot_date |
Date of the snapshot to retrieve (required if use_snapshot = TRUE). Must be a Date object. |
A character string containing the URL
# Get latest data URL get_erviss_variants_url() # Get snapshot URL get_erviss_variants_url(use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))# Get latest data URL get_erviss_variants_url() # Get snapshot URL get_erviss_variants_url(use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))
Retrieves and filters ILI (Influenza-Like Illness) and ARI (Acute Respiratory Infection) consultation rates from the ERVISS (European Respiratory Virus Surveillance Summary) for a specified date range, indicator(s), age group(s), and country(ies).
get_ili_ari_rates( csv_file = NULL, date_min, date_max, indicator = "", age = "", countries = "", use_snapshot = FALSE, snapshot_date = NULL )get_ili_ari_rates( csv_file = NULL, date_min, date_max, indicator = "", age = "", countries = "", use_snapshot = FALSE, snapshot_date = NULL )
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
indicator |
Character vector of indicators to filter: "ILIconsultationrate", "ARIconsultationrate", or both. Use "" (default) to include all indicators. |
age |
Character vector of age groups to filter (e.g., "0-4", "5-14", "15-64", "65+", "total"). Use "" (default) to include all age groups. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A data.table containing the filtered ILI/ARI rates data with columns: survtype, countryname, date, indicator, age, value.
# Get ILI consultation rates for France data <- get_ili_ari_rates( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), indicator = "ILIconsultationrate", countries = "France" ) # Get both ILI and ARI rates for all countries data <- get_ili_ari_rates( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31") )# Get ILI consultation rates for France data <- get_ili_ari_rates( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), indicator = "ILIconsultationrate", countries = "France" ) # Get both ILI and ARI rates for all countries data <- get_ili_ari_rates( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31") )
Builds the URL to download ERVISS ILI/ARI consultation rates data, either the latest batch or a specific snapshot.
get_ili_ari_rates_url(use_snapshot = FALSE, snapshot_date = NULL)get_ili_ari_rates_url(use_snapshot = FALSE, snapshot_date = NULL)
use_snapshot |
Logical. If TRUE, returns a snapshot URL; if FALSE (default), returns the URL for the latest data. |
snapshot_date |
Date of the snapshot to retrieve (required if use_snapshot = TRUE). Must be a Date object. |
A character string containing the URL
# Get latest data URL get_ili_ari_rates_url() # Get snapshot URL get_ili_ari_rates_url(use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))# Get latest data URL get_ili_ari_rates_url() # Get snapshot URL get_ili_ari_rates_url(use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))
Retrieves and filters non-sentinel severity data (deaths, hospital admissions, ICU admissions, etc.) from the ERVISS (European Respiratory Virus Surveillance Summary) for a specified date range, pathogen(s), indicator(s), age group(s), and country(ies).
get_nonsentinel_severity( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", age = "", countries = "", use_snapshot = FALSE, snapshot_date = NULL )get_nonsentinel_severity( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", age = "", countries = "", use_snapshot = FALSE, snapshot_date = NULL )
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
pathogen |
Character vector of pathogen names to filter. Use "" (default) to include all pathogens. |
indicator |
Character vector of indicators to filter: "deaths", "hospitaladmissions", "ICUadmissions", "ICUinpatients", "hospitalinpatients", or any combination. Use "" (default) to include all indicators. |
age |
Character vector of age groups to filter (e.g., "0-4", "5-14", "15-64", "65+", "total"). Use "" (default) to include all age groups. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A data.table containing the filtered severity data with columns: survtype, countryname, date, pathogen, pathogentype, indicator, age, value.
# Get hospital admissions for SARS-CoV-2 in France data <- get_nonsentinel_severity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2", indicator = "hospitaladmissions", countries = "France" ) # Get all severity indicators data <- get_nonsentinel_severity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2" )# Get hospital admissions for SARS-CoV-2 in France data <- get_nonsentinel_severity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2", indicator = "hospitaladmissions", countries = "France" ) # Get all severity indicators data <- get_nonsentinel_severity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2" )
Builds the URL to download ERVISS non-sentinel severity data, either the latest batch or a specific snapshot.
get_nonsentinel_severity_url(use_snapshot = FALSE, snapshot_date = NULL)get_nonsentinel_severity_url(use_snapshot = FALSE, snapshot_date = NULL)
use_snapshot |
Logical. If TRUE, returns a snapshot URL; if FALSE (default), returns the URL for the latest data. |
snapshot_date |
Date of the snapshot to retrieve (required if use_snapshot = TRUE). Must be a Date object. |
A character string containing the URL
# Get latest data URL get_nonsentinel_severity_url() # Get snapshot URL get_nonsentinel_severity_url(use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))# Get latest data URL get_nonsentinel_severity_url() # Get snapshot URL get_nonsentinel_severity_url(use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))
Retrieves and filters non-sentinel virological testing data (tests and detections) from the ERVISS (European Respiratory Virus Surveillance Summary) for a specified date range, pathogen(s), indicator(s), age group(s), and country(ies).
get_nonsentinel_tests( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", age = "", countries = "", use_snapshot = FALSE, snapshot_date = NULL )get_nonsentinel_tests( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", age = "", countries = "", use_snapshot = FALSE, snapshot_date = NULL )
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
pathogen |
Character vector of pathogen names to filter. Use "" (default) to include all pathogens. |
indicator |
Character vector of indicators to filter: "detections", "tests", or both. Use "" (default) to include all indicators. |
age |
Character vector of age groups to filter (e.g., "total"). Use "" (default) to include all age groups. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A data.table containing the filtered non-sentinel tests data with columns: survtype, countryname, date, pathogen, pathogentype, pathogensubtype, indicator, age, value.
# Get non-sentinel detections for Influenza in France data <- get_nonsentinel_tests( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "Influenza", indicator = "detections", countries = "France" ) # Get all non-sentinel test data data <- get_nonsentinel_tests( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31") )# Get non-sentinel detections for Influenza in France data <- get_nonsentinel_tests( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "Influenza", indicator = "detections", countries = "France" ) # Get all non-sentinel test data data <- get_nonsentinel_tests( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31") )
Builds the URL to download ERVISS non-sentinel tests/detections data, either the latest batch or a specific snapshot.
get_nonsentinel_tests_url(use_snapshot = FALSE, snapshot_date = NULL)get_nonsentinel_tests_url(use_snapshot = FALSE, snapshot_date = NULL)
use_snapshot |
Logical. If TRUE, returns a snapshot URL; if FALSE (default), returns the URL for the latest data. |
snapshot_date |
Date of the snapshot to retrieve (required if use_snapshot = TRUE). Must be a Date object. |
A character string containing the URL
# Get latest data URL get_nonsentinel_tests_url() # Get snapshot URL get_nonsentinel_tests_url(use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))# Get latest data URL get_nonsentinel_tests_url() # Get snapshot URL get_nonsentinel_tests_url(use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))
Retrieves and filters SARI (Severe Acute Respiratory Infection) virological data (tests, detections, positivity) from the ERVISS (European Respiratory Virus Surveillance Summary) for a specified date range, pathogen(s), indicator(s), age group(s), and country(ies).
get_sari_positivity( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", age = "", countries = "", use_snapshot = FALSE, snapshot_date = NULL )get_sari_positivity( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", age = "", countries = "", use_snapshot = FALSE, snapshot_date = NULL )
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
pathogen |
Character vector of pathogen names to filter. Use "" (default) to include all pathogens. |
indicator |
Character vector of indicators to filter: "positivity", "detections", "tests", or any combination. Use "" (default) to include all indicators. |
age |
Character vector of age groups to filter (e.g., "total", "0-4", "5-14", "15-64", "65+"). Use "" (default) to include all age groups. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A data.table containing the filtered SARI data with columns: survtype, countryname, date, pathogen, pathogentype, pathogensubtype, indicator, age, value.
# Get SARI positivity data for Influenza in France data <- get_sari_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "Influenza", indicator = "positivity", countries = "France" ) # Get all SARI indicators for SARS-CoV-2 data <- get_sari_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2" )# Get SARI positivity data for Influenza in France data <- get_sari_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "Influenza", indicator = "positivity", countries = "France" ) # Get all SARI indicators for SARS-CoV-2 data <- get_sari_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2" )
Builds the URL to download ERVISS SARI virological data, either the latest batch or a specific snapshot.
get_sari_positivity_url(use_snapshot = FALSE, snapshot_date = NULL)get_sari_positivity_url(use_snapshot = FALSE, snapshot_date = NULL)
use_snapshot |
Logical. If TRUE, returns a snapshot URL; if FALSE (default), returns the URL for the latest data. |
snapshot_date |
Date of the snapshot to retrieve (required if use_snapshot = TRUE). Must be a Date object. |
A character string containing the URL
# Get latest data URL get_sari_positivity_url() # Get snapshot URL get_sari_positivity_url(use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))# Get latest data URL get_sari_positivity_url() # Get snapshot URL get_sari_positivity_url(use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))
Retrieves and filters SARI (Severe Acute Respiratory Infection) rates from the ERVISS (European Respiratory Virus Surveillance Summary) for a specified date range, age group(s), and country(ies).
get_sari_rates( csv_file = NULL, date_min, date_max, age = "", countries = "", use_snapshot = FALSE, snapshot_date = NULL )get_sari_rates( csv_file = NULL, date_min, date_max, age = "", countries = "", use_snapshot = FALSE, snapshot_date = NULL )
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
age |
Character vector of age groups to filter (e.g., "0-4", "5-14", "15-64", "65+", "total"). Use "" (default) to include all age groups. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A data.table containing the filtered SARI rates data with columns: survtype, countryname, date, indicator, age, value.
# Get SARI rates for Spain data <- get_sari_rates( date_min = as.Date("2025-01-01"), date_max = as.Date("2025-12-31"), countries = "Spain" ) # Get SARI rates for specific age groups data <- get_sari_rates( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), age = c("0-4", "65+") )# Get SARI rates for Spain data <- get_sari_rates( date_min = as.Date("2025-01-01"), date_max = as.Date("2025-12-31"), countries = "Spain" ) # Get SARI rates for specific age groups data <- get_sari_rates( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), age = c("0-4", "65+") )
Builds the URL to download ERVISS SARI rates data, either the latest batch or a specific snapshot.
get_sari_rates_url(use_snapshot = FALSE, snapshot_date = NULL)get_sari_rates_url(use_snapshot = FALSE, snapshot_date = NULL)
use_snapshot |
Logical. If TRUE, returns a snapshot URL; if FALSE (default), returns the URL for the latest data. |
snapshot_date |
Date of the snapshot to retrieve (required if use_snapshot = TRUE). Must be a Date object. |
A character string containing the URL
# Get latest data URL get_sari_rates_url() # Get snapshot URL get_sari_rates_url(use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))# Get latest data URL get_sari_rates_url() # Get snapshot URL get_sari_rates_url(use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))
Retrieves and filters sentinel surveillance data (positivity, detections, tests) from the ERVISS (European Respiratory Virus Surveillance Summary) for a specified date range, pathogen(s), indicator(s), and country(ies).
get_sentineltests_positivity( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", countries = "", use_snapshot = FALSE, snapshot_date = NULL )get_sentineltests_positivity( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", countries = "", use_snapshot = FALSE, snapshot_date = NULL )
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
pathogen |
Character vector of pathogen names to filter. Use "" (default) to include all pathogens. |
indicator |
Character vector of indicators to filter: "positivity", "detections", "tests", or any combination. Use "" (default) to include all indicators. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A data.table containing the filtered data with columns: date, value, pathogen, countryname, indicator, and other ERVISS fields.
# Get latest SARS-CoV-2 positivity data for France data <- get_sentineltests_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2", countries = "France" ) # Get detections and tests data <- get_sentineltests_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "Influenza", indicator = c("detections", "tests") ) # Get historical data from a specific snapshot data <- get_sentineltests_positivity( date_min = as.Date("2023-01-01"), date_max = as.Date("2023-12-31"), use_snapshot = TRUE, snapshot_date = as.Date("2024-02-23") )# Get latest SARS-CoV-2 positivity data for France data <- get_sentineltests_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2", countries = "France" ) # Get detections and tests data <- get_sentineltests_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "Influenza", indicator = c("detections", "tests") ) # Get historical data from a specific snapshot data <- get_sentineltests_positivity( date_min = as.Date("2023-01-01"), date_max = as.Date("2023-12-31"), use_snapshot = TRUE, snapshot_date = as.Date("2024-02-23") )
Builds the URL to download ERVISS positivity data, either the latest batch or a specific snapshot.
get_sentineltests_positivity_url(use_snapshot = FALSE, snapshot_date = NULL)get_sentineltests_positivity_url(use_snapshot = FALSE, snapshot_date = NULL)
use_snapshot |
Logical. If TRUE, returns a snapshot URL; if FALSE (default), returns the URL for the latest data. |
snapshot_date |
Date of the snapshot to retrieve (required if use_snapshot = TRUE). Must be a Date object. |
A character string containing the URL
# Get latest data URL get_sentineltests_positivity_url() # Get snapshot URL get_sentineltests_positivity_url(use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))# Get latest data URL get_sentineltests_positivity_url() # Get snapshot URL get_sentineltests_positivity_url(use_snapshot = TRUE, snapshot_date = as.Date("2023-11-24"))
Creates a ggplot2 visualization of ERVISS data, with facets by country. This is a generic function that can plot any of the available data types.
plot_erviss_data( data, type = ERVISS_TYPES, date_breaks = NULL, date_format = "%b %Y" )plot_erviss_data( data, type = ERVISS_TYPES, date_breaks = NULL, date_format = "%b %Y" )
data |
A data.table or data.frame containing ERVISS data, typically output from
|
type |
Type of data. One of: "positivity", "variants", "ili_ari_rates", "sari_rates", "sari_positivity", "nonsentinel_severity", "nonsentinel_tests". |
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks"). If NULL, a sensible default is chosen based on the data type. |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
A ggplot2 object
# Plot positivity data data <- get_erviss_data("positivity", date_min = as.Date("2024-01-01"), date_max = as.Date("2024-06-30"), pathogen = "SARS-CoV-2" ) plot_erviss_data(data, type = "positivity") # Plot ILI/ARI rates data <- get_erviss_data("ili_ari_rates", date_min = as.Date("2024-01-01"), date_max = as.Date("2024-06-30"), indicator = "ILIconsultationrate" ) plot_erviss_data(data, type = "ili_ari_rates")# Plot positivity data data <- get_erviss_data("positivity", date_min = as.Date("2024-01-01"), date_max = as.Date("2024-06-30"), pathogen = "SARS-CoV-2" ) plot_erviss_data(data, type = "positivity") # Plot ILI/ARI rates data <- get_erviss_data("ili_ari_rates", date_min = as.Date("2024-01-01"), date_max = as.Date("2024-06-30"), indicator = "ILIconsultationrate" ) plot_erviss_data(data, type = "ili_ari_rates")
Creates a ggplot2 visualization of positivity data, with facets by country and colored by pathogen. The plot title displays mean, min and max positivity values.
plot_erviss_positivity(data, date_breaks = "2 weeks", date_format = "%b %Y")plot_erviss_positivity(data, date_breaks = "2 weeks", date_format = "%b %Y")
data |
A data.table or data.frame containing positivity data, typically output from
|
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks") |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
A ggplot2 object
data <- get_sentineltests_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-06-30"), pathogen = "SARS-CoV-2" ) plot_erviss_positivity(data, date_breaks = "1 month")data <- get_sentineltests_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-06-30"), pathogen = "SARS-CoV-2" ) plot_erviss_positivity(data, date_breaks = "1 month")
Creates a ggplot2 visualization of variant data, with facets by country and colored by variant. The y-axis shows percentage of all variants.
plot_erviss_variants(data, date_breaks = "1 month", date_format = "%b %Y")plot_erviss_variants(data, date_breaks = "1 month", date_format = "%b %Y")
data |
A data.table or data.frame containing variant data, typically output from
|
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks") |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
A ggplot2 object
data <- get_erviss_variants( date_min = as.Date("2024-06-01"), date_max = as.Date("2024-12-31"), variant = c("XFG", "LP.8.1") ) plot_erviss_variants(data, date_breaks = "1 month")data <- get_erviss_variants( date_min = as.Date("2024-06-01"), date_max = as.Date("2024-12-31"), variant = c("XFG", "LP.8.1") ) plot_erviss_variants(data, date_breaks = "1 month")
Creates a ggplot2 visualization of ILI/ARI consultation rates, with facets by country and colored by age group.
plot_ili_ari_rates(data, date_breaks = "2 weeks", date_format = "%b %Y")plot_ili_ari_rates(data, date_breaks = "2 weeks", date_format = "%b %Y")
data |
A data.table or data.frame containing ILI/ARI rates data, typically
output from |
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks") |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
A ggplot2 object
data <- get_ili_ari_rates( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-06-30"), indicator = "ILIconsultationrate" ) plot_ili_ari_rates(data, date_breaks = "1 month")data <- get_ili_ari_rates( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-06-30"), indicator = "ILIconsultationrate" ) plot_ili_ari_rates(data, date_breaks = "1 month")
Creates a ggplot2 visualization of non-sentinel severity data, with facets by country and colored by pathogen.
plot_nonsentinel_severity( data, date_breaks = "1 month", date_format = "%b %Y" )plot_nonsentinel_severity( data, date_breaks = "1 month", date_format = "%b %Y" )
data |
A data.table or data.frame containing severity data, typically
output from |
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks") |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
A ggplot2 object
data <- get_nonsentinel_severity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-06-30"), pathogen = "SARS-CoV-2", indicator = "hospitaladmissions" ) plot_nonsentinel_severity(data, date_breaks = "1 month")data <- get_nonsentinel_severity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-06-30"), pathogen = "SARS-CoV-2", indicator = "hospitaladmissions" ) plot_nonsentinel_severity(data, date_breaks = "1 month")
Creates a ggplot2 visualization of non-sentinel tests/detections data, with facets by country and colored by pathogen.
plot_nonsentinel_tests(data, date_breaks = "1 month", date_format = "%b %Y")plot_nonsentinel_tests(data, date_breaks = "1 month", date_format = "%b %Y")
data |
A data.table or data.frame containing non-sentinel tests data,
typically output from |
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks") |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
A ggplot2 object
data <- get_nonsentinel_tests( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-06-30"), pathogen = "Influenza", indicator = "detections" ) plot_nonsentinel_tests(data, date_breaks = "1 month")data <- get_nonsentinel_tests( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-06-30"), pathogen = "Influenza", indicator = "detections" ) plot_nonsentinel_tests(data, date_breaks = "1 month")
Creates a ggplot2 visualization of SARI positivity data, with facets by country and colored by pathogen.
plot_sari_positivity(data, date_breaks = "2 weeks", date_format = "%b %Y")plot_sari_positivity(data, date_breaks = "2 weeks", date_format = "%b %Y")
data |
A data.table or data.frame containing SARI positivity data, typically
output from |
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks") |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
A ggplot2 object
data <- get_sari_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-06-30"), pathogen = "Influenza", indicator = "positivity" ) plot_sari_positivity(data, date_breaks = "1 month")data <- get_sari_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-06-30"), pathogen = "Influenza", indicator = "positivity" ) plot_sari_positivity(data, date_breaks = "1 month")
Creates a ggplot2 visualization of SARI rates, with facets by country and colored by age group.
plot_sari_rates(data, date_breaks = "2 weeks", date_format = "%b %Y")plot_sari_rates(data, date_breaks = "2 weeks", date_format = "%b %Y")
data |
A data.table or data.frame containing SARI rates data, typically
output from |
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks") |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
A ggplot2 object
data <- get_sari_rates( date_min = as.Date("2025-01-01"), date_max = as.Date("2025-06-30"), countries = "Spain" ) plot_sari_rates(data, date_breaks = "1 month")data <- get_sari_rates( date_min = as.Date("2025-01-01"), date_max = as.Date("2025-06-30"), countries = "Spain" ) plot_sari_rates(data, date_breaks = "1 month")
Convenience function that fetches and plots ERVISS data in one step.
This is a generic function that can handle any of the available data types.
For more control, use get_erviss_data followed by
plot_erviss_data.
quick_plot_erviss_data( type = ERVISS_TYPES, csv_file = NULL, date_min, date_max, pathogen = "", variant = "", indicator = "", age = "", countries = "", min_value = 0, date_breaks = NULL, date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )quick_plot_erviss_data( type = ERVISS_TYPES, csv_file = NULL, date_min, date_max, pathogen = "", variant = "", indicator = "", age = "", countries = "", min_value = 0, date_breaks = NULL, date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )
type |
Type of data. One of: "positivity", "variants", "ili_ari_rates", "sari_rates", "sari_positivity", "nonsentinel_severity", "nonsentinel_tests". |
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
pathogen |
Character vector of pathogen names to filter. Used for types: "positivity", "sari_positivity", "nonsentinel_severity", "nonsentinel_tests". Use "" (default) to include all pathogens. |
variant |
Character vector of variant names to filter. Only used for type = "variants". Use "" (default) to include all variants. |
indicator |
Character vector of indicators to filter. The available values depend on the data type. Use "" (default) to include all indicators. |
age |
Character vector of age groups to filter. Used for types: "ili_ari_rates", "sari_rates", "sari_positivity", "nonsentinel_severity", "nonsentinel_tests". Use "" (default) to include all age groups. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
min_value |
Minimum value threshold (default: 0). Only used for type = "variants". |
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks"). If NULL, a sensible default is chosen based on the data type. |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A ggplot2 object showing the data over time by country
# Quick visualization of positivity data quick_plot_erviss_data( type = "positivity", date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2" ) # Quick visualization of ILI rates quick_plot_erviss_data( type = "ili_ari_rates", date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), indicator = "ILIconsultationrate" )# Quick visualization of positivity data quick_plot_erviss_data( type = "positivity", date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2" ) # Quick visualization of ILI rates quick_plot_erviss_data( type = "ili_ari_rates", date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), indicator = "ILIconsultationrate" )
Convenience function that fetches and plots ERVISS positivity data in one step.
For more control, use get_sentineltests_positivity followed by
plot_erviss_positivity.
quick_plot_erviss_positivity( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", countries = "", date_breaks = "2 weeks", date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )quick_plot_erviss_positivity( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", countries = "", date_breaks = "2 weeks", date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
pathogen |
Character vector of pathogen names to filter. Use "" (default) to include all pathogens. |
indicator |
Character vector of indicators to filter: "positivity", "detections", "tests", or any combination. Use "" (default) to include all indicators. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks") |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A ggplot2 object showing positivity over time by country and pathogen
# Quick visualization of latest data quick_plot_erviss_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2", date_breaks = "1 month" )# Quick visualization of latest data quick_plot_erviss_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2", date_breaks = "1 month" )
Convenience function that fetches and plots ERVISS variant data in one step.
For more control, use get_erviss_variants followed by
plot_erviss_variants.
quick_plot_erviss_variants( csv_file = NULL, date_min, date_max, variant = "", countries = "", min_value = 0, indicator = "", date_breaks = "1 month", date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )quick_plot_erviss_variants( csv_file = NULL, date_min, date_max, variant = "", countries = "", min_value = 0, indicator = "", date_breaks = "1 month", date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
variant |
Character vector of variant names to filter. Use "" (default) to include all variants. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
min_value |
Minimum value threshold to include in the results (default: 0) |
indicator |
Type of indicator: "proportion" or "detections". Use "" (default) to include all indicators. |
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks") |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A ggplot2 object showing variant proportions over time by country
# Quick visualization of latest variant data quick_plot_erviss_variants( date_min = as.Date("2024-06-01"), date_max = as.Date("2024-12-31"), variant = c("XFG", "LP.8.1"), date_breaks = "1 month" )# Quick visualization of latest variant data quick_plot_erviss_variants( date_min = as.Date("2024-06-01"), date_max = as.Date("2024-12-31"), variant = c("XFG", "LP.8.1"), date_breaks = "1 month" )
Convenience function that fetches and plots ERVISS ILI/ARI consultation rates
data in one step.
For more control, use get_ili_ari_rates followed by
plot_ili_ari_rates.
quick_plot_ili_ari_rates( csv_file = NULL, date_min, date_max, indicator = "", age = "", countries = "", date_breaks = "2 weeks", date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )quick_plot_ili_ari_rates( csv_file = NULL, date_min, date_max, indicator = "", age = "", countries = "", date_breaks = "2 weeks", date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
indicator |
Character vector of indicators to filter: "ILIconsultationrate", "ARIconsultationrate", or both. Use "" (default) to include all indicators. |
age |
Character vector of age groups to filter (e.g., "0-4", "5-14", "15-64", "65+", "total"). Use "" (default) to include all age groups. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks") |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A ggplot2 object showing ILI/ARI consultation rates over time by country and age group
# Quick visualization of ILI rates quick_plot_ili_ari_rates( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), indicator = "ILIconsultationrate", date_breaks = "1 month" )# Quick visualization of ILI rates quick_plot_ili_ari_rates( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), indicator = "ILIconsultationrate", date_breaks = "1 month" )
Convenience function that fetches and plots ERVISS non-sentinel severity
data in one step.
For more control, use get_nonsentinel_severity followed by
plot_nonsentinel_severity.
quick_plot_nonsentinel_severity( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", age = "", countries = "", date_breaks = "1 month", date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )quick_plot_nonsentinel_severity( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", age = "", countries = "", date_breaks = "1 month", date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
pathogen |
Character vector of pathogen names to filter. Use "" (default) to include all pathogens. |
indicator |
Character vector of indicators to filter: "deaths", "hospitaladmissions", "ICUadmissions", "ICUinpatients", "hospitalinpatients", or any combination. Use "" (default) to include all indicators. |
age |
Character vector of age groups to filter (e.g., "0-4", "5-14", "15-64", "65+", "total"). Use "" (default) to include all age groups. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks") |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A ggplot2 object showing severity data over time by country and pathogen
# Quick visualization of hospital admissions quick_plot_nonsentinel_severity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2", indicator = "hospitaladmissions", date_breaks = "1 month" )# Quick visualization of hospital admissions quick_plot_nonsentinel_severity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "SARS-CoV-2", indicator = "hospitaladmissions", date_breaks = "1 month" )
Convenience function that fetches and plots ERVISS non-sentinel tests/detections
data in one step.
For more control, use get_nonsentinel_tests followed by
plot_nonsentinel_tests.
quick_plot_nonsentinel_tests( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", age = "", countries = "", date_breaks = "1 month", date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )quick_plot_nonsentinel_tests( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", age = "", countries = "", date_breaks = "1 month", date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
pathogen |
Character vector of pathogen names to filter. Use "" (default) to include all pathogens. |
indicator |
Character vector of indicators to filter: "detections", "tests", or both. Use "" (default) to include all indicators. |
age |
Character vector of age groups to filter (e.g., "total"). Use "" (default) to include all age groups. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks") |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A ggplot2 object showing non-sentinel tests/detections over time by country and pathogen
# Quick visualization of non-sentinel detections quick_plot_nonsentinel_tests( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "Influenza", indicator = "detections", date_breaks = "1 month" )# Quick visualization of non-sentinel detections quick_plot_nonsentinel_tests( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "Influenza", indicator = "detections", date_breaks = "1 month" )
Convenience function that fetches and plots ERVISS SARI positivity data
in one step.
For more control, use get_sari_positivity followed by
plot_sari_positivity.
quick_plot_sari_positivity( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", age = "", countries = "", date_breaks = "2 weeks", date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )quick_plot_sari_positivity( csv_file = NULL, date_min, date_max, pathogen = "", indicator = "", age = "", countries = "", date_breaks = "2 weeks", date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
pathogen |
Character vector of pathogen names to filter. Use "" (default) to include all pathogens. |
indicator |
Character vector of indicators to filter: "positivity", "detections", "tests", or any combination. Use "" (default) to include all indicators. |
age |
Character vector of age groups to filter (e.g., "total", "0-4", "5-14", "15-64", "65+"). Use "" (default) to include all age groups. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks") |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A ggplot2 object showing SARI positivity over time by country and pathogen
# Quick visualization of SARI positivity quick_plot_sari_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "Influenza", indicator = "positivity", date_breaks = "1 month" )# Quick visualization of SARI positivity quick_plot_sari_positivity( date_min = as.Date("2024-01-01"), date_max = as.Date("2024-12-31"), pathogen = "Influenza", indicator = "positivity", date_breaks = "1 month" )
Convenience function that fetches and plots ERVISS SARI rates data in one step.
For more control, use get_sari_rates followed by
plot_sari_rates.
quick_plot_sari_rates( csv_file = NULL, date_min, date_max, age = "", countries = "", date_breaks = "2 weeks", date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )quick_plot_sari_rates( csv_file = NULL, date_min, date_max, age = "", countries = "", date_breaks = "2 weeks", date_format = "%b %Y", use_snapshot = FALSE, snapshot_date = NULL )
csv_file |
Path to a local CSV file or URL containing the ERVISS data. If NULL (default), data is fetched from the official ERVISS repository. |
date_min |
Start date of the period (Date object) |
date_max |
End date of the period (Date object) |
age |
Character vector of age groups to filter (e.g., "0-4", "5-14", "15-64", "65+", "total"). Use "" (default) to include all age groups. |
countries |
Character vector of country names to filter. Use "" (default) to include all countries. |
date_breaks |
A string specifying the date breaks for the x-axis (e.g., "1 month", "2 weeks") |
date_format |
A string specifying the date format for x-axis labels
(e.g., |
use_snapshot |
Logical. If TRUE, fetches a historical snapshot; if FALSE (default), fetches the latest data. Ignored if csv_file is provided. |
snapshot_date |
Date of the snapshot to retrieve. Required if use_snapshot = TRUE and csv_file is NULL. |
A ggplot2 object showing SARI rates over time by country and age group
# Quick visualization of SARI rates quick_plot_sari_rates( date_min = as.Date("2025-01-01"), date_max = as.Date("2025-12-31"), countries = "Spain", date_breaks = "1 month" )# Quick visualization of SARI rates quick_plot_sari_rates( date_min = as.Date("2025-01-01"), date_max = as.Date("2025-12-31"), countries = "Spain", date_breaks = "1 month" )