Giter Site home page Giter Site logo

Comments (5)

dantonnoriega avatar dantonnoriega commented on June 18, 2024

Great catch. agency_name is required but not agency_id --- which is different for other ID vars (like stop_id).

I'll change it to be so that it depends on agency_name.

from gtfsr.

dantonnoriega avatar dantonnoriega commented on June 18, 2024

OK! The input is now agency_name values. I still need to input some checks but it should be working. Note that the default is agency = NULL for the map_gtfs_agency_routes which means the function assumes there is only one agency and takes the first observe agency_name by default.

Here is a gist for plotting CTA using the version I just pushed.

Let me know if it works and I'll close the issue.

from gtfsr.

murcoil avatar murcoil commented on June 18, 2024

Still wasn't doing it for me--map_gtfs_agency_routes is choking on checking for a null value of agency_id rather than existence of the variable. I think I might have fixed it, if you take pull requests.

from gtfsr.

murcoil avatar murcoil commented on June 18, 2024

I believe this is fixed by PR #9

from gtfsr.

murcoil avatar murcoil commented on June 18, 2024

Thanks for catching names(), my mistake. Your new commit works for me.

With the is.null() test I was still getting an error when the agency_id variable did not exist. My understanding of is.null() is that is looks at whether the content of the variable is null, but it assumes the variable exists.

`> "route_id" %in% names(gtfs_obj$routes_df) #variable exists
[1] TRUE

"agency_id" %in% names(gtfs_obj$routes_df) #variable doesn't exist
[1] FALSE
is.null(gtfs_obj$routes_df$route_id)
[1] FALSE
is.null(gtfs_obj$routes_df$agency_id)
Error: Unknown column 'agency_id'
`

from gtfsr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.