mexicodataapi

The MexicoDataAPI package provides a unified interface to access open data from the World Bank API and the REST Countries API, with a focus on Mexico.

https://github.com/lightbluetitan/mexicodataapi

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

The MexicoDataAPI package provides a unified interface to access open data from the World Bank API and the REST Countries API, with a focus on Mexico.

Basic Info
  • Host: GitHub
  • Owner: lightbluetitan
  • Language: R
  • Default Branch: main
  • Homepage:
  • Size: 1.61 MB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created 12 months ago · Last pushed 12 months ago
Metadata Files
Readme

README.md

MexicoDataAPI

The MexicoDataAPI package provides a unified interface to access open data from the World Bank API and the REST Countries API, with a focus on Mexico. It allows users to retrieve up-to-date information on topics such as economic indicators, population figures, literacy rates, and unemployment levels, as well as basic geopolitical information.

In addition to API-access functions, the package includes a set of curated datasets related to Mexico. These cover areas such as air quality monitoring, state-level income surveys, postal abbreviations, election results, and regional forest classification.

MexicoDataAPI is intended to support users working with data related to Mexico by integrating international API sources with selected datasets from national and academic origins, in a single R package.

Installation

You can install the MexicoDataAPI package from CRAN with the following R function:

```R

install.packages("MexicoDataAPI")

```

Usage

After installation, load the package and start exploring and using its functions and datasets.

```R

library(MexicoDataAPI)

```

MexicoDataAPI Functions

  • get_mexico_cpi(): Get Mexico's Consumer Price Index (2010 = 100) from World Bank

  • get_mexico_gdp(): Get Mexico's GDP (Current US$) from World Bank

  • get_mexico_life_expectancy: Get Mexico's Life Expectancy from World Bank

  • get_mexico_literacy_rate(): Get Mexico's Literacy Rate (Age 15+) from World Bank

  • get_mexico_population(): Get Mexico's Population (Total) from World Bank

  • get_mexico_unemployment(): Get Mexico's Unemployment Rate from World Bank

  • get_country_info(): Get essential information about Mexico or any other country by its full name Example: getcountryinfo("Mexico"),getcountryinfo("mexico"),getcountryinfo("Peru")

  • view_datasets_MexicoDataAPI(): Lists all curated datasets included in the MexicoDataAPI package

Dataset Suffixes

Each dataset in MexicoDataAPI is labeled with a suffix to indicate its structure and type:

  • _df: A standard data frame.

  • _tbl_df: A tibble data frame object.

  • _chr: A character object.

Datasets Included in MexicoDataAPI

In addition to API access functions, MexicoDataAPI provides several preloaded datasets related to Mexico’s environment, demographics, and public data. Here are some featured examples:

  • mexico_elections_df: Data frame containing a subset of the 2012 Mexico Elections Panel Study.

  • mex_income_2016_tbl_df: Tibble containing household-level income data and associated demographic characteristics from the 2016 ENIGH (Household Income and Expenditure Survey).

  • mexico_abb_chr: Character vector containing the official two- or three-letter postal abbreviations for the 32 federal entities of Mexico.

Example Code:

```R

Load the package

library(MexicoDataAPI)

Selected, essential information about Mexico

getcountryinfo("Mexico")

Get Mexico's Population (Total) from World Bank

getmexicopopulation()

Load a dataset

data("mexincome2016tbldf")

Shows six rows of the dataset

head(mexincome2016tbldf)

Display the structure of the dataset

str(mexincome2016tbldf)

Shows the whole dataset

View(mexincome2016tbldf)

```

Owner

  • Name: Renzo Cáceres Rossi
  • Login: lightbluetitan
  • Kind: user
  • Location: Lima, Perú

Soy un fanatico del Lenguaje de programación R y RMarkdown

GitHub Events

Total
  • Watch event: 2
  • Create event: 2
Last Year
  • Watch event: 2
  • Create event: 2

Packages

  • Total packages: 1
  • Total downloads:
    • cran 242 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: MexicoDataAPI

Access Mexican Data via APIs and Curated Datasets

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 242 Last month
Rankings
Dependent packages count: 25.9%
Dependent repos count: 31.8%
Average: 47.8%
Downloads: 85.6%
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
  • R >= 4.1.0 depends
  • dplyr * imports
  • httr * imports
  • jsonlite * imports
  • scales * imports
  • utils * imports
  • ggplot2 * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests