marcusyoung / opentripplanner

An API wrapper for OpenTripPlanner (OTP) as an R package
11 stars 5 forks source link

Create Package #1

Closed mem48 closed 6 years ago

mem48 commented 6 years ago

Some basic package structure and a function to return SF objects from routes

mem48 commented 6 years ago

@marcusyoung

To address your points

  1. Yes you are right
  2. Ok, I removed the function because it didn't seem very useful, however now you've explained it seems more necessary
  3. This I think is a stylistic decision, we could have one mega function with parameters that dictate what you pull back, or many similar functions that pre-select certain variables. I'm not sure it will save any bandwidth because your functions retrieve the same json file mine does, but I've put more code into transforming and processing the json which will add processing time at the R side.

Perhaps we need a outline list of functions and then we can decide what goes where.

marcusyoung commented 6 years ago

@mem48

You may have seen that I've got a pull request for the otp_connect function to get feedback. I don't think you've accepted the invite to be a collaborator, so I've not been able to invite you to review?

I've now put a list of proposed functions in the issues. As you'll see I've suggested separate functions to perform specific tasks. I wonder if that will be easier for users to understand and implement then a mega function where there would be a substantially greater initial learning curve? This approach may also be more manageable from a development and bug-fixing point of view? But open to discussion on this.

Take your point on the bandwidth, as the same json file is being pulled.