geo-ng is an npm package that provides data related to geographic locations in Nigeria.
You can install geo-ng via npm or yarn:
npm install geo-ng
or
yarn add geo-ng
import { getNigeriaStates } from 'geo-ng';
const nigeriaStates = getNigeriaStates();
console.log(nigeriaStates);
import { getLGAs } from 'geo-ng';
const lgas = getLGAs('AB');
console.log(lgas);
import { getLgaSubAreas } from 'geo-ng';
const subAreas = getLgaSubAreas("AB", "ABA NORTH");
console.log(subAreas);
The geo-ng package provides the following API:
- getNigeriaStates(): Returns a list of Nigerian states with their codes.
- getLGAs(stateCode: string): Returns the Local Government Areas (LGAs) of a specified state.
- getLgaSubAreas(stateCode: string, lga: string): Returns the areas/sub-areas of a specified LGA.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.
The states, local government areas (LGAs), and sub-areas data in this package are sourced from https://govote.ng/, a website providing information related to geographic locations in Nigeria. This data was used to update and enhance the geographic data in the geo-ng
package. Visit https://govote.ng/ for more details.