npct / pct-scripts Goto Github PK
View Code? Open in Web Editor NEWScripts for creating PCT national & regional outputs
License: GNU Affero General Public License v3.0
Scripts for creating PCT national & regional outputs
License: GNU Affero General Public License v3.0
@Robinlovelace any idea where avslope comes from?
> source(file.path("components", "models", "aggregate.R")) # this model creates the variable 'slc'
Error in eval(expr, envir, enclos) : object 'avslope' not found
Could we please have 10% of vertices shown for the Kent region route network - http://geo8.webarch.net/kent/ - rather than 5%, to provide more realism on the routes shown? We will then test this with the stakeholders at a meeting we have there in mid Feb. Thanks :)
This feature has been requested by a number of users
This was agreed by others - sorry @nikolai-b
Explore adding Dutch multiplier
Just generated rnet for http://geo8.webarch.net/gm and it's seeming pretty slow to load.
Even after simplifying to only 5% of its vertices with stplanr::mapshpe()
it still seems slow to load - at 50% of the network this is what it looks like:
Given that the overline()
commands are by far the slowest in load.Rmd
I'm thinking we should simplify directly after generating rf
and rq
, perhaps using snap
and precision
from the mapshaper JavaScript library: https://github.com/mbloch/mapshaper/wiki/Command-Reference
I'd appreciate your thoughts @nikolai-b and @usr110 before proceeding with this - what are your thoughts?
The aim here is to get a high % (around 95%) of cyclable trips.
Thanks Anna for the suggestion.
Anna to revisit method for developing scenarios, inc ebikes, and agree with robin - Robin then to implement in R.
All flows with euclidean distance <30km to contribute to area-level estimates of cycling scenarios - this can be pre-calculated.
This will greatly increase region build times and remove the dependency on the CycleStreets.net API via stplanr::line2route()
This is a 'for the future' idea that could make the code more robust.
Definitely not a priority in the near term.
Robin
assertr home page: https://github.com/tonyfischetti/assertr
Comments: ropensci/software-review#23 (comment)
There should be a Combined Authority for the North East. This covers Northumberland, County Durham and Tyne and Wear.
Where available add GB traffic data to Rnet (this comes with lat long).
Seems to be commonly requested. Not a priority.
@Robinlovelace / @usr110 / @nikolai-b , can anyone fix this if statement in rmd for me? almost but not quite working....
in https://github.com/npct/pct-scripts/blob/master/commute/msoa/region_stats.Rmd, line 67. First if works fine, second doesn't as I can;t work out how to embed an R number. code not working is:
r if(region_build_param$mingodutch_rnet!=0){paste0("In the online version of the clickable route network we only present route segments that contain at least",
r region_build_param$mingodutch_rnet cyclists, " in the Go Dutch scenario. The downloads include all route segments."}
Add car count to Rnet (to give two factors).
Robin tells me the API key has been disabled due to maintenance, do we know when it will be working again?
@mattturner86 has illustrated that this works and generates interesting and potentially useful results.
when one runs route network then crossing the Mersey comes out comes out as important straight away (e.g. 2% of route network) but when doing flows from OD pairs then even on 100 it does not register- of course it is a concentration point for flows so maybe this is right but it seems too extreme.
This also happened in Kent for half of rnet - both times when building on Windows - present in data committed here: Robinlovelace/pct-data@0369a18
See vis below of this weird bug.
The idea is to implement the HEAT model in npct (http://www.euro.who.int/__data/assets/pdf_file/0010/256168/ECONOMIC-ASSESSMENT-OF-TRANSPORT-INFRASTRUCTURE-AND-POLICIES.pdf?ua=1).
3 main steps:
To reproduce, click on fastest and quietest routes in a region (tested on Shropshire).
rq is totally different from rf and l:
Can you take a look @nikolai-b , @usr110 or @audev?
Can someone merge this pull request and close this issue?
#12
Testing new PR-based work flow
@Robinlovelace I'm getting this error from Line 2226
Error in rf$length : object of type 'closure' is not subsettable
Calls: <Anonymous> ... handle -> withCallingHandlers -> withVisible -> eval -> eval
In addition: Warning message:
In RGEOSBinPredFunc(spgeom1, spgeom2, byid, func) :
spgeom1 and spgeom2 have different proj4 strings
Execution halted
please update to the new less precise lines
I've just been reading another option for storing data that has some advantages: http://richfitz.github.io/datastorr/vignettes/datastorr.html
Any thoughts on this approach @nikolai-b?
While trying to rebuild the routes, I'm getting lots of fails because packages are not installed.
In theory set-up.R should list all the packages, but clearly it does not so I'm going to list them here as they fail, so that we can produce a better list.
The gov target scenario is coming out wrong, it seems never to be more than baseline and sometimes less - while should always be at least equal to baseline no. cyclists.
The IDs have changed to numbers, canthey go back to geocodes
This involves running the updated version of this for all regions (probably with data checking in there too):
https://github.com/npct/pct-load/blob/master/model_output.Rmd
In the model output for Liverpool there are many Warning in value[[3L]](cond): Fail for line number 1
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.