MyNixOS website logo
Description

Access Indian Data via Public APIs and Curated Datasets.

Provides functions to access data from public RESTful APIs including 'World Bank API', and 'REST Countries API', retrieving real-time or historical data related to India, such as economic indicators, and international demographic and geopolitical indicators. Additionally, the package includes one of the largest curated collections of open datasets focused on India, covering topics such as population, economy, weather, politics, health, biodiversity, sports, agriculture, cybercrime, infrastructure, and more. The package supports reproducible research and teaching by integrating reliable international APIs and structured datasets from public, academic, and government sources. For more information on the APIs, see: 'World Bank API' <https://datahelpdesk.worldbank.org/knowledgebase/articles/889392>, 'REST Countries API' <https://restcountries.com/>.

IndiAPIs

License: MIT

The IndiAPIs package provides a unified interface to access open data from the World Bank API and the REST Countries API, with a focus on India. It allows users to retrieve up-to-date or historical information on topics such as economic indicators, international demographic statistics, and key geopolitical details related to India.

In addition to API-access functions, the package includes one of the largest curated collections of open datasets focused on India. These datasets cover a wide range of topics including population, economy, weather, politics, health, biodiversity, sports, agriculture, cybercrime, infrastructure, and more.

Installation

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


install.packages("IndiAPIs")

Usage

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


library(IndiAPIs)

IndiAPIs Functions

Below is a list of the main functions included in the package:

  • get_india_child_mortality(): Get India's Under-5 Mortality Rate from World Bank.

  • get_india_cpi(): Get India's Consumer Price Index (2010 = 100) from World Bank.

  • get_india_energy_use(): Get India's Energy Use (kg of oil equivalent per capita) from World Bank.

  • get_india_gdp(): Get India's GDP (current US$) from World Bank.

  • get_india_hospital_beds(): Get India's Hospital Beds (per 1,000 people) from World Bank.

  • get_india_life_expectancy(): Get India's Life Expectancy at Birth from World Bank.

  • get_india_literacy_rate(): Get India's Adult Literacy Rate from World Bank.

  • get_india_population(): Get India's Total Population from World Bank.

  • get_india_unemployment(): Get India's Unemployment Rate (% of total labor force) from World Bank.

  • get_country_info_in(): Get Key Country Information for India.

  • view_datasets_IndiAPIs(): View Available Datasets in IndiAPIs.

Dataset Suffixes

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

  • _df: A standard data frame object.

  • _dt: A data table object.

  • _ts: A time series object.

Datasets Included in IndiAPIs

In addition to API access functions, IndiAPIs offers one of the largest curated collections of open datasets focused on India. These preloaded datasets cover a wide range of topics including population, economy, weather, politics, health, biodiversity, sports, agriculture, cybercrime, infrastructure, and more. Below are some featured examples:

  • BurdwanWeather_df: A data frame containing weekly weather data for the rice growing season in the Burdwan district of West Bengal, India.

  • birds_watching_tbl_df: A tibble containing detailed information on bird species observed in India, including species names, scientific names, the date of last observation.

  • DelhiPotatoPrices_ts: A time series containing the monthly average potato prices of the Delhi market from January 2010 to July 2020.

Example Code:


# Load the package

library(IndiAPIs)

# Retrieves essential information about India

get_country_info_in()

# Get India's Population (Total) from World Bank

get_india_population()

# Load a dataset

data(India_census2011_tbl_df)

# Shows six rows of the dataset

head(India_census2011_tbl_df)

# Display the structure of the dataset

str(India_census2011_tbl_df)

# Shows the whole dataset

View(India_census2011_tbl_df)


Metadata

Version

0.1.0

License

Unknown

Platforms (76)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows