← Back to all sparks
N

naijR

ANALYTICS
Velocity0.0

R package on Nigeria and for Nigeria. Contribute to ropensci/naijR development by creating an account on GitHub.

naijR is assembling the Nigerian reference data R analysts otherwise hand-code every time.

nigeriageospatialreference-datar-languagedata-cleaning
Current state
naijR packages Nigeria-specific data and utilities for R: state and Local Government Area names, choropleth mapping, and phone-number repair. The newest release adds `ngdist`, a UNDP-sourced distance matrix covering road distances between all 37 state capitals, with `ng_distance()` for pairwise lookup in kilometres or miles. The spatial foundation was rebased on sf in 0.6.0, retiring the rgdal-era code.
Where it's heading
The package keeps converting local knowledge into checked data structures. LGA names shared between states got `disambiguate_lga()` with interactive selection; misspellings in the original reference document were corrected; mobile numbers with inconsistent separators, or with the letter O typed for zero, get repaired rather than rejected. Each addition targets a specific way Nigerian administrative or contact data breaks generic tooling, which is a narrower and more durable brief than most country packages take on.
Prediction
With a distance matrix now in place alongside the boundary and naming data, the plausible next step is more derived geography of the same kind rather than new utility functions, though the entries do not say which dataset is next.

Recent moves

  1. 5mo ago

    Road distances between all 37 state capitals

    Adds `ngdist`, a UNDP-sourced `dist` object of road distances between every pair of Nigerian state capitals, plus `ng_distance()` for lookups in kilometres or miles. Extends the package from naming and boundary data into derived geography — the kind of table analysts currently rebuild by hand or scrape.

    View source ↗
  2. 5mo ago

    Development snapshot of the distance-matrix work

    A development build carrying the same `ngdist` and `ng_distance()` changes that shipped as 0.7.0 two days later. Same content, pre-release version number — not a separate move.

    View source ↗
  3. 2y ago

    More examples and tighter internal data compression

    Documentation expansion and increased compression of the bundled datasets. Housekeeping following the larger 0.6.0 restructuring.

    View source ↗
  4. 3y ago

    sf replaces rgdal; LGA name collisions get a resolver

    Rebases the spatial layer on sf, adds a `states_nigeria` dataset, and introduces `disambiguate_lga()` for the genuine domain problem of Local Government Area names shared across states — resolvable interactively by presenting the candidates. Also corrects LGA spellings inherited from a flawed reference document.

    View source ↗
  5. 3y ago

    Warning silenced ahead of the spatial stack migration

    Suppresses a warning about end-of-life spatial dependencies while the real migration was being prepared. Groundwork for 0.6.0, no user-facing change.

    View source ↗
  6. 3y ago

    Package objects gain base R semantics; phone repair widened

    Methods for `c()`, `[`, `[[` and `na.exclude` make the package's classes behave like ordinary R vectors rather than special cases. Phone-number repair grows to handle common separators and the classic O-for-zero data entry error, and choropleth creation from a two-column data frame gets simpler.

    View source ↗