Bus routes in the Helsinki metropolitan area: Difference between revisions
Jump to navigation
Jump to search
(data extraction explained) |
m (→Rationale) |
||
(One intermediate revision by the same user not shown) | |||
Line 14: | Line 14: | ||
See [[Composite traffic]] and [[File:Composite traffic.ANA]]. | See [[Composite traffic]] and [[File:Composite traffic.ANA]]. | ||
Data was exported from the | Data was exported from the "All_bus_routes" node in Analytica and transformed using the following R code. | ||
<nowiki>bus.routes <- read.table("M:/Composite traffic/Bus_routes.txt", fill = TRUE, sep = "\t") | <nowiki>bus.routes <- read.table("M:/Composite traffic/Bus_routes.txt", fill = TRUE, sep = "\t") | ||
Line 28: | Line 28: | ||
==See also== | ==See also== | ||
*[[Composite traffic]] | |||
*[[File:Composite traffic.ANA]] | |||
==Keywords== | ==Keywords== |
Latest revision as of 10:08, 19 August 2011
Moderator:Nobody (see all) Click here to sign up. |
This page is a stub. You may improve it into a full page. |
Upload data
|
Question
What are the routes of bus-lines running in the Helsinki metropolitan area?
Answer
{{#opasnet_base_link:Op_en5336}}
Rationale
See Composite traffic and File:Composite traffic.ANA.
Data was exported from the "All_bus_routes" node in Analytica and transformed using the following R code.
bus.routes <- read.table("M:/Composite traffic/Bus_routes.txt", fill = TRUE, sep = "\t") temp <- strsplit(as.character(bus.routes[4:nrow(bus.routes),2]), ",") bus.routes <- data.frame(bus.routes[rep(4:nrow(bus.routes), sapply(temp, length)), c(1,3)], unlist(temp)) colnames(bus.routes) <- c("Route_id", "Time_id", "Result") bus.routes$Route_order <- 1 while(nrow(bus.routes[duplicated(bus.routes[,c("Route_id", "Time_id", "Route_order")]),]) > 0) { bus.routes$Route_order <- ifelse(duplicated(bus.routes[,c("Route_id", "Time_id", "Route_order")]), bus.routes$Route_order + 1, bus.routes$Route_order) }
See also
Keywords
References
Related files
<mfanonymousfilelist></mfanonymousfilelist>