# Metrolink Ingestor

Simple script to get Metrolink tram station locations from the NaPTAN national transport dataset.

Station locations are stored in greater-manchester-transport.xml, script just extracts Metrolink data only.

## Usage
Pass an outpath file path and optionally pass an input to read from. If no input is passed then it will read from a default data set.

Output should always be a JSON file and input should always be an XML file of the shape returned from `naptan.app.dft.gov.uk/DataRequest/Naptan.ashx?format=xml&LA=180`

```js
const ingestor = require('metrolink-ingestor')

ingestor('path/to/my-output.json') // uses default data
ingestor('path/to/my-output.json', 'greater-manchester-transport.xml') // uses greater-manchester-transport.xml
```

## Up & Running
Development: 
```bash
npm t
```

Prod:
```bash
npm start
```
