npct / pct-shiny Goto Github PK
View Code? Open in Web Editor NEWThe Shiny map for Local Authorites
License: GNU Affero General Public License v3.0
The Shiny map for Local Authorites
License: GNU Affero General Public License v3.0
@nikolai-b still having issues adding new towns. Sheffield, for example, seems to be down: http://geo8.webarch.net/pct-shiny/sheffield/ Works locally and I'm confident I've waited long enough for the new data to download...
Currently the shiny, it seems, is requesting updated data every time the user interacts with the map (e.g. panning/zooming). This causes the map to temporarily go grey. It also places a load on the server, in terms of CPU, bandwidth and maybe RAM.
The solution may be to set up shiny so it only requests new data when new data is needed, i.e. when one of the dropdown menus on the right is used. This could help with #16.
Pictures in help are wrong
Need to update boxes on map in line with help text
o E.g. Remove acronyms from interface (e.g. ‘SLC’) as they always appear with explanatory text – we’ll only want them in technical appendix
It was made static because it moved problematically when the sliders were moved.
But sometimes it's useful to move it - can we do this?
Maybe more useful and easier: allow the user to move the scale bar.
It’s not clear where a route goes from and to – would it be possible when one clicks on a route (to see distance, increase in cycling etc.) to highlight the whole route so you can see where it goes from and to.
In my experience when ~10 people connect to the tool at the same time it slows down.
Can we reproduce this? More importantly, can we monitor what is going on?
Hypothesis: it's a processor issue that is partly resolved by cb83e70
Each shiny instance seems to require ~100MB (please confirm @nikolai-b ) - I'll reduce this in data mkII.
For some reasons, the cycling flows don't appear when 'zone attribute' is set to 'none'. Please see the attached screenshot for it.
For the line going into UEA, it shows 477 commutes for olc/slc but 67 commutes for sic.
Pretty sure this is a bug - please confirm for other cities.
When I add zones on master all is fine.
Yet zoom out and zoom into Leeds and they disappear:
Any ideas @nikolai-b ?
I don't know if it is intentional or not, but I was trying to compare the values of the legend with the zone popup and found an anomaly. It seems the zone popups only show the baseline zone attribute values - don't change according to the selected scenario.
You can see the code here:
https://github.com/npct/pct-shiny/blob/master/master/pct-shiny-funs.R#L59
This, of course, makes the legend having different values than the popup values.
As people are now accessing the tool there must be a danger someone starts thinking they can use the results. So I think we need a health warning that this is a prototype under development and not all the data is intended to be correct. Do not use!
Legend needs to be labelled as ‘Zone Attribute Legend’
Area numbers are wrong (2 orders of magnitude) in interface
flows currently making it crash
even without flows it shows error message where legend was.
I need to show this to people at conference tomorrow so please fix asap.
Does it work for Coventry any better? I cant see Coventry only Manchester
http://geo8.webarch.net/master/
ERROR: there is no package called 'shinyjs'
The amount of clutter on the map should be kept to a minimum and I think the new popup information added by 155d276 . @usr110 is there a way to display the information more discretely, in a way that does not consume precious map space? I'm with Nikolai in thinking we need to keep the interface really clean. I would be happy if this were moved into the help.
I just stupidly wondered why lines not changing whilst playing with zone attribute- others may also be so stupid! I suggest we simplify and have only one set of options that covers both zones & lines- usually you would want to see both.
James
Zone information in popup – suggest including modelled level and increase. Could always bold the displayed attribute to remind the user what they have currently select.
Suggest stop using acronyms as we are spelling them out more than we are using the acronym.
With the closure of #9 we've removed a superfluous option: to show LSOAs.
However it's also removed a useful option: to show no zones.
The plan was to re-add this option in the 'zone attribute' menu:
" Instead have option 'none' under zone attribute."
Should be an easy addition, that will enable people to focus on the map rather than the colourful zones.
We can set the basemap to anything listed here and probably more:
http://leaflet-extras.github.io/leaflet-providers/preview/index.html
Specifically, I think the OpenCycleMap image could be of use in some cases. This can be added by: 'http://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png'
.
Is there a way to allow the user to switch the base map 'live', like this?
Can we track how many people are using the tool? Server-side sys. admin job so may be off-topic.
Can we please make the colour bins scale to the quartiles? Currently there are only a couple of zones in the 'greenest' bins in my updated colourscheme: http://geo8.webarch.net/pct-shiny/manchester/ Ideally we need to have quantile bins as explained here: http://www.ncgia.ucsb.edu/cctp/units/unit47/html/comp_class.html
Rename 'fastest and quietest' as 'direct and quieter'.
Above 'direct and quieter' add 'direct'- this would just show the direct routes (previously fastest)
they seem to work intermittently
The map needs a legend and brief description of use. @usr110 were you working on this? Please add the popup if so! Thanks.
Under the Zone Attribute, when a user selects, "Extra Potential Cycle (ECP)", an error appears:
ERROR: color intensity NA, not in 0:255
When I select the 'lines' option, and get those extra options, I lose the ability to change the 'zone attributes' type to be 'extra cycling potential'.
A solution would be to remove the 'additional features' option and 'type of zone' options, and to add a 'none' option to the 'zone attributes' (i.e. equivalent to seeing no MSOA outcomes).
hi
i like the comments but for zone attribute it is too wordy and I think includes a superfluous word- "Alters to colours", should it just say "Alters colours"?
/pct-shiny/bolton/ is working locally and the data has been added.
But it's crashing on geo8 - try reproducing this.
@nikolai-b a reason to update the code to download the data I think.
Using git pull could be an alternative to downloading the whole zip - more efficient when we're uploading new cities one by one...
Suggest change to: "Cycling Flows"
We need some acknowledgements and branding on the interface- probably another tab.
It should acknowledge the DfT project, the NPCT academic team, & then specific work
please can we have
Robin - I think this what we agreed - please say if not
j.
"the application unexpectedly exited"
The latest version of the tool seems to be down again @nikolai-b
http://geo8.webarch.net/pct-shiny/master/
I think this will be fixed by dd4bcc8
I've not pushed this to production - may need a server restart.
No not my hair but when I leave it open for a minute or two it sort of greys out and you can see it but not so well. Could be my pc setting.
Also to remind people there is user testing tomorrow so please be careful not to break anything :)
These are not currently accurate and not necessarily the ones we would choose.
Perhaps we could have a dummy heading in labelled health benefits & carbon savings- as these will be needed?
@nikolai-b just about to test it and it's not working...
Any chance you could debug this.
Apologies.
Robin
@nikolai-b this issue still seems to be present, maybe since my commit whereby width is proportional to attributes.
Is this a bug in rstudio/leaflet?
If so, can we put in a bug report and look at a fix?
If not, can we implement it?
I am not sure you guys are receiving this error or not. Once you start the application (say from the master folder), it shows you Manchester's map. Once you navigate to some other LA (say Sheffield), and its map gets loaded, after that you can't change LA any more. I receive this error:
Warning in run(timeoutMs) :
Unhandled error in observer: missing value where TRUE/FALSE needed
observe({
LA <- findLA()
dataDir <- file.path("..", "pct-data", LA)
if (session$dataDir != dataDir && !is.null(LA) && file.exists(dataDir)) {
session$dataDir <- dataDir
loadData(session)
updateSelectInput(session, "scenario", selected = "base")
}
session$dataDir
})
Does it appear on your end too?
rror in gzfile(file, "rb") : cannot open the connection
Warning in run(timeoutMs) :
cannot open compressed file 'pct-data/manchester/l.Rds', probable reason 'No such file or directory'
Remove type of zones. Instead have option 'none' under zone attribute.
Rename Zone attribute to 'Cycling metric' - it if it is a route based measure it is not actually a zone anyway.
I receive this error when Gender Equality scenario is loaded:
ERROR: color intensity NA, not in 0:255
Getting this error in my local version - any ideas?
Warning in run(timeoutMs) :
Unhandled error in observer: Geographical CRS Warning in run(timeoutMs) :
Unhandled error in observer: Geographical CRS given to non-conformant data: -594.84375 590.62500
observe({
LA <- findLA()
dataDir <- file.path("..", "pct-data", LA)
if (input$advanced)
updateSelectInput(session, "zone_attr", label = "Flow Attribute",
choices = attrsZone)
else updateSelectInput(session, "zone_attr", label = "Attribute to display",
choices = attrsLine)
if (!is.null(helper$scenarioWas)) {
updateSelectInput(session, "scenario", selected = helper$scenarioWas)
helper$scenarioWas <<- NULL
}
if (helper$dataDir != dataDir && !is.null(LA) && file.exists(dataDir)) {
helper$dataDir <<- dataDir
helper$scenarioWas <<- input$scenario
helper <<- loadData(helper)
if (input$freeze)
updateCheckboxInput(session, "freeze", value = F)
if (input$scenario != "olc")
updateSelectInput(session, "scenario", selected = "olc")
else updateSelectInput(s [... truncated]given to non-conformant data: -594.84375 590.62500
observe({
LA <- findLA()
dataDir <- file.path("..", "pct-data", LA)
if (input$advanced)
updateSelectInput(session, "zone_attr", label = "Flow Attribute",
choices = attrsZone)
else updateSelectInput(session, "zone_attr", label = "Attribute to display",
choices = attrsLine)
if (!is.null(helper$scenarioWas)) {
updateSelectInput(session, "scenario", selected = helper$scenarioWas)
helper$scenarioWas <<- NULL
}
if (helper$dataDir != dataDir && !is.null(LA) && file.exists(dataDir)) {
helper$dataDir <<- dataDir
helper$scenarioWas <<- input$scenario
helper <<- loadData(helper)
if (input$freeze)
updateCheckboxInput(session, "freeze", value = F)
if (input$scenario != "olc")
updateSelectInput(session, "scenario", selected = "olc")
else updateSelectInput(s [... truncated]
should be self-explanatory
hi
at the moment it seems that we see the same lines which ever is on ECP, PCP or CPC- although the data for the lines does change.
james
I noticed this was given in feedback so wanted it sorted before Friday (just needs to be added to the end of this line )
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.