Liking cljdoc? Tell your friends :D

hiposfer.kamal.router.io.gtfs

namespace for handling GTFS to Datascript convertion and vice versa.

The algorithms coerces GTFS csv files into entities that reference each other through IDs. The IDs are taken directly from GTFS.

A small dynamic renaming is performed to make it more compatible with Datascript design. The renaming is based on the GTFS naming convention, for example: stop_lon, stop_url, trip_id, trip_headsign.

We transform those strings into: :stop/lon, :stop/url, :trip/id, :trip/headsign, respectively.

This is important to be able to create relationships between entities through transactions, for example {:trip/id 1, :trip/route [:route/id 1]}. This allows us to create relationships between entities without using java references ... just data

namespace for handling GTFS to Datascript convertion and vice versa.

The algorithms coerces GTFS csv files into entities that reference
each other through IDs. The IDs are taken directly from GTFS.

A small dynamic renaming is performed to make it more compatible
with Datascript design. The renaming is based on the GTFS naming
convention, for example: stop_lon, stop_url, trip_id, trip_headsign.

We transform those strings into: :stop/lon, :stop/url, :trip/id,
:trip/headsign, respectively.

This is important to be able to create relationships between entities through
transactions, for example {:trip/id 1, :trip/route [:route/id 1]}. This
allows us to create relationships between entities without using java references
... just data
raw docstring

date-formatclj

source

decodeclj

(decode text)
source

dump!clj

(dump! network outstream)

writes the complete GTFS information from network into outstream as a Zip file

writes the complete GTFS information from network into outstream as a Zip file
sourceraw docstring

encodeclj

(encode k v)

encodes the value of a gtfs field back to the format specified in the reference spec

encodes the value of a gtfs field back to the format specified in the
reference spec
sourceraw docstring

feed-hidratorclj

A map of filename -> fn -> [entity ...]. Useful to fetch entities that do not have a unique field to fetch from

A map of filename -> fn -> [entity ...]. Useful to fetch entities that do
not have a unique field to fetch from
sourceraw docstring

keywordsclj

source

parseclj

(parse zipstream filename)

takes a filename and parses its content if supported by this parser. Entries that do not conform to the gtfs spec are removed. Returns a vector of conformed entries

takes a filename and parses its content if supported by this parser.
Entries that do not conform to the gtfs spec are removed. Returns
a vector of conformed entries
sourceraw docstring

re-dateclj

source

re-durationclj

source

re-numberclj

source

re-timezoneclj

source

read-orderclj

source

ref?clj

(ref? field)

a reference is a field that links to a unique field in another file and that is not that field itself

a reference is a field that links to a unique field in another file
and that is not that field itself
sourceraw docstring

resourceclj

(resource entity)

takes a datascript entity and checks if any of its values are entities, if so replaces them by their unique identity value

takes a datascript entity and checks if any of its values are entities, if so
replaces them by their unique identity value
sourceraw docstring

transaction!clj

(transaction! zipstream)

returns a Datascript transaction of the complete gtfs feed

returns a Datascript transaction of the complete gtfs feed
sourceraw docstring

truncatorsclj

map of GTFS filenames to post-processing functions. Useful to remove unnecessary information from the GTFS feed; just to reduce the amount of datoms in datascript

map of GTFS filenames to post-processing functions. Useful to remove
unnecessary information from the GTFS feed; just to reduce the amount
 of datoms in datascript
sourceraw docstring

uniquesclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close