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
Package is available via npm:
npm install nigerian-geopolitical-zones
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');
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
}
- Clone this repository
- Create a branch
- Make some changes
- Test your changes
- Push your branch and open a PR
The data was mostly sourced from Wikipedia and a number of other public sources across the internet.