Coder Social home page Coder Social logo

cyclingpotential-hack's Introduction

Cycling Potential Hackathon: Lisbon

Welcome to the Cycling Potential Hackathon, Lisbon (CPHL), on reproducible methods for estimating cycling potential, based on a case study of Lisbon, Portugal.

This GitHub repo contains everything needed to get started with modelling cycling potential, including example data and reproducible code.

Interested in getting involved? Here’s some key information that will help decide if this is for you and register to participate if so!

Who?

The hackathon is organised by Rosa Felix of the University of Lisbon and Robin Lovelace of the University of Leeds, who were awarded funding from the Portuguese Association of Researchers and Students in the United Kingdom’s Bilateral Research Fund (PARSUK BRF) to develop a ‘PCT Portugal’ project building on methods used to develop the Propensity to Cycle Tool (PCT), which is based on open source software.

Attendees are expected to have knowledge of transport planning interventions to enable cycling uptake and/or technical skills needed to analyse, interactively visualise and develop scenarios of cycling uptake. Experience with the statistical programming language R will be particularly useful, although anyone with experience of front-end or back-end development with open source software will be very welcome. Working knowledge of GitHub is highly recommended for collaboration during the hackathon. Here is a tutorial example to get familiarized with GitHub.

What?

A one day participatory code-focussed hackathon. The morning will be dedicated to getting up-to-speed with the input data. The afternoon will be dedicated to the hackathon!

When?

Friday 25th September, 2020, 10:00 to 16:00 (London/Lisbon time, UTC+1).

See Ical file here.

Where?

Online, we will send a conference link to participants.

Why?

There is a great need for transparent and actionable evidence to support investment in sustainable transport futures, and cycling uptake in particular.

Before signing-up

Please take a read of the information below and take a look at (and ideal test) the following resources:

  • exercises in the PCT Training course
  • Geocomputation with R online book, especially Chapter 12 on transport data
  • Papers on the PCT: Lovelace et al. (2017) and Goodman et al. (2019)
  • Lisbon cycling potential and bike network analysis: Abad and Van der Meer (2018 - paper); Abad and Van der Meer (2018
    • presentation)
  • Test out the PCT at https://www.pct.bike/

If you plan to use R to develop solutions, please ensure you can reproduce the results of the code shown here: reproducible-example.R. If your output looks like this congratualtions 🎉🎉 you have the necessary packages installed.

Agenda

  • Introduction to the hackathon: 10:00 - 10:40 (Rosa Felix and Robin Lovelace)
  • Participant introductions: 10:40 - 10:45 (participants)
  • Talks: methods for modelling cycling networks: 10:45 - 11:15 (Crispin Cooper and Lorena Abad)
    • Check Lorena’s presentation and data here
  • Live, interactive demo of data and hack rules: 11:15 - 11:45 (Rosa and Robin)
  • Topic pitches 11:45 - 12:00 (participants proposing topics)

Lunch break and finalising teams 12:00 to 13:00

  • Hackathon 13:00 - 15:30
  • Presentation of results 15:30 - 16:00

Input datasets

Initial datasets, .geojson

  1. Desire lines between cities
  2. Cycling routes from cyclestreets.net
    • Fastest
    • Balanced
    • Quietest
  3. Bike counts data
  4. Digital Elevation Model for Lisbon area (10m)

Go to Releases

Topics

We have developed ideas for a few hack topics:

  • Cycling uptake functions
  • Estimating flow between Origins and Destinations using spatial interaction models
  • Routing algorithms and routing services - hilliness integration?
  • Use of counting points data
  • Minimum requirements for a PCT at any place
  • How cycling responds locally to different intervention types, e.g. based on cycle counter data

Any further ideas very welcome, feel free to bring your own!

How to sign up

To sign-up complete this application form.

Any questions?

Feel free to ask any questions related to this hackathon on the issue tracker.

Code of Conduct

Please note that the cyclingpotential-hack project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

cyclingpotential-hack's People

Contributors

filmoura avatar jamesjhdixon avatar loreabad6 avatar robinlovelace avatar temospena avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cyclingpotential-hack's Issues

Team-making procedure

Are the applicants expected (or allowed) to form a team prior to the day of the event?

Cycling uptake functions

This is an open issue to discuss the "Cycling uptake functions".

Comments, approaches, and suggestions are welcome!

Reproducible example issue tmap

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.

Possible to participate using Python?

Is it okay to participate as a Python-user?

Note: I understand that it would likely imply:

  • having to be able to transpose the learning from the materials to the Pythons setup,
  • not getting any Python-related support from the organizers

Use of counting points data

This is an open issue to discuss the "Use of counting points data".
Comments, approaches, and suggestions are welcome!

OD data count values

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)?

Add synthetic dataset at district level

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)

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.