Query tool for SDWIS (Safe Drinking Water Information System)
In California, present sources of water quality information are fragmented across thousands of water utilities and lack consistency and clarity. Moreover, although the state has identified open and transparent water data as critical to inform water management and achieve goals set in Human Right to Water, analysts remain hampered by a paucity of easy-to-use, open-source tools to acquire and analyze water quality data.
sdwisard package is an easy-to-use, open-source query tool for California drinking water quality data in the SDWIS database. It was developed as an entry to the CA Water Data Challenge 2020 to demonstrate the utility of easy-to-use API wrappers that empower analysts to get more done with data with less effort. Currently the SDWIS database is inconvenient to query and lacks a public facing API. This wrapper grabs data hosted in an AWS s3 bucket so we can pretend there is already the infrastructure to support this type of development.
This package is not yet on CRAN. Download it from Github as follows:
remotes::install_github(repo = "CAopenwater/sdwisard")
The heart of this package is the
get_data() function. To obtain data, simply supply a PSID (public water system ID number).
Supply a PSID and storet number to get data. Here, we get nitrate data in Alameda County Water District.
For more details see our Getting Started article.