MyNixOS website logo
Description

Country Data with Names, Capitals, Currencies, Populations, Time, Languages and so on.

Obtain information about countries around the globe. Information for names, states, languages, time, capitals, currency and many more. Data source are 'Wikipedia' <https://www.wikipedia.org>, 'TimeAndDate' <https://www.timeanddate.com> and 'CountryCode' <https://countrycode.org>.

r2country 2.0.2.4.0 is here !

r2country: Compiled dataset and functions for country names, capitals, languages and so on.

View Rmd Demo: https://r2country.obi.obianom.com/visualizeCountries.html

View Shiny App Demo: https://shinyappstore.com/a/r2country


Quick calls to obtain various country info for use 
in writing R markdown and developing robust applications

Please NOTE that currently the 'timeIn' call may not 
provide 100% accurate result for time in particular places. 
This aspect is being worked on for the next version, so don't fret ! 


Install

install.packages("r2country") 


Use

Get all countries

#load package
library(r2country)

#get countries
countries

#or
#get countries in uppercase
COUNTRIES

Load datasets

data(country_calling_code) # calling code for countries
data(country_population) # population by year for countries
data(city_time) # time by city
data(country_names) # country names
data(country_money) # countries currency
data(country_language) # country language
data(country_capital) #country capitals
data(country_continent)# continent countries

Use functions available

Few examples

#get capital of a country

capitalOf$nigeria #for nigeria
capitalOf$china #for china
capitalOf[c("slovenia","romania","malaysia")] #get multiple capitals

#get offical languages of a country

languageOf$romania #for romania
languageOf$mexico #for mexico
languageOf[c("egypt","united kingdom","taiwan")] #get multiple languages

#get population count of country

populationOf$india #for india
populationOf$brazil #for brazil
populationOf[c("slovenia","ghana","nigeria")] #get multiple countries


#get the current time in a place

grep("usa,",names(timeIn), value = T) #get the available USA regions
timeIn$`usa, california, oakland` #get the current time in Oakland, California

grep("nigeria,",names(timeIn), value = T) #get the available Nigeria regions
timeIn$`nigeria, lagos, lagos` #get the current time in Lagos, Nigeria

# And others...

Get more examples

🔴 For complete list, go to official website above.

Metadata

Version

2.0.2.4.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • 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-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