Title: | Access the UNESCO Institute for Statistics API |
---|---|
Description: | Retrieve data from the UNESCO Institute for Statistics (UIS) API <https://api.uis.unesco.org/api/public/documentation/>. UIS provides public access to more than 4,000 indicators focusing on education, science and technology, culture, and communication. |
Authors: | Christoph Scheuch [aut, cre, cph]
|
Maintainer: | Christoph Scheuch <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0.9000 |
Built: | 2025-03-07 05:28:43 UTC |
Source: | https://github.com/tidy-intelligence/r-uisapi |
Retrieves information about files available in the UNESCO Institute for Statistics (UIS) Bulk Data Download Service (BDDS).
uis_bulk_files()
uis_bulk_files()
A data frame with information about files:
file_name |
Character. The name of the data set. |
file_url |
Character. The URL of the data set. |
last_updated_description |
Character. Information about last update. |
# Download available files for bulk download uis_bulk_files()
# Download available files for bulk download uis_bulk_files()
Retrieves data from the UNESCO Institute for Statistics (UIS) API for specified entities, indicators, and time periods.
uis_get( entities = NULL, indicators = NULL, start_year = NULL, end_year = NULL, version = NULL )
uis_get( entities = NULL, indicators = NULL, start_year = NULL, end_year = NULL, version = NULL )
entities |
Character vector. The entity IDs (ISO 3166-1 alpha-3 codes)
to retrieve data for. Must provide either this parameter or |
indicators |
Character vector. The indicator IDs to retrieve data for.
Must provide either this parameter or |
start_year |
Numeric or character. The starting year for the data retrieval period. If NULL, no start year constraint is applied. |
end_year |
Numeric or character. The ending year for the data retrieval period. If NULL, no end year constraint is applied. |
version |
Character. The API version to use. If NULL, the default version is used. See uis_get_versions for a list of supported versions. |
A data frame with the following columns:
entity_id |
Character. The ID of the entity (geoUnit). |
indicator_id |
Character. The ID of the indicator. |
year |
Numeric. The year of the observation. |
value |
Numeric. The value of the indicator for the given entity and year. |
# Get all data for a single indicator uis_get( indicators = "CR.1" ) # Get all data for a single country uis_get( entities = "BRA" ) # Get data for multiple indicators and countries uis_get( entities = c("BRA", "USA"), indicators = c("CR.1", "CR.2") ) # Get data for multiple indicators and countries and specific time range uis_get( entities = c("BRA", "USA"), indicators = c("CR.1", "CR.2"), start_year = 2010, end_year = 2020 )
# Get all data for a single indicator uis_get( indicators = "CR.1" ) # Get all data for a single country uis_get( entities = "BRA" ) # Get data for multiple indicators and countries uis_get( entities = c("BRA", "USA"), indicators = c("CR.1", "CR.2") ) # Get data for multiple indicators and countries and specific time range uis_get( entities = c("BRA", "USA"), indicators = c("CR.1", "CR.2"), start_year = 2010, end_year = 2020 )
Retrieves information about geographical entities (countries, regions, etc.) available in the UNESCO Institute for Statistics (UIS) API.
uis_get_entities(version = NULL)
uis_get_entities(version = NULL)
version |
Character. The API version to use. If NULL (default), the API's default version will be used. See uis_get_versions for a list of supported versions. |
A data frame with information about geographical entities:
entity_id |
Character. The unique identifier for the entity. |
entity_name |
Character. The name of the geographical entity. |
entity_type |
Character. The type of entity (e.g., country, region). |
region_group |
Character. Information about the region grouping. |
# Download entities for default version uis_get_entities() # Download entities for a specific version uis_get_entities("20240910-b5ad4d82")
# Download entities for default version uis_get_entities() # Download entities for a specific version uis_get_entities("20240910-b5ad4d82")
Retrieves information about indicators available in the UNESCO Institute for Statistics (UIS) API.
uis_get_indicators( version = NULL, disaggregations = FALSE, glossary_terms = FALSE )
uis_get_indicators( version = NULL, disaggregations = FALSE, glossary_terms = FALSE )
version |
Character. The API version to use. If NULL (default), the API's default version will be used. See uis_get_versions for a list of supported versions. |
disaggregations |
Logical. If TRUE, includes disaggregation information for indicators. Default is FALSE. |
glossary_terms |
Logical. If TRUE, includes glossary terms associated with indicators. Default is FALSE. |
A data frame with information about indicators:
indicator_id |
Character. The unique identifier for the indicator. |
indicator_name |
Character. The name of the indicator. |
theme |
Character. The theme of the indicator. |
last_data_update |
Date. The last update date. |
last_data_update_description |
Character. A description about the last update date. |
data_availability |
List column. Contains nested information about data availability, including total record count and timeline min/max years. |
entity_types |
List column. Contains information about entity types associated with the indicator. |
# Download indicators uis_get_indicators() # Download indicators with glossary terms and disaggregations uis_get_indicators(disaggregations = TRUE, glossary_terms = TRUE)
# Download indicators uis_get_indicators() # Download indicators with glossary terms and disaggregations uis_get_indicators(disaggregations = TRUE, glossary_terms = TRUE)
Retrieves information about the available versions of the UNESCO Institute for Statistics (UIS) API.
uis_get_versions(default_only = FALSE)
uis_get_versions(default_only = FALSE)
default_only |
Logical. Indicates whether only the current default version should be retrievend. Defaults to FALSE. |
A data frame with the following columns:
version |
Character. The version identifier. |
publication_date |
Date-time. The date when the version was released. |
description |
Character. The description of the version. |
theme |
List column. Each element is a nested data frame containing information about themes available in the version, with columns: theme_id, theme_last_update, theme_description |
uis_get_versions()
uis_get_versions()