get_Colombia_info {ColombiAPI}R Documentation

Get Information About Colombia

Description

This function makes an API call https://api-colombia.com/api/v1/Country/Colombia to retrieve information about Colombia, such as its name, surface area, population, time zone, currency, and region. It processes the API response and returns the data in a structured data.frame.

Usage

get_Colombia_info()

Details

The function sends a GET request to the API at https://api-colombia.com/api/v1/Country/Colombia. If the API returns a successful response (status code 200), the data is parsed and returned. If the response is unsuccessful or the structure is not as expected, the function will return NULL.

Value

A 'data.frame' with the following columns:

Note

Ensure you have an active internet connection to access the API. If the API structure changes or the API becomes unavailable, the function may need modifications.

This function relies on the following packages: httr and jsonlite. These packages are used for making HTTP requests and processing JSON responses, respectively.

Examples

## Not run: 
  # Call the function to get Colombia information
  colombia_info <- get_Colombia_info()

  # Print the result
  print(colombia_info)

## End(Not run)


[Package ColombiAPI version 0.1.1 Index]