Closed dblodgett-usgs closed 8 years ago
Add the function to allow the mouse hover to get the area name (i.e. county) and data element value on the choropleth maps. Let me know if you want me to move this to a different issue.
I did add a hover to the map. It's not super great, but it seems to work most of the time.
@rwdudley-usgs and @jshourds-usgs and @cadieter-usgs and @mamaupin-usgs Why don't you guys start by using this GitHub issues to log the bugs that appear in the latest version of the shiny app. Don't add requested new features (you can create new issues for that). When we have a few issues, I'll try to help @rwdudley-usgs walk through the first batch of troubleshooting. Then he should be able to go from there.
Hi @ldecicco-USGS I'm back from vacation. I'm probably missing some items but right now I identify the following Shiny-related tasks:
Others? I have yet to review the Shiny code; I may need a tutorial...
I'd start by playing around with the app itself (not necessarily try to dig into the code immediately). Like, if you have different water use data sets, try those all out. When we do find a few issues, we can get a web ex set up to sort out what all is going on....
Will do.
I restructured the app a bit. Now, each tab has it's own file. @rwdudley-usgs , I think you could copy the file "inst/plotMultiElem.R", and try to make a new one for the new box plot function. Then on the ui.R file, you'll need to add a new tab. Copy the multiElement tab here:
https://github.com/USGS-R/wateRuse/blob/master/inst/shiny/ui.R#L59
So copy this part:
tabPanel(title = tagList("Multi-Elements",shiny::icon("bar-chart")),
value = "multiElem",
fluidRow(
column(9,
plotOutput("plotMultiElem",width = 500, height = 500))
),
h4(""),
fluidRow(
column(3, downloadButton('downloadPlotmultiElem', 'Download PNG')),
column(3, downloadButton('downloadPlotmultiElemPDF', 'Download PDF')),
column(3, downloadButton('downloadPlotmultiElemData', 'Download Data'))
),
h4("R Code:"),
verbatimTextOutput("plotMultiElemCode")
),
Change all the id's to something about boxplots. Give it a little try, and if you get confused, let me know.
Ok, I'll give it a go! I've been doing some testing and have discovered some Shiny bugs/features I'll post in a bit.
Sounds good. Make sure to pull from upstream first!
Shiny bugs (or features) for the first three functions (testing in Chrome browser). I have yet to methodically test the other functions. The first couple items common to all three I checked might not be considered bugs - common theme is lack of persistence of selections that users might expect. For example, for the first item below, one might choose PS.SWPop for one state, then switching to look at another state, the data.element changes to PS.GWPop instead of remaining PS.SWPop.
data.elements
in Compare Two Years (or data.elements.x.y[1]
in Compare Two Elements or data.elements[1]
in Multi-Elements) changes when (de)selecting Choose States; seems to revert to first of its element typeareas
selected in Choose Areas change when switching between STATECOUNTYCODE and COUNTYNAME or when (de)selecting Choose States data.elements.x.y[2]
, user can't select any other element other than the first in the list; immediately reverts upon selection data.elements[2]
, user can't select any other element other than the first in the list; immediately reverts upon selection I edited your comment so I could respond...
Ha, nevermind! I do now see 4 and 5...I think I can fix that pretty quick.
3, 4, and 5 should be OK now. 1 and 2 in my opinion are not worth the effort, but if it's a big deal...we can work on it.
Great! Thanks. I also think 1 and 2 are not a big deal.
In the Multi-Elements graph, when you pick the second Data Element Type y/Data Element y, it only wants to use the first entry on the Data Element y: pick list: (No mater what you pick, it reverts to the first item on the list.) This seems to be the same issue as number 4 above.
Unable to deselect areas (graph remains same). Choose Areas/Click Here to Select Areas/Deselect All/
The Select All and Deselect All won't work until you then click the "Click Here to Switch Areas". This is because when I had it doing it on the fly for bigger data sets (lots of "areas" be it counties, aquifers, HUCs), the app would go a little crazy trying to switch areas too fast (if the user clicked the buttons too fast, the previous calculations were still going on, then the code would get all confused and freeze up).
@grrmartin-USGS I think if you do another pull from upstream, the select issue you mentioned is fixed:
git pull upstream master
So this is pretty picky but when uploading the regional dump file and playing around in shiny, is there any way we can list states in alphabetical order? I think selecting state would be easier that way. No offense to Wisc which shows up first... ;-) I checked the indiv dump files and they are listed in alphabetical order so I'm not sure how this comes about. Thanks!
Sort of the same as above, when choosing the years to plot they should be in order, either newest to oldest or oldest to newest available. We may not be at this nitpicky stage yet so this can serve as a placeholder.
I just merged a pull request that I think should order the states and years a bit better (or worse, if you like WI on top...)
Yay-- looks fabulous! Thank you @ldecicco-USGS ! And not to worry, WV and WY are the very bottom of the barrel!
I'm going to close this Issue. If new bugs come up, make a new Issue for the specific bugs, and assign to @rwdudley-usgs
@ldecicco-USGS, @cadieter-usgs, and @mamaupin-usgs will enumerate and pass off to others.
@rwdudley-usgs will lead, @jshourds-usgs will review.