Skip to content
This repository has been archived by the owner on Mar 25, 2019. It is now read-only.

feat: DSC changes #15

Closed
wants to merge 1 commit into from
Closed

feat: DSC changes #15

wants to merge 1 commit into from

Conversation

mshodge
Copy link

@mshodge mshodge commented Sep 4, 2018

Changes from the Data Science Campus, including:

  • refactoring code, e.g. paste0
  • including more API parameters (defaults given too)
  • original otpTripTime function gives next available trip even if it’s several hours away, to avoid this we include a new parameter called preWaitTime (default 60 minutes). No result is given if start of journey is more than the preWaitTime from the desired start time. This is important for journeys using transit data, when considering accessibility over time. This should be implemented into other functions too in the future (i.e. the isochrone function).
  • otpTripTime function outputs now include detailed trip table and a poly line file that can be used in leaflet (note: this is from point to point and does not follow road layouts).
  • otpChloropleth included as a light version of the otpTripTime function so multiple origins to destinations can be called faster than using the modified otpTripTime function.
  • otpIsochrone functions cutoff parameter altered so that an array can be passed in of any length and the result returned. This prevents limiting cutoffs to a specific number.

We have tested this on our own unit tests and each function passed:

file test nb failed skipped error warning user system real
1 test_GTFS.R Test GTFS 1 0 FALSE FALSE 0 0.181 0.021 0.756
2 test_otpChoropleth.R Test otpChoropleth 1 0 FALSE FALSE 0 0.080 0.005 0.213
3 test_otpConnect.R Test otpConnect 1 0 FALSE FALSE 0 0.001 0.000 0.002
4 test_otpIsochrone.R Test otpIsochrone 1 0 FALSE FALSE 0 2.202 0.181 8.984
5 test_otpTripDistance.R Test otpTripDistance 1 0 FALSE FALSE 0 0.024 0.000 0.085
6 test_otpTripTime.R Test otpTriptime 1 0 FALSE FALSE 0 0.017 0.000 0.095

These changes were made to develop a series of R scripts for certain tasks required at the Data Science Campus. If the changes are not passable (rejected) please allow us to use your original code with acknowledgements. If the changes are accepted, we will import the package into our work (again, with acknowledgements).

@marcusyoung
Copy link
Owner

marcusyoung commented Sep 12, 2018

@mshodge Thanks very much for the pull request and interest in the project. Because your changes are on the old R script that I originally wrote for my research, I won't accept the pull request. We now have functions being written within the R package structure. There should be a commit fairly soon with a range of those functions (including, for example, one that also returns route geometry). What I will do is review the work you have done and incorporate your suggestions into the relevant functions as appropriate. I have no problem with you using my original code in the meantime. Once again, thanks for the useful input.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants