GTFS | NET implementation of a General Transit Feed Specification | Web Services library
kandi X-RAY | GTFS Summary
kandi X-RAY | GTFS Summary
.NET implementation of a General Transit Feed Specification (GTFS) feed parser.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of GTFS
GTFS Key Features
GTFS Examples and Code Snippets
Community Discussions
Trending Discussions on GTFS
QUESTION
This is query about the requirements for routes file in a GTFS feed. If I understand correctly, a route is a set of trips that is spread out across a a time horizon. For example, if there is a bus travelling between stations A and B five times a day, these trips would be alloted one route ID.
Now suppose, there are two other stations, lets say C and D, distinct from A and B and not lying between A and B. Suppose these stations also have 5 trips running between them everyday.
If a GTFS feeds assigns these two sets of trips the same route ID, would this be a violation of the GTFS requirements?
One example of such a feed can be found here:https://gtfs.de/de/feeds/de_rv/
One example is the route with route id 22. This id is used for trips between stations that lie in two non-adjacent state (Nordrhein Westfalen and Baden Wüttenberg). The stations have no overlap.
Would this be violation of the GTFS specification?
...ANSWER
Answered 2022-Apr-01 at 09:54Just a few days ago I had the same problem. Turns out that the creators of the feed put together routes with the same real world names (route_long_name). In your case (route_id 22) it would be the s6 wich is propably also used in different cities. I dont realy understand the logic behind this but acording to them it is still a valid feed.
QUESTION
I'm trying to open a GTFS file that has UTF-8 encoding, but even though I changed my project's encoding in R to UTF-8, the characters are still truncated. The problem can be seen in the "stop_name" column. I'm using windows 10 and I know there are some encoding issues with R, but I have no idea what it is.
Reproducible example:
...ANSWER
Answered 2022-Jan-21 at 15:01You just need to use the encoding
parameter on read_gtfs()
:
QUESTION
According to GTFS specification, arrival_time
filed in GTFS stop_times.txt file can have greater amount of hours than 24.
For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins.
Those values are meant to represent future stops that vehicles will make at each specific time.
I have a pandas dataframe consisting of a bunch of columns where one is storing arrival_time
values. What I'm trying to accomplish is to convert those values that are greater than 24 to actual 24-hour timestamps, e.g. converting 25:34:21
to 01:34:21
.
First, I tried to use str.replace
with a regex, but it got messy pretty fast.
ANSWER
Answered 2022-Jan-24 at 21:56Check if the first two digits are more than 24, then just remove 24 from them and add a zero when needed.
QUESTION
I'm trying to covert a protobuf feed to pandas dataframe for one of my hobby projects. I tried several different techniques to accomplish this but nothing seems to really solve my issue.
I use following code to retrieve GTFS-RT TripUpdates feed:
...ANSWER
Answered 2022-Jan-21 at 20:12The issue can be solved by iterating through feed message using simple foor loops:
QUESTION
I'm trying to create a timetables.txt from other files, and I have this so far.
...ANSWER
Answered 2021-Apr-22 at 17:11Just see the code written below and add it.
QUESTION
I'm building a package that imports {sf}
, and more specifically I use st_length()
in one of my functions.
I initially added only {sf}
to my package "Imports", but when I checked it I got a few {lwgeom}
related errors:
ANSWER
Answered 2021-Feb-19 at 21:23You can consider adding the {lwgeom}
package in Suggests field of your package DESCRIPTION file. It should do the trick.
QUESTION
I need to read a few files from the same folder but with different file names. Is there a more elegant way to do this?
...ANSWER
Answered 2021-Mar-01 at 09:00you can use dict
to store the dataframe, as the filename is the key.
QUESTION
Does anyone have a trick up there sleeve for downloading GTFS using R when the URL doesn't end with ".zip"? For instance, this works:
...ANSWER
Answered 2021-Feb-24 at 08:15Your link is probably a redirect. Try using the httr
package as described here R download file redirect error
QUESTION
Building off of this question, I'm using a Python script to call the API detailed in the link below:
https://developer.wmata.com/docs/services/gtfs/operations/5cdc51ea7a6be320cab064fe?
I use the code below to call the api:
...ANSWER
Answered 2021-Feb-15 at 15:52GTFS-rt is transported in a compressed encoded representation called a "protobuf." Your Python script will need to use the gtfs-realtime.proto
file (which contains a definition of the expected contents of the GTFS-rt feed) along with the Google Protobuf Python package in order to decode the response.
Here is an example of how to read a GTFS-rt API in Python from the documentation: https://developers.google.com/transit/gtfs-realtime/examples/python-sample.
QUESTION
I'm trying to use a Python script to call the API detailed in the link below:
https://developer.wmata.com/docs/services/gtfs/operations/5cdc51ea7a6be320cab064fe?
When I use the code below, it always returns a 404 error:
...ANSWER
Answered 2021-Feb-11 at 22:14Try changing your URL so that it is using https instead of http. The documentation that you have linked at Bus RT Trip Updates seems to indicate that https is required.
Change this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install GTFS
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page