---
id: "gb_nptg_locality_code"
kind: "datatype"
status: "draft"
is_pii: false
name: "NPTG locality code (Great Britain)"
regexp: "^[EN][0S]\\d{6}$"
categories: ["transport", "geo"]
country: ["GB"]
langs: ["en"]
quality: 85
url: "https://registry.apicrafter.io/datatype/gb_nptg_locality_code"
---

# NPTG locality code (Great Britain) (`gb_nptg_locality_code`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Code of a locality (a town, village or district) in the National Public Transport Gazetteer of Great Britain. NaPTAN stop records name the locality of the stop by it (NptgLocalityCode). It is eight characters: E or N, 0 or S, six digits.

- Personal data (PII): no
- Categories: Transportation (transport), Geographic identifiers (geo)
- Countries: United Kingdom (GB)
- Languages: English (en)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^[EN][0S]\d{6}$
```

## Examples

- `E0029368` — Locality of a Greater Manchester bus stop
- `N0075002` — Locality of a Greater Manchester bus stop
- `1800WKH4032` (invalid example) — A NaPTAN ATCO code

## Metacrafter rules

1 rules: 0 match the field name, 1 match values.

- `gbnptglocalitycodevalue` (data, `gb/gb_transport.yaml`)

## Supported by tools

- [`metacrafter`](https://registry.apicrafter.io/tool/metacrafter.md)

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/NaPTAN>
- doc: <https://www.gov.uk/government/publications/national-public-transport-gazetteer>

## Quality

Score 85/100. Missing: mapping (Wikidata, Schema.org, ...), translation.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/gb_nptg_locality_code.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/GB/transport/gb_nptg_locality_code.yaml>
