get_country_info_cl: Get Country Information for Chile

View source: R/get_country_info_cl.R

get_country_info_clR Documentation

Get Country Information for Chile

Description

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.

Usage

get_country_info_cl()

Details

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.

Value

A tibble with one row containing Chile's country information:

name_common

Common name of the country

name_official

Official name of the country

region

Geographic region

subregion

Geographic subregion

capital

Capital city(ies)

area

Total area in square kilometers

population

Total population

languages

Languages spoken (comma-separated)

Examples


# Get Chile information
cl_info <- get_country_info_cl()
print(cl_info)



ChileDataAPI documentation built on Sept. 11, 2025, 9:09 a.m.