nigerian-geopolitical-zones
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

Nigerian Geopolitical Zones Data NPM Version

This library contains in JSON format, Nigerian states with their various geopolitical zones. Other data includes:

  • Area (in Km2)
  • Capital Cities
  • Longitude & Latitude Coordinates
  • State Motto
  • Population Count
  • Population Count Rank
  • Year Created
  • Zone

Installation

Package is available via npm:

npm install nigerian-geopolitical-zones

Usage

Example:

// Utils
import { getAllZones, getZoneData, getZoneByState } from 'nigerian-geopolitical-zones';

// All 36 states (plus. FCT) with their zones
getAllZones();

// Names of all zones
getZonesList();

// All states that fall in a zone
getZoneData('south east');
getZoneData('south-east');

// A state with zone data
getZoneByState('abia'); 

Data structure

Example:

// Zone interface
{
  areaKm2: string;
  capitalCity: string;
  coordinates: Coordinates;
  motto: string;
  population: number;
  populationRank: number | null;
  state: string;
  yearCreated: number;
  zone: string;
}

// Coordinates interface
{
  latitude: number;
  longitude: number
}

Contributions

PRs are welcome.

Credits

The data was mostly sourced from Wikipedia and a number of other public sources across the internet.

Package Sidebar

Install

npm i nigerian-geopolitical-zones

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

47.1 kB

Total Files

18

Last publish

Collaborators

  • patrickojeh