Comments (5)
This is indeed a great function, immensly useful!
I'd like to add some thoughts on this, currently gtfs_isochrones
returns a data frame like this
stop_name stop_lon stop_lat in_isochrone
1 Four 7.42447 46.96878 TRUE
2 Two 7.39899 46.96230 TRUE
3 One 7.39072 46.95961 TRUE
5 Three 7.40838 46.96347 FALSE
6 Three 7.40839 46.96348 FALSE
I guess the travel time to each stop is already calculated within this function? Could that be returned as well?
I'd suggest that gtfs_isochrones
only returns a data frame with stop_id
s and the corresponding travel_time
s (or two additional cols with departure and arrival time). That's the most basic result that you can work with. To see which stops are in the isochrone, a simple filter/join can be applied. Or if you need the stop coordinates run inner_join(isochrone_table, gtfs$stops, by="stop_id")
or sth. like that.
Another note on stop_id vs. stop_name: I figure it's a deliberate decision to only use stop_names on the lowest api level? That's more user friendly since travel times can be aggregatetd meaningfully (nobody cares what the exact arrival time for every platform of a station is). But again, I think aggregating data afterwards (i.e. stop_ids to parent_stations or stop_names) is easier than splitting up combined data you got.
from gtfsrouter.
Re-opened to get rid of need to specify start_time
. Instead, this function should analyse all isochrones from a given station through the day, and have an option for type of isochrone:
- "min" = smallest isochrone reachable throughout the day;
- "max" = largest ..;
- "mode" (default) = Station reached on a given route more than any other during the day.
There should also be a - doneday
parameter implemented as for gtfs_route()
.
from gtfsrouter.
@mpadge love this idea
from gtfsrouter.
Great that you're already using it. I also implemented a plot method - just try plot
with the result. (And yes, there are some errors, so the isochrone isn't always correct yet, but I'm working on that). Oh, and the plot method is the reason why all stations are returned, because plotting those gives a useful context to the isochrone, and the only way to implement generic plot
method is to have all data in the returned object. (This might change with caching as per #7 , but unsure at this point.)
from gtfsrouter.
The above commit adds the structure to calculate all isochrones throughout the day, but i'm not sure it'll be useful in practice - it's very slow on a real data set. The amount of calculation involved is enormous... Not sure what to do about that?
from gtfsrouter.
Related Issues (20)
- no results when calculating gtfs_traveltimes() HOT 2
- SVG version of the logo HOT 8
- Allow start times to be vector of times for each station HOT 1
- Bug in traveltimes algorithm HOT 1
- Update documentation to include example for gtfs_route with (lon, lat) please HOT 3
- Move atfutures -> UrbanAnalyst
- Proportion of trips on different route_types HOT 4
- rcpp_csa | Not compatible with requested type HOT 3
- Reduce ratios of user / elapsed times in examples HOT 2
- Fix pkg man entry
- CRAN UBSAN issues
- CRAN re-submit HOT 2
- pkgcheck results - main HOT 8
- Alternative approach to build a transfer table HOT 8
- Using gtfs_traveltimes for many-to-many calculations HOT 6
- gtfs_traveltimes bug when setting max_traveltime HOT 5
- Feature Request: Multiple possible routes per trip HOT 2
- Issues with gtfs_transfer_table() when running on MacOS HOT 3
- gtfs_route randomly crashes the session HOT 2
- gtfs_traveltimes output HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gtfsrouter.