 trips = []
 stations = {}
 
-console.log 'Merging stations.csv & trips-stations.csv into stations.ndjson:'
-
-# read & accumulate data
+console.log 'Merging stations.csv & trips-stations.csv:'
+
 readNdjson 'lines.ndjson', processLine lines
 .then () ->
 	return readNdjson 'trips.ndjson', processTrip trips

path =			require 'path'
fs =			require 'fs'
moment =		require 'moment'
Q =				require 'q'
csv =			require 'csv-parse'
ndjson =		require 'ndjson'




.then () ->
	return readCsv 'trips-stations.csv', processTripStation lines, trips, stations

.then () ->
	console.log 'Done.'
	console.log 'Downloading & merging entrances from Open Street Map:'
	return downloadEntrances()
.then (entrances) ->
	return mapEntrances stations, entrances
.then (stations) ->
	console.log 'Done.'
	console.log 'Writing into stations.ndjson:'
	return stations

# write data
