u-shift / cyclingpotential-hack Goto Github PK
View Code? Open in Web Editor NEWCycling Potential Hackathon repo
Cycling Potential Hackathon repo
Just noticed this: https://github.com/U-Shift/cyclingpotential-hack/blob/master/reproducible-example.md
Do you get that message when running reproducible-example.R
@temospena ?
Should be an easy fix I think.
This is an open issue to discuss the "How cycling responds locally to different intervention types, e.g. based on cycle counter data".
Comments, approaches, and suggestions are welcome!
Running into an issue with the reproducible example (using R v3.6).
While package 'tmap' is successfully installed and unpacked, I'm not managing to get it loaded successfully:
install.packages("tmap")
"package ‘tmap’ successfully unpacked and MD5 sums checked"
library(tmap)
"Error: package or namespace load failed for ‘tmap’ in namespaceExport(ns, exports):
undefined exports: providers"
Tried to add 'dependencies = TRUE' to the install.packages command, but didn't solve the issue.
Is it okay to participate as a Python-user?
Note: I understand that it would likely imply:
This is an open issue to discuss the "Routing algorithms and routing services - hilliness integration?".
Comments, approaches, and suggestions are welcome!
Cyclists log their GPS routes on this sports tracking and social media website; Strava
Could it improve the quality of desire lines?
Could the data be used for a hack? Can it be extracted from Strava?
I do not know!
https://photos.app.goo.gl/zFWtJfohc2evpEgT8
https://www.strava.com/heatmap#12.88/-9.17607/38.73608/bluered/ride
The municipality-to-municipality OD data contains desire that are far apart. Reproducible example showing issues when using it to model cycling potential:
# from code/reproducible-example.R
remotes::install_github("itsleeds/pct")
#> Using github PAT from envvar GITHUB_PAT
#> Skipping install of 'pct' from a github remote, the SHA1 (63ee1f7e) has not changed since last install.
#> Use `force = TRUE` to force installation
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
u3 = "https://github.com/U-Shift/cyclingpotential-hack/releases/download/1.0/routes_integers_cs_balanced.geojson"
route_segments_balanced = sf::read_sf(u3)
routes_balanced = route_segments_balanced %>%
group_by(Origem, Destino) %>%
summarise(
Origem = first(Origem),
Destino = first(Destino),
Bike = mean(Bike),
All = mean(Bike) + mean(Car) + mean(Motorcycle) + mean(Transit) + mean(Walk) + mean(Other),
Length_balanced_m = sum(distances),
Hilliness_average = mean(gradient_segment),
Hilliness_90th_percentile = quantile(gradient_segment, probs = 0.9)
)
#> `summarise()` regrouping output by 'Origem' (override with `.groups` argument)
# %>%
# sf::st_cast("LINESTRING")
# how to make them linestrings (not multilinestrings) without duplicating every segment?
unique(sf::st_geometry_type(routes_balanced))
#> [1] MULTILINESTRING
#> 18 Levels: GEOMETRY POINT LINESTRING POLYGON MULTIPOINT ... TRIANGLE
nrow(routes_balanced)
#> [1] 46
routes_balanced$pcycle_current = routes_balanced$Bike / routes_balanced$All
plot(routes_balanced["pcycle_current"])
m1 = lm(pcycle_current ~ Length_balanced_m, data = routes_balanced)
m2 = lm(pcycle_current ~ Length_balanced_m, data = routes_balanced, weights = All)
m3 = lm(pcycle_current ~ Length_balanced_m + Hilliness_average, data = routes_balanced)
m_pct = pct::model_pcycle_pct_2020(
pcycle = routes_balanced$pcycle_current,
distance = routes_balanced$Length_balanced_m,
# gradient = routes_balanced$Hilliness_average,
gradient = rep(1, nrow(routes_balanced)),
weights = routes_balanced$All
)
m_pct_govtarget_uk = pct::uptake_pct_govtarget_2020(
distance = routes_balanced$Length_balanced_m,
gradient = rep(1, nrow(routes_balanced))
)
#> Distance assumed in m, switching to km
plot(routes_balanced$Length_balanced_m, routes_balanced$pcycle_current, cex = routes_balanced$All / mean(routes_balanced$All), ylim = c(0, 0.1))
lines(routes_balanced$Length_balanced_m, m1$fitted.values)
lines(routes_balanced$Length_balanced_m, m2$fitted.values)
points(routes_balanced$Length_balanced_m, m3$fitted.values, col = "red")
points(routes_balanced$Length_balanced_m, m_pct$fitted.values, col = "green")
points(routes_balanced$Length_balanced_m, m_pct_govtarget_uk, col = "grey")
Created on 2020-08-24 by the reprex package (v0.3.0)
This is an open issue to discuss the "Use of counting points data".
Comments, approaches, and suggestions are welcome!
This is an open issue to discuss the "Minimum requirements for a PCT at any place".
Comments, approaches, and suggestions are welcome!
given potential cycling uptake in Lisbon, what are the energy/fuel/CO2 implications of a given shift to cycling?
This is an open issue to discuss the "Cycling uptake functions".
Comments, approaches, and suggestions are welcome!
Are the applicants expected (or allowed) to form a team prior to the day of the event?
Please briefly describe your problem and what output you expect. If you have a question, please don't use this form. Instead, ask on https://stackoverflow.com/ or https://community.rstudio.com/.
Please include a minimal reproducible example (AKA a reprex). If you've never heard of a reprex before, start by reading https://www.tidyverse.org/help/#reprex.
Brief description of the problem
# insert reprex here
This is an open issue to discuss the "Estimating flow between Origins and Destinations using spatial interaction models".
Comments, approaches, and suggestions are welcome!
There don't seem to be many flows in od_data_final.csv, checking is this correct (i.e. it's just a test data set, doesn't contain real intra zonal flows)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.