Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function to get TFL traffic calming data from CID #2

Open
PublicHealthDataGeek opened this issue Jul 3, 2020 · 6 comments
Open

function to get TFL traffic calming data from CID #2

PublicHealthDataGeek opened this issue Jul 3, 2020 · 6 comments

Comments

@PublicHealthDataGeek
Copy link
Collaborator

ct has code

@layik
Copy link
Contributor

layik commented Sep 8, 2020

Hi @PublicHealthDataGeek! Can you elaborate in case I want to get a draft of this. "ct" stands for?

@PublicHealthDataGeek
Copy link
Collaborator Author

@layik actually the work is already done as part of an earlier package Robin I wrote https://github.com/PublicHealthDataGeek/CycleInfraLnd to extract TFL Cycling Infrastructure Database data. This was a placeholder to remind us to include it here.

The snippet from CycleInfraLnd is below with the type in this case being "traffic_calming" (the CID contains other data types too)

get_cid_points = function(type) {
base_url = "https://cycling.data.tfl.gov.uk/CyclingInfrastructure/data/points/"
cid_url = paste0(base_url, type, ".json")
sf::read_sf(cid_url)
}

so would the function be 'get_cid_trafficcalming' or similar depending on what you have named other functions.

ct stands for Caroline Tait!

@PublicHealthDataGeek
Copy link
Collaborator Author

Just noted that there is already a fucntion in safeactive for obtaining OSM traffic calming data:
traffic_calming_points = tc_get_osm(bbox = "chapeltown leeds")

the CID has different strengths and weaknesses compared to OSM. Perhaps this is more of a conceptual/strategic issue for @Robinlovelace to be involved in. would be a shame to not include the CID data which is 'official'.

@Robinlovelace
Copy link
Contributor

Yes we should include CID data and functions to ease getting it is my thinking. One question @PublicHealthDataGeek can we use your functions here? You could put in a PR to contribute them directly...

@layik
Copy link
Contributor

layik commented Sep 9, 2020

OK, now I know what "CT" stands for, happy to leave it for her.

@PublicHealthDataGeek
Copy link
Collaborator Author

Yes we can use my functions here. Might just need to think about naming of the function so that it differentiates it from the 'traffic_calming_points'. How about 'TFL_CID_traffic_calming_points'?

As mentioned on issue #15 I am happy to draft some code but might just need a hand to incorporate into package etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants