NPTG Migration

Going to the old API (https://naptan.app.dft.gov.uk/datarequest/nptg.ashx?format=csv) downloaded a zip containing csv files representing the NPTG database, this has been decommissioned.

There is now a new API (https://naptan.api.dft.gov.uk/swagger/index.html) but not all NPTG data is available in csv format (only 'localities' as of 2022-10-02). There is a XML version of all the data.

This tool converts the XML version from the new API into the old csv format, which can be downloaded as a zip or each sub section individually, its aim is to aid in the migration to the new api once its fully released.

The current state shows the version of the NPTG XML file used and when it was converted, data will be updated bi weekly.

File Hashes (Sha265) of the current converted data can be found here in csv format

Note: "CreationDateTime","ModificationDateTime","Modification","RevisionNumber" fields within current state appear static in the new XML version, and does not represent when the source data was last updated
Note: There are a few names within 'Localities' which are not UTF-8 compliant, these need amending at source or at import
Note: There is a issue with LocalityAlternativeNames.csv, not all data is present
Note: There is a additional field added to the end of 'Localities' called 'LocalityClassification' which contains information such as: town, city, hamlet, etc