r-b-g-b / clean-water-tool

Reporting Tool to Support Safe Drinking Water in California’s Disadvantaged Communities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create downloadable .csv file of query results from online reporting tool

ruckeralex opened this issue · comments

Create function to download an .xls file of the query results from #24 . In addition to the fields in the HR2W raw data set, the downloadable .xls file will also provide the following calculated fields: whether system is in Tulare Lake Basin, the absolute # of exceedance of analyte [ = "RESULT" - "MCL"], and the % exceedance of the analyte [("RESULT" - "MCL") / "MCL"].

Aaron and/or Robert, is this something you can help produce?

@ruckeralex @aaronhans in branch export-button i've still got a little more logic to implement to create a csv from data in #24 (system, city, county, zip, analyte)

To be able to grab the information at the system level, there should be some additional processing to query into it. Does the user click into the system level info and grab the csv, or do they click at the level they see the five fields in #24

What I mean is, do they grab a csv at system level page: https://aaronhans.github.io/community-water-center/system.html?id=CA0900102 (example) ?

Hi Alex! Is it possible for the users to have the option to download CSV file on both pages-- the main page (https://aaronhans.github.io/community-water-center/) and on the Water System-level page (https://aaronhans.github.io/community-water-center/system.html?id=CA3710009)? In both cases, perhaps you can offer a link to "Download .csv file of displayed data" above the first data table.

Hi @ruckeralex ! we have a basic button implemented which I'll work to merge into master. Last thing is working on calculated results to close this out.

This issue can be closed once https://github.com/openoakland/clean-water/pull/1/commits is merged (new repo). There may be some error handling still to do to, e.g. to account for calculations where there is any missing data, but the functionality and additional fields are in place