Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

ropensci/naijR

Domain:

geospatial

Record type:

software
Creator:
rop
Host:
R package on Nigeria and for Nigeria # naijR An R package on Nigeria and for Nigeria The goal of **naijR** is to make it easier for R users to work with data related to Nigeria. ## Usage ### Some simple operations #### Maps One of the useful aspects of this package is enabling users to plot country and sub-national geo-spatial maps. Currently, only vector-type graphics are supported. To find out more, read the vignette–accessible from within R as follows: ``` r vignette('nigeria-maps', 'naijR') ``` ### Administrative Regions #### States To create a list of all the States of the Nigerian Federation, simply call `states()`. ``` r library(naijR, quietly = TRUE) ss <- states() head(ss) States ------ - Abia - Adamawa - Akwa Ibom - Anambra - Bauchi - Bayelsa cat(sprintf("\n...but Nigeria has %i States.", length(ss))) ...but Nigeria has 37 States. ``` States from a given geo-political zone can also be selected: ``` r states(gpz = "ne") # i.e. North-East States ------ - Adamawa - Bauchi - Borno - Gombe - Taraba - Yobe ``` For other capabilities of this function, see `?states()`. #### Local Government Areas This is a basic example that shows how to very quickly fetch the names of Local Government Areas within a given State: ``` r lgas("Imo") LGAs ---- - Aboh Mbaise - Ahiazu Mbaise - Ehime Mbano - Ihitte/Uboma - Ideato North - Ideato South - Ezinihitte-Mbaise - Isu - Oguta - Obowo - Nwangele - Njaba - Ngor Okpala - Mbaitoli - Nkwerre - Orsu - Orlu - Onuimo - Okigwe - Ohaji/Egbema - Oru East - Isiala Mbano - Ikeduru - Owerri Municipal - Owerri West - Owerri North - Oru West ``` To list all the LGAs in Nigeria, call the same function without any parameters: ``` r n <- length(lgas()) sprintf("Nigeria has a total of %i Local Government Areas", n) [1] "Nigeria has a total of 774 Local Government Areas" ``` Want to create a function to check how many LGAs a partic …

Visit

github.com

Languages

BauchiFulfulde, AdamawaIgboIzonKanuri, YerwaLongudaSena

Licenses

GPL-3.0

Similar

ropensci/rgbif: rgbif v3.6.0

ropensci/rgbif: rgbif v3.6.0

Downloads typo in download predicate functions fixed - mulitpoint -> multipoin