Checking for non-preferred file/folder path names (may take a long time depending on the number of files/folders) ...
This resource contains some files/folders that have non-preferred characters in their name. Show non-conforming files/folders.
This resource contains content types with files that need to be updated to match with metadata changes. Show content type files that need updating.
Supporting data and tools for "Variability in Consumption and End Uses of Water for Residential Users in Logan and Providence, Utah, USA"
Authors: |
|
|
---|---|---|
Owners: |
|
This resource does not have an owner who is an active HydroShare user. Contact CUAHSI (help@cuahsi.org) for information on this resource. |
Type: | Resource | |
Storage: | The size of this resource is 642.4 KB | |
Created: | Oct 08, 2021 at 7:31 p.m. | |
Last updated: | Apr 18, 2023 at 3:26 a.m. | |
Citation: | See how to cite this resource |
Sharing Status: | Public |
---|---|
Views: | 1268 |
Downloads: | 181 |
+1 Votes: | 1 other +1 this |
Comments: | No comments (yet) |
Abstract
The files provided here are the supporting data and code files for the analyses presented in "Variability in Consumption and End Uses of Water for Residential Users in Logan and Providence, Utah, USA", an article published in JWRPM (https://ascelibrary.org/journal/jwrmd5) The journal paper assessed how differences water consumption are reflected in terms of timing and distribution of end uses across residential properties. The article provides insights into the variability of indoor and outdoor residential water use at the household level from the analysis of four to 23 weeks of 4-second resolution water use data at 31 single family residential properties. The data were collected in the cities of Logan and Providence, Utah, USA between 2019 and 2021. The 4-second resolution data is publicly available on: http://www.hydroshare.org/resource/0b72cddfc51c45b188e0e6cd8927227e. Standardized monthly values for single family residents in both cities were used in the article and are publicly available on: http://www.hydroshare.org/resource/16c2d60eb6c34d6b95e5d4dbbb4653ef. The code and data included in this resource allows replication of the analyses presented in the journal paper, and the raw data included allow for extension of the analyses conducted.
Subject Keywords
Coverage
Spatial
Temporal
Start Date: | |
---|---|
End Date: |
Content
readme.md
The resource is organized as follows:
- WeatherData contains weather data for the USU Environmental Observatory and Evans farm weather stations (in CSV format). These files were directly downloaded from the USU Utah Climate center website (https://climate.usu.edu/). All metadata about the weather data (e.g., units, type of instrument, equations) is available in the USR UCC website in the following links:
- runtime.csv, and install.R are files needed to set up the mybinder environment where the other script files. (DataHandler.R and DataAnalysis.R) can be reproduced.
- urls.csv has links to all the data used in the study.
- DataHandler.R downloads all the required data from the HydroShare resources cited.
- DataAnalysis.R reproduces the results presented in the paper
Instructions for Reproducing Results
The code files were tested on a MacBook Pro with a 8-Core Intel Core i9 2.3 GHz Processor with 16 GB of RAM Running under: macOS Monterey 12.0.1. with a high speed (191 Mbps download and 377 Mbps upload) internet connection.
1. To reproduce any of the results on mybinder, do the following:
- Click here: to open a mybinder executable environment (This can take a few minutes).
- Select R Studio from the launcher and run the scripts in the following order
- DataHandler.R (this script will download all the required data from the HydroShare resources cited). This file ran in less than 10 minutes using internet connection specified above.
- DataAnalysis.R (this script will reproduce the results presented in the paper, generating the figures included in the article (it generates Figures 2, 3, 4, 5, 6, 8, 9, and 10) and in Appendix B following a similar work secuence. Tables and numbers reported in the article are printed to the console. This file ran in less than 7 minutes.
2. To reproduce any of the results presented in the article in your local machine, do the following:
- Download all the files in the ReproducibleCode folder. Keep the files together in the same folder to ensure the paths to the files remain correct.
- Open the R scripts (https://cran.r-project.org/) using R or R-Studio (https://rstudio.com/). Install the following packages before running the code: tidyverse, lubridate, ggpattern, cowplot, gridExtra, viridis, scales, RColorBrewer, remotes, ggpattern.
- Execute them in the following order: 1) DataHandler.R and 2) DataAnalysis.R.
- DataHandler.R will download all the required data from the HydroShare resources cited. This file ran in less than 7 minutes using the machine and internet connection specified above.
- DataAnalysis.R will reproduce the results presented in the paper, generating the figures included in the article (it generates Figures 2, 3, 4, 5, 6, 7, 8, 9, and 10) and in Appendix B following a similar work secuence. Tables and numbers reported in the article are printed to the console. This file ran in less than 3 minutes using the machine specified above.
The code provided in this resource was developed using R version 4.0.0. The following R packages are required for running the provided scripts:
- tidyverse - Version 1.3.0. A collection of R packages designed for data science.
- lubridate - Version 1.7.8. Functions for working with dates/times.
- ggpattern - Version 0.2.0. Custom ggplot2 geoms which support filled areas with geometric and image-based patterns.
- cowplot - Version 0.4.5. Miscellaneous functions to help customize 'ggplot2' plots.
- gridExtra - Version 0.4.5. User-level functions to work with "grid" graphics, notably to arrange multiple grid-based plots on a page, and draw tables.
- viridis - Version 0.5.1. A library that provides color maps for R.
- HSClientR - Version 0.3.1.9000. an API wrapper for HydroShare. (https://hsclientr.justinsingh.me/)
- scales - Version 1.2.0. Graphical scales map data to aesthetics, and provide methods for automatically determining breaks and labels for axes and legends.
- RColorBrewer - Provides color schemes for maps (and other graphics) designed by Cynthia Brewer as described at http://colorbrewer2.org.
- remotes - Version 2.4.2. Download and install R packages stored in 'GitHub', 'GitLab', 'Bitbucket', 'Bioconductor', or plain 'subversion' or 'git' repositories.
- broom - Version 1.0.0. takes the messy output of built-in functions in R, such as lm, nls, or t.test, and turns them into tidy tibbles.
Related Resources
The content of this resource references | Bastidas Pacheco, C. J., N. Atallah, J. S. Horsburgh (2021). High Resolution Residential Water Use Data in Cache County, Utah, USA, HydroShare, http://www.hydroshare.org/resource/0b72cddfc51c45b188e0e6cd8927227e |
The content of this resource references | Bastidas Pacheco, C. J., J. S. Horsburgh (2021). Standarized Monthly Water Use Data for Logan and Providence Cities., HydroShare, http://www.hydroshare.org/resource/16c2d60eb6c34d6b95e5d4dbbb4653ef |
The content of this resource is derived from | http://www.hydroshare.org/resource/aaa7246437144f2390411ef9f2f4ebd0 |
This resource is referenced by | Bastidas Pacheco, C.J., Horsburgh J.S., Attallah N, (2022). Variability in Consumption and End Uses of Water for Residential Users in Logan and Providence, Utah. Journal of Water Resources Planning and Management. https://doi.org/10.1061/(ASCE)WR.1943-5452.0001633 |
Credits
Funding Agencies
This resource was created using funding from the following sources:
Agency Name | Award Title | Award Number |
---|---|---|
National Science Foundation | Cyberinfrastructure for Intelligent Water Supply (CIWS): Shrinking Big Data for Sustainable Urban Water | 1552444 |
How to Cite
This resource is shared under the Creative Commons Attribution CC BY.
http://creativecommons.org/licenses/by/4.0/
Comments
There are currently no comments
New Comment