![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
gtfs2lc
Advanced tools
Readme
Transforms a GTFS file towards a directed acyclic graph of "connections".
A connection is the combination of a departure and its successive arrival of the same trip. Our goal is to retrieve a list of connections that is sorted by departure time, better known as a Directed Acyclic Graph. This way, routeplanning algorithms can be performed.
npm install -g gtfs2lc
First, unzip your GTFS file to a place on your disk using e.g., unzip gtfs.zip -d /tmp
Now, we need to make sure that a couple of files are ordered in a specific fashion, not required by the GTFS spec:
trip_id
and stop_sequence
. Mind that the number of the columns are also not standardized by GTFS and you might need to tweak the sort command in this repo.service_id
.service_id
.We've enclosed a bash script which ensures this for you. It isn't perfect however and may not return the desired result. You can run this bash script using gtfs2lc-sort $pathname
.
If you've ensured this, you can use this tool on the command line as follows:
gtfs2lc /path/to/extracted/gtfs -f csv --startDate 20151101 -e 20160101
You also can load the data into mongodb in extended json-ld format as follows:
gtfs2lc /path/to/extracted/gtfs -f mongold -b baseUris.json | mongoimport -c myconnections
Mind that only MongoDB starting version 2.6 is supported.
For more options, check gtfs2lc --help
We convert stop_times.txt
to a stream of connection rules. These rules need a certain explanation about on which days they are running, which can be retrieved using the trip_id
in the connection rules stream.
At the same time, we process calendar_dates.txt
and calendar.txt
towards a binary format. It will contain a 1 for the number of days from a start date for which the service id is true.
In the final step, the connection rules are expanded towards connections by joining the days, service ids and rules.
At this moment we've only implemented a conversion from the Stop Times to connections. However, in future work we will also implement a system for describing trips and routes, a system for transit stops and a system for transfers.
Furthermore, also frequencies.txt
is not supported at this time. We hope to support this in the future though.
Pieter Colpaert - pieter.colpaert@ugent.be
FAQs
Mapping script from gtfs to (linked) connections
The npm package gtfs2lc receives a total of 3 weekly downloads. As such, gtfs2lc popularity was classified as not popular.
We found that gtfs2lc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.