# Preprocess santander bike-sharing data

## CSV trip data to json

The script 'convert-csv-to-json' reads all CSV files in the 'input' directory and converts them it to a single json named 'bike-sharing-trip-data'. 
The CSV files must contain London cycling trip data from Santander, available [here](https://cycling.data.tfl.gov.uk/).

Make sure your folder structure inside the input directory looks as follows:

```
├── 2015TripData
│         ├── 1a.JourneyDataExtract04Jan15-17Jan15.csv
│         ├── ...
├── 2016TripData
│         ├── 01aJourneyDataExtract10Jan16-23Jan16.csv
│         ├── ...
```

Install dependencies with `npm intall`.

Then you can run the script with `npm start`.

If you process a lot of files, the script might take a few minutes, don't abort the process, wait till the script finishes!

The file size of the final json will be twice as high as the original CSV files.
