# nigeria-inec-geo
Nigeria's complete electoral geography, taken from INEC's own portal.
| level | count | INEC's published figure |
| --- | --- | --- |
| states | 37 | 37 |
| local government areas | 774 | 774 |
| registration areas (wards) | 8,809 | 8,809 |
| polling units | 176,846 | 176,846 |
Every row carries INEC's official codes, so the hierarchy joins on **codes, not
names**. That matters more than it sounds: names are exactly what disagree
between datasets — `Isiala-Ngwa North` against `ISIALA NGWA NORTH`, `lkwo` with
a lower-case L where an I belongs, `Yewa North` for the LGA INEC still lists
under its pre-2020 name `Egbado North`.
## Why this exists
Most Nigerian geo datasets in circulation are copies of one stale file. The
common one has **768 LGAs, 6,968 wards and 138,824 polling units** — missing 6
LGAs, 1,841 wards and 38,022 polling units, largely because it predates the 2015
polling-unit expansion. Ward and polling-unit names are lower-cased, and each
polling unit's location is just a copy of its name.
This dataset was scraped directly from the Continuous Voter Registration portal
at , which is what INEC actually serves to
voters looking up their own polling unit.
## Install
```bash
npm install nigeria-inec-geo
```
No dependencies. The package is ~17 MB unpacked (a ~3 MB download), almost all
of it the polling-unit table.
## Use
```js
const geo = require('nigeria-inec-geo');
geo.states(); // 37
geo.lgas({ state: '08' }); // Borno's 27 LGAs
geo.wards({ state: '08', lga: '21' }); // wards of Maiduguri M. C.
geo.pollingUnits({ state: '08', lga: '21', ward: '01' });
geo.findByCode('08/21/01/001');
// { code: '001', name: 'ALH. BULAMA MODU I', full_code: '08/21/01/001', ... }
```
Filters take either a code or a name, case- and punctuation-insensitively —
`{ state: '08' }`, `{ state: 8 }` and `{ state: 'borno' }` are the same query.
### Loading cost
Requiring the module …