USGS-R / wateRuse

Moved to: https://code.usgs.gov/water/water-use/wateruse
https://code.usgs.gov/water/water-use/wateruse
Creative Commons Zero v1.0 Universal
7 stars 11 forks source link

Rank data elements #6

Closed ldecicco-USGS closed 8 years ago

ldecicco-USGS commented 8 years ago

We want to be able to see areas (county/HUC/aquifer/state) values ranked for data elements that we can pick from a picklist, for all available years.

QAQC would include pairing two ranked lists for the same element between 2 or more years to see how areas have shifted between years. For example, total public supply by county between 2010 and 2015.

ldecicco-USGS commented 8 years ago
df <- data.frame(
  county = c("A","B","C"),
  pop_2010 = c(2,3,4),
  pop_2015 = c(4,3,2),
  stringsAsFactors = FALSE
)

library(dplyr)

sortDF <- arrange(df, desc(pop_2015))
ldecicco-USGS commented 8 years ago

Need a lookup table to convert element to category (sheet tab names)

ldecicco-USGS commented 8 years ago

After discussion, we want the argument to just be the path to the files, the file names must use the default AWUDS output.

So that means, we need:

jshourds-usgs commented 8 years ago

Default output filenames from AWUDS are: Export_2010, New Jersey_County.xlsx Export_2016, New Jersey_HUC - 8.xlsx

dblodgett-usgs commented 8 years ago

@ldecicco-USGS This should also be done based on work completed in #63 ?

dblodgett-usgs commented 8 years ago

Playing around with this, if multiple counties are passed in as the area column, it works as expected. However, if you pass in a state as the area column, it doesn't know what to do since it needs a secondary area column or some other pre-filter. I think we need to implement a pre-filter on USSTATEALPHACODE that will subset a national dump file to a particular (or list of) states. Then offer the list of counties as the 'Choose Areas' is done now.