Comments (5)
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.
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.
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.
I believe this is fixed by PR #9
from gtfsr.
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)
- Add package level manual
- read_gtfs will delete invalid gtfs zip files. HOT 1
- Add more examples throughout package
- New format maybe worth knowing HOT 1
- Added overlays for stops and routes HOT 1
- add docs for os-specific setup? HOT 4
- Calculating distance of each trip_id and shape_id HOT 24
- Dealing with irregular, unrecognised GTFS files HOT 4
- GTFS Realtime HOT 4
- summarise_each deprecated HOT 1
- Update for newer version of R HOT 2
- Can't build vignettes HOT 11
- cran release HOT 5
- separate validation, joining, and mapping? HOT 4
- Add names of recent contributors to description HOT 3
- consider breaking off pieces of the package that make maintenance and CRAN submission harder HOT 7
- trouble installing on windows and rstudio.cloud HOT 1
- API key HOT 2
- Is this package still maintained? HOT 3
- New Maintainer Wanted :-) HOT 4
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 gtfsr.