| Title: | Access Chilean Data via APIs and Curated Datasets |
|---|---|
| Description: | Provides functions to access data from public RESTful APIs including 'FINDIC API', 'REST Countries API', 'World Bank API', and 'Nager.Date', retrieving real-time or historical data related to Chile such as financial indicators, holidays, international demographic and geopolitical indicators, and more. Additionally, the package includes curated datasets related to Chile, covering topics such as human rights violations during the Pinochet regime, electoral data, census samples, health surveys, seismic events, territorial codes, and environmental measurements. The package supports research and analysis focused on Chile by integrating open APIs with high-quality datasets from multiple domains. For more information on the APIs, see: 'FINDIC' <https://findic.cl/>, 'REST Countries' <https://restcountries.com/>, 'World Bank API' <https://datahelpdesk.worldbank.org/knowledgebase/articles/889392>, and 'Nager.Date' <https://date.nager.at/Api>. |
| Authors: | Renzo Caceres Rossi [aut, cre] (ORCID: <https://orcid.org/0009-0005-0744-854X>) |
| Maintainer: | Renzo Caceres Rossi <[email protected]> |
| License: | GPL-3 |
| Version: | 0.2.0 |
| Built: | 2026-05-09 07:16:40 UTC |
| Source: | https://github.com/lightbluetitan/chiledataapi |
This dataset, census_chile_2017_df, is a data frame containing microdata from the 2017 Chilean census, specifically from the commune of San Pablo. It was selected due to its relatively small size, making it suitable for inclusion in CRAN and GitHub repositories. The dataset includes 7,512 observations and 60 variables related to housing, households, individuals, migration, education, and geographic information. All variable names and data values are in Spanish, as retrieved from the original source.
data(census_chile_2017_df)data(census_chile_2017_df)
A data frame with 7,512 observations and 60 variables:
Administrative region code
Province code
Commune code
Census district code
Urban/rural area indicator
Census location zone
Location zone ID
Number of dwellings
Number of households
Person number
Sex
Relationship to head of household
Age
Place of birth (Chile or abroad)
Commune of birth
Country of birth
Last place of residence
Commune of last residence
Country of last residence
Place of residence in 2012
Commune of residence in 2012
Country of residence in 2012
Year of arrival
Time range of arrival
Health insurance
Marital status
Educational level
Currently attending school
Employment status
Occupation type
Other occupation (free text)
Disability indicator
Ethnic group
Language spoken
Language understood
Month of migration
Year of migration
Grouped birth country
Grouped last residence country
Grouped 2012 residence country
Years of schooling
Grouped occupation
Region code (15-region system)
Province code (15-region system)
Commune code (15-region system)
Commune of birth (15-region system)
Commune of last residence (15-region system)
Commune of residence in 2012 (15-region system)
Geographical identifier
Type of dwelling
Dwelling condition
Material of exterior walls
Material of floor
Material of roof
Number of rooms
Number of bedrooms
Number of households in the dwelling
Number of persons in the dwelling
Type of household
Census operation type
The dataset name has been kept as census_chile_2017_df to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix df indicates that the dataset is a data frame. The original content has not been modified.
Data taken from the ismtchile package version 2.1.5.
This dataset, chile_earthquakes_tbl_df, is a tibble containing information about significant (perceptible) earthquakes that occurred in Chile from January 1st, 2012 to the present. The data was originally compiled by the Centro Sismológico Nacional (Chile) and was published on Kaggle by Nicolás González Muñoz. The dataset includes 4,018 observations and 5 variables, capturing relevant geophysical characteristics such as the date and time of occurrence, geographic coordinates, depth, and magnitude of each seismic event.
data(chile_earthquakes_tbl_df)data(chile_earthquakes_tbl_df)
A tibble with 4,018 observations and 5 variables:
Timestamp of the earthquake in UTC (POSIXct)
Latitude coordinate of the event (numeric)
Longitude coordinate of the event (numeric)
Depth in kilometers (numeric)
Richter magnitude of the earthquake (numeric)
The dataset name has been kept as 'chile_earthquakes_tbl_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix 'tbl_df' indicates that the dataset is a tibble (a modern data frame). The original content has not been modified in any way. Variable names and values are in English, as originally provided by the source.
Data taken from Kaggle: https://www.kaggle.com/datasets/nicolasgonzalezmunoz/earthquakes-on-chile
This dataset, chile_election_2021_df, is a data frame containing the results of the first round of the 2021 Chilean presidential elections. It includes vote counts for seven presidential candidates, as well as counts for blank and null votes. Each observation corresponds to an individual ballot box, identified by its unique ID and associated electoral district. Additionally, the dataset includes demographic information on the age distribution of voters for each ballot box, and a logical indicator for mismatches or inconsistencies in the vote counts.
data(chile_election_2021_df)data(chile_election_2021_df)
A data frame with 46,606 observations and 21 variables:
Administrative region (character)
Electoral district (character)
Unique identifier for the ballot box (character)
Votes for Candidate 1 (integer)
Votes for Candidate 2 (integer)
Votes for Candidate 3 (integer)
Votes for Candidate 4 (integer)
Votes for Candidate 5 (integer)
Votes for Candidate 6 (integer)
Votes for Candidate 7 (integer)
Count of blank votes (integer)
Count of null votes (integer)
Voters aged 18–19 (integer)
Voters aged 20–29 (integer)
Voters aged 30–39 (integer)
Voters aged 40–49 (integer)
Voters aged 50–59 (integer)
Voters aged 60–69 (integer)
Voters aged 70–79 (integer)
Voters aged 80 and older (integer)
Logical indicator of inconsistency in vote reporting (logical)
The dataset name has been kept as chile_election_2021_df to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix df indicates that the dataset is a data frame. The original content has not been modified.
Data taken from the fastei package version 0.0.0.7.
This dataset, chile_health_survey_df, is a data frame containing information collected by the Chilean National Health Survey conducted between 2016 and 2017. The objective of the survey was to study the health status of the Chilean population and support health-related public policy design. The dataset includes biometric, behavioral, demographic, and educational variables from 3,211 individuals.
data(chile_health_survey_df)data(chile_health_survey_df)
A data frame with 3,211 observations and 12 variables:
Systolic and diastolic blood pressure (numeric)
Age of the respondent (integer)
Waist circumference and body mass index (numeric)
Health behavior and condition indicators (integer)
Sex of the respondent (1 = male, 0 = female) (integer)
Education level indicators (integer)
The dataset name has been kept as 'chile_health_survey_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.
Data taken from the abms package version 0.2
This dataset, chile_plebiscite_df, is a data frame containing information on voting intentions in the 1988 Chilean plebiscite. The data were collected from a national survey conducted by FLACSO/Chile during April and May of 1988. The dataset consists of 2,700 observations and 8 variables, including demographic details such as region, sex, age, education, and income, as well as voting preferences and support for the status quo. Some observations contain missing values.
data(chile_plebiscite_df)data(chile_plebiscite_df)
A data frame with 2,700 observations and 8 variables:
Region of the respondent (factor with 5 levels: "C", "M", "N", "S", ...)
Population size of the respondent's area (integer)
Sex of the respondent (factor: "F", "M")
Age in years (integer)
Education level (factor with 3 levels: "P", "PS", "S")
Income of the respondent (integer)
Support for the status quo (numeric scale)
Intended vote (factor with 4 levels)
The dataset name has been kept as 'chile_plebiscite_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.
Data taken from the carData package version 3.0-5
This package provides functions to access data from public RESTful APIs including 'FINDIC API', 'REST Countries API', 'World Bank API', and 'Nager.Date', retrieving real-time or historical data related to Chile such as financial indicators, holidays, international demographic and geopolitical indicators, and more. Additionally, the package includes curated datasets related to Chile, covering topics such as human rights violations during the Pinochet regime, electoral data, census samples, health surveys, seismic events, territorial codes, and environmental measurements..
ChileDataAPI: Access Chilean Data via APIs and Curated Datasets
Access Chilean Data via APIs and Curated Datasets.
Maintainer: Renzo Caceres Rossi [email protected]
Useful links:
This function retrieves the observed value of Bitcoin in US Dollars from the API endpoint: https://findic.cl/api/bitcoin. The data is provided by the Chilean website findic.cl.
get_chile_bitcoin()get_chile_bitcoin()
The values returned by the API include metadata and a time series of daily values.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha (date) and valor (value).
The function sends a GET request to the /api/bitcoin endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
A tibble (data frame) with the following columns:
fecha: Fecha del valor observado (en formato "YYYY-MM-DD").
valor: Valor del bitcoin en dólares estadounidenses (numérico).
Requires internet connection. The function returns the values exactly as provided in Spanish.
## Not run: bitcoin_data <- get_chile_bitcoin() head(bitcoin_data) ## End(Not run)## Not run: bitcoin_data <- get_chile_bitcoin() head(bitcoin_data) ## End(Not run)
Retrieves Chile's under-5 mortality rate, measured as the number of deaths
of children under five years of age per 1,000 live births, for the years 2010 to 2022
using the World Bank Open Data API. The indicator used is SH.DYN.MORT.
get_chile_child_mortality()get_chile_child_mortality()
This function sends a GET request to the World Bank API.
If the API request fails or returns an error status code,
the function returns NULL with an informative message.
A tibble with the following columns:
indicator: Indicator name (e.g., "Mortality rate, under-5 (per 1,000 live births)")
country: Country name ("Chile")
year: Year of the data (integer)
value: Mortality rate (per 1,000 live births)
Requires internet connection.
World Bank Open Data API: https://data.worldbank.org/indicator/SH.DYN.MORT
if (interactive()) { get_chile_child_mortality() }if (interactive()) { get_chile_child_mortality() }
This function retrieves the observed daily value of the copper price per pound ("Libra de Cobre") in U.S. Dollars from the API endpoint: https://findic.cl/api/libra_cobre. The data is provided by the Chilean website findic.cl.
get_chile_copper_pound()get_chile_copper_pound()
The values returned by the API include metadata and a time series of daily prices.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha (date) and valor (value).
The function sends a GET request to the /api/libra_cobre endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
A tibble (data frame) with the following columns:
fecha: Fecha del valor observado (in format "YYYY-MM-DD").
valor: Valor de la libra de cobre en dólares estadounidenses (numeric).
Requires internet connection. The function returns the values exactly as provided in Spanish.
## Not run: copper_data <- get_chile_copper_pound() head(copper_data) ## End(Not run)## Not run: copper_data <- get_chile_copper_pound() head(copper_data) ## End(Not run)
Retrieves Chile's Consumer Price Index (CPI), with 2010 as the base year (index = 100),
for the years 2010 to 2022 using the World Bank Open Data API.
The indicator used is FP.CPI.TOTL.
get_chile_cpi()get_chile_cpi()
This function sends a GET request to the World Bank API.
If the API request fails or returns an error status code,
the function returns NULL with an informative message.
A tibble with the following columns:
indicator: Indicator name (e.g., "Consumer price index (2010 = 100)")
country: Country name ("Chile")
year: Year of the data (integer)
value: Consumer Price Index (numeric, base year 2010 = 100)
Requires internet connection.
World Bank Open Data API: https://data.worldbank.org/indicator/FP.CPI.TOTL
if (interactive()) { get_chile_cpi() }if (interactive()) { get_chile_cpi() }
This function retrieves the observed exchange rate ("Dólar observado") in Chilean Pesos from the API endpoint: https://findic.cl/api/dolar. The data is provided by the Chilean website findic.cl.
get_chile_dollar()get_chile_dollar()
The values returned by the API include metadata and a time series of daily exchange rates.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha (date) and valor (value).
The function sends a GET request to the /api/dolar endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
A tibble (data frame) with the following columns:
fecha: Fecha del valor observado (en formato "YYYY-MM-DD").
valor: Valor del dólar observado en pesos chilenos (numérico).
Requires internet connection. The function returns the values exactly as provided in Spanish.
## Not run: dolar_data <- get_chile_dollar() head(dolar_data) ## End(Not run)## Not run: dolar_data <- get_chile_dollar() head(dolar_data) ## End(Not run)
Retrieves Chile's energy use per capita, measured in kilograms of oil equivalent,
for the years 2010 to 2022 using the World Bank Open Data API.
The indicator used is EG.USE.PCAP.KG.OE.
get_chile_energy_use()get_chile_energy_use()
This function sends a GET request to the World Bank API.
If the API request fails or returns an error status code,
the function returns NULL with an informative message.
A tibble with the following columns:
indicator: Indicator name (e.g., "Energy use (kg of oil equivalent per capita)")
country: Country name ("Chile")
year: Year of the data (integer)
value: Energy use in kilograms of oil equivalent per capita
Requires internet connection.
World Bank Open Data API: https://data.worldbank.org/indicator/EG.USE.PCAP.KG.OE
if (interactive()) { get_chile_energy_use() }if (interactive()) { get_chile_energy_use() }
This function retrieves the observed exchange rate ("Euro (pesos por euro)") in Chilean Pesos from the API endpoint: https://findic.cl/api/euro. The data is provided by the Chilean website findic.cl.
get_chile_euro()get_chile_euro()
The values returned by the API include metadata and a time series of daily exchange rates.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha (date) and valor (value).
The function sends a GET request to the /api/euro endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
A tibble (data frame) with the following columns:
fecha: Fecha del valor observado (en formato "YYYY-MM-DD").
valor: Valor del euro observado en pesos chilenos (numérico).
Requires internet connection. The function returns the values exactly as provided in Spanish.
## Not run: euro_data <- get_chile_euro() head(euro_data) ## End(Not run)## Not run: euro_data <- get_chile_euro() head(euro_data) ## End(Not run)
Retrieves Chile's Gross Domestic Product (GDP) in current US dollars
for the years 2010 to 2022 using the World Bank Open Data API.
The indicator used is NY.GDP.MKTP.CD.
get_chile_gdp()get_chile_gdp()
This function sends a GET request to the World Bank API.
If the API request fails or returns an error status code,
the function returns NULL with an informative message.
A tibble with the following columns:
indicator: Indicator name (e.g., "GDP (current US$)")
country: Country name ("Chile")
year: Year of the data (integer)
value: GDP in current US dollars
value_label: Formatted GDP with commas (e.g., "1,800,000,000,000")
Requires internet connection.
World Bank Open Data API: https://data.worldbank.org/indicator/NY.GDP.MKTP.CD
GET, fromJSON, as_tibble, comma
if (interactive()) { get_chile_gdp() }if (interactive()) { get_chile_gdp() }
Retrieves the list of official public holidays in Chile for a specific year using the Nager.Date public holidays API. This function returns a tibble containing the date of the holiday, the name in the local language (Spanish), and the English name. It is useful for academic, planning, and data analysis purposes. The information is retrieved directly from the Nager.Date API and reflects the current status of holidays for the requested year. The field names returned are consistent with the API structure.
get_chile_holidays(year)get_chile_holidays(year)
year |
An integer indicating the year (e.g., 2024 or 2025). |
A tibble with the following columns:
date: Date of the holiday (class Date)
local_name: Holiday name in the local language (Spanish)
name: Holiday name in English
Data obtained from the Nager.Date API: https://date.nager.at/
get_chile_holidays(2024) get_chile_holidays(2025)get_chile_holidays(2024) get_chile_holidays(2025)
Retrieves Chile's number of hospital beds per 1,000 people
for the years 2010 to 2022 using the World Bank Open Data API.
The indicator used is SH.MED.BEDS.ZS.
get_chile_hospital_beds()get_chile_hospital_beds()
This function sends a GET request to the World Bank API.
If the API request fails or returns an error status code,
the function returns NULL with an informative message.
A tibble with the following columns:
indicator: Indicator name (e.g., "Hospital beds (per 1,000 people)")
country: Country name ("Chile")
year: Year of the data (integer)
value: Number of hospital beds per 1,000 people
Requires internet connection.
World Bank Open Data API: https://data.worldbank.org/indicator/SH.MED.BEDS.ZS
if (interactive()) { get_chile_hospital_beds() }if (interactive()) { get_chile_hospital_beds() }
This function retrieves the historical values of the IPSA index ("Índice de Precios Selectivo de Acciones") from the API endpoint: https://findic.cl/api/ipsa. The data is provided by the Chilean website findic.cl.
get_chile_ipsa()get_chile_ipsa()
The values returned by the API include metadata and a time series of daily IPSA index values.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha (date) and valor (value).
The function sends a GET request to the /api/ipsa endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
A tibble (data frame) with the following columns:
fecha: Fecha de la observación (in "YYYY-MM-DD" format).
valor: Valor del índice IPSA en puntos (numeric).
Requires internet connection. The function returns the values exactly as provided in Spanish.
## Not run: ipsa_data <- get_chile_ipsa() head(ipsa_data) ## End(Not run)## Not run: ipsa_data <- get_chile_ipsa() head(ipsa_data) ## End(Not run)
Retrieves Chile's life expectancy at birth (total, years)
for the years 2010 to 2022 using the World Bank Open Data API.
The indicator used is SP.DYN.LE00.IN.
get_chile_life_expectancy()get_chile_life_expectancy()
This function sends a GET request to the World Bank API.
If the API request fails or returns an error status code,
the function returns NULL with an informative message.
A tibble with the following columns:
indicator: Indicator name (e.g., "Life expectancy at birth, total (years)")
country: Country name ("Chile")
year: Year of the data (integer)
value: Life expectancy at birth in years
Requires internet connection.
World Bank Open Data API: https://data.worldbank.org/indicator/SP.DYN.LE00.IN
if (interactive()) { get_chile_life_expectancy() }if (interactive()) { get_chile_life_expectancy() }
Retrieves Chile's adult literacy rate (
for the years 2010 to 2022 using the World Bank Open Data API.
The indicator used is SE.ADT.LITR.ZS.
get_chile_literacy_rate()get_chile_literacy_rate()
This function sends a GET request to the World Bank API.
If the API request fails or returns an error status code,
the function returns NULL with an informative message.
A tibble with the following columns:
indicator: Indicator name
country: Country name ("Chile")
year: Year of the data (integer)
value: Literacy rate as a percentage
Requires internet connection.
World Bank Open Data API: https://data.worldbank.org/indicator/SE.ADT.LITR.ZS
literacy_data <- get_chile_literacy_rate() head(literacy_data)literacy_data <- get_chile_literacy_rate() head(literacy_data)
Retrieves Chile's total population for the years 2010 to 2022
using the World Bank Open Data API. The indicator used is SP.POP.TOTL.
get_chile_population()get_chile_population()
The function sends a GET request to the World Bank API.
If the API request fails or returns an error status code, the function returns NULL with an informative message.
A tibble with the following columns:
indicator: Indicator name (e.g., "Population, total")
country: Country name ("Chile")
year: Year of the data (integer)
value: Population as a numeric value
value_label: Formatted population with commas (e.g., "51,000,000")
Requires internet connection. The data is retrieved in real time from the World Bank API.
World Bank Open Data API: https://data.worldbank.org/indicator/SP.POP.TOTL
GET, fromJSON, as_tibble, comma
if (interactive()) { get_chile_population() }if (interactive()) { get_chile_population() }
This function retrieves the Unidad de Fomento (UF) daily values in Chilean Pesos from the API endpoint: https://findic.cl/api/uf. The data is provided by the Chilean website findic.cl.
get_chile_uf()get_chile_uf()
The values returned by the API include metadata and a time series of daily UF values.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha (date) and valor (value).
The function sends a GET request to the /api/uf endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
A tibble (data frame) with the following columns:
fecha: Fecha del valor observado (in "YYYY-MM-DD" format).
valor: Valor diario de la UF en pesos chilenos (numeric).
Requires internet connection. The function returns the values exactly as provided in Spanish.
## Not run: uf_data <- get_chile_uf() head(uf_data) ## End(Not run)## Not run: uf_data <- get_chile_uf() head(uf_data) ## End(Not run)
Retrieves Chile's total unemployment rate, measured as a percentage of the total labor force,
for the years 2010 to 2022 using the World Bank Open Data API.
The indicator used is SL.UEM.TOTL.ZS.
get_chile_unemployment()get_chile_unemployment()
This function sends a GET request to the World Bank API.
If the API request fails or returns an error status code,
the function returns NULL with an informative message.
A tibble with the following columns:
indicator: Indicator name (e.g., "Unemployment, total (
country: Country name ("Chile")
year: Year of the data (integer)
value: Unemployment rate as a numeric value (percentage)
Requires internet connection.
World Bank Open Data API: https://data.worldbank.org/indicator/SL.UEM.TOTL.ZS
if (interactive()) { get_chile_unemployment() }if (interactive()) { get_chile_unemployment() }
This function retrieves the historical values of the Unidad Tributaria Mensual (UTM) in Chilean Pesos from the API endpoint: https://findic.cl/api/utm. The data is provided by the Chilean website findic.cl.
get_chile_utm()get_chile_utm()
The values returned by the API include metadata and a time series of monthly values.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha (date) and valor (value).
The function sends a GET request to the /api/utm endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
A tibble (data frame) with the following columns:
fecha: Fecha de referencia del valor mensual (in format "YYYY-MM-DD").
valor: Valor mensual de la Unidad Tributaria Mensual (UTM) en pesos chilenos (numeric).
Requires internet connection. The function returns the values exactly as provided in Spanish.
## Not run: utm_data <- get_chile_utm() head(utm_data) ## End(Not run)## Not run: utm_data <- get_chile_utm() head(utm_data) ## End(Not run)
This function retrieves the observed exchange rate ("Yen (pesos por yen)") in Chilean Pesos from the API endpoint: https://findic.cl/api/yen. The data is provided by the Chilean website findic.cl.
get_chile_yen()get_chile_yen()
The values returned by the API include metadata and a time series of daily exchange rates.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha (date) and valor (value).
The function sends a GET request to the /api/yen endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
A tibble (data frame) with the following columns:
fecha: Fecha del valor observado (en formato "YYYY-MM-DD").
valor: Valor del yen observado en pesos chilenos (numérico).
Requires internet connection. The function returns the values exactly as provided in Spanish.
## Not run: yen_data <- get_chile_yen() head(yen_data) ## End(Not run)## Not run: yen_data <- get_chile_yen() head(yen_data) ## End(Not run)
Retrieves comprehensive country information for Chile from the REST Countries API. This function fetches data including official and common names, geographical information, capital, area, population, and languages.
get_country_info_cl()get_country_info_cl()
This function makes a request to the REST Countries API v3.1 endpoint specifically for Chile using full text search. It handles API errors gracefully and returns NULL if the request fails or no data is found.
A tibble with one row containing Chile's country information:
Common name of the country
Official name of the country
Geographic region
Geographic subregion
Capital city(ies)
Total area in square kilometers
Total population
Languages spoken (comma-separated)
# Get Chile information cl_info <- get_country_info_cl() print(cl_info)# Get Chile information cl_info <- get_country_info_cl() print(cl_info)
This dataset, malleco_tree_rings_ts, is a time series object ('ts') containing the average annual tree ring width, measured in millimeters, for Araucaria Araucana trees located in the Malleco region of Chile. The data spans 734 years, from 1242 to 1975, and was originally collected for use in climate and environmental reconstructions. The frequency of the series is annual (one observation per year). The series shows interannual variability in growth and is suitable for time series analysis and dendrochronological studies.
data(malleco_tree_rings_ts)data(malleco_tree_rings_ts)
A time series object with 734 annual observations:
1242
1975
Annual (1)
Average annual ring width in millimeters (numeric)
The dataset name has been kept as 'malleco_tree_rings_ts' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix 'ts' indicates that the dataset is a time series object. The original content has not been modified in any way.
Data taken from the LSTS package version 2.1
This dataset, pinochet_regime_df, is a data frame containing detailed information about human rights violations that occurred in Chile during the military dictatorship of Augusto Pinochet, spanning from 1973 to 1990. The data includes victim-level records such as names, age, gender, affiliation, nature of the violence, methods used, and geographic information when available. It is based on the National Truth and Reconciliation Commission Report (1991, ISBN:9780268016463). The dataset also includes georeferenced locations across multiple levels for incidents where such data could be retrieved.
data(pinochet_regime_df)data(pinochet_regime_df)
A data frame with 2,398 observations and 59 variables:
Victim ID
Group ID for collective incidents
Start date (day precision)
End date (day precision)
Start date (month precision)
End date (month precision)
Victim's last name
Victim's first name
Indicator if victim was a minor
Age of the victim
Indicator if victim was male
Victim's occupation
Detailed occupation description
Affiliation of the victim
Detailed affiliation
Type of violence experienced
Method of violence
Interrogation indicator
Torture indicator
Mistreatment indicator
Targeting category
Indicator for press involvement
War tribunal indicator
Number of previous arrests
Affiliation of perpetrator
Detailed affiliation of perpetrator
Victim's nationality
First incident location
First location detail
Latitude of first location
Longitude of first location
Indicator of coordinate precision (1 = exact)
Second incident location
Second location detail
Latitude of second location
Longitude of second location
Indicator of coordinate precision (2nd)
Third incident location
Third location detail
Latitude of third location
Longitude of third location
Indicator of coordinate precision (3rd)
Fourth incident location
Fourth location detail
Latitude of fourth location
Longitude of fourth location
Indicator of coordinate precision (4th)
Fifth incident location
Fifth location detail
Latitude of fifth location
Longitude of fifth location
Indicator of coordinate precision (5th)
Sixth incident location
Sixth location detail
Latitude of sixth location
Longitude of sixth location
Indicator of coordinate precision (6th)
Source page in the original report
Additional remarks or context
The dataset name has been kept as pinochet_regime_df to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix df indicates that the dataset is a data frame. The original content has not been modified.
Data taken from the pinochet package version 0.1.0.
This dataset, territorial_codes_tbl_df, is a tibble containing official codes for communes, provinces, and regions in Chile. The codes were provided by the Chilean government agency SUBDERE. The names of the administrative divisions were converted to ASCII characters to avoid encoding issues. All variable names and data values are in Spanish, as retrieved from the original source.
data(territorial_codes_tbl_df)data(territorial_codes_tbl_df)
A tibble with 346 observations and 6 variables:
Official commune code and commune name (character, in Spanish)
Official province code and province name (character, in Spanish)
Official region code and region name (character, in Spanish)
The dataset name has been kept as 'territorial_codes_tbl_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.
Data taken from the chilemapas package version 0.3.0
This function lists all datasets available in the 'ChileDataAPI' package. If the 'ChileDataAPI' package is not loaded, it stops and shows an error message. If no datasets are available, it returns a message and an empty vector.
view_datasets_ChileDataAPI()view_datasets_ChileDataAPI()
A character vector with the names of the available datasets. If no datasets are found, it returns an empty character vector.
if (requireNamespace("ChileDataAPI", quietly = TRUE)) { library(ChileDataAPI) view_datasets_ChileDataAPI() }if (requireNamespace("ChileDataAPI", quietly = TRUE)) { library(ChileDataAPI) view_datasets_ChileDataAPI() }