Skip to content
Snippets Groups Projects
README.md 3.72 KiB
Newer Older
Laura A DeCicco's avatar
Laura A DeCicco committed
dataRetrieval
=============
[![Build status](https://ci.appveyor.com/api/projects/status/luni4ckts7j1u2k8)](https://ci.appveyor.com/project/USGS-R/dataretrieval)

R package source for data retrieval specifically for the EGRET R package:
Laura A DeCicco's avatar
Laura A DeCicco committed

Please visit the EGRET wiki for more information:
[EGRET Wiki](https://github.com/USGS-R/EGRET/wiki)
Laura A DeCicco's avatar
Laura A DeCicco committed

Disclaimer
----------
Laura A DeCicco's avatar
Laura A DeCicco committed
This software is in the public domain because it contains materials that originally came from the U.S. Geological Survey  (USGS), an agency of the United States Department of Interior. For more information, see the official USGS copyright policy at [http://www.usgs.gov/visual-id/credit_usgs.html#copyright](http://www.usgs.gov/visual-id/credit_usgs.html#copyright)
Laura A DeCicco's avatar
Laura A DeCicco committed
Although this software program has been used by the USGS, no warranty, expressed or implied, is made by the USGS or the U.S. Government as to the accuracy and functioning of the program and related program material nor shall the fact of distribution constitute any such warranty, and no responsibility is assumed by the USGS in connection therewith.
Laura A DeCicco's avatar
Laura A DeCicco committed

Laura A DeCicco's avatar
Laura A DeCicco committed
This software is provided "AS IS."
Laura A DeCicco's avatar
Laura A DeCicco committed

Subscribe
---------
Please email questions, comments, and feedback to: 
egret_comments@usgs.gov

Additionally, to subscribe to an email list concerning updates to these R packages, please send a request to egret_comments@usgs.gov.

Package Installation
Laura A DeCicco's avatar
Laura A DeCicco committed
---------------------------------
Laura A DeCicco's avatar
Laura A DeCicco committed
While the dataRetreival package is in development (and not on CRAN), the zoo package must first be manually installed. To install the dataRetrieval package, you must be using R 3.0 or greater and run the following commands:
Laura A DeCicco's avatar
Laura A DeCicco committed

Laura A DeCicco's avatar
Laura A DeCicco committed
	install.packages("dataRetrieval", 
	repos=c("http://usgs-r.github.com","http://cran.us.r-project.org"),
	dependencies=TRUE,
	type="both")

Laura A DeCicco's avatar
Laura A DeCicco committed
Version updates
---------------
Laura A DeCicco's avatar
Laura A DeCicco committed
dataRetrieval 1.4.0-in developement
===========
* Changed naming convention:
getDVData -> getNWISDaily
getSampleData -> getNWISSample
getSTORETData* -> getWQPSample
getSampleDataFromFile -> getUserSample
getDailyDataFromFile -> getUserDaily
getMetaData -> splits into getNWISInfo and getUserInfo
getSiteFileData <- getNWISSiteInfo
getParameterInfo <- getNWISPcodeInfo
getDataAvailability <- getNWISDataAvailability
'retrieve' functions changed to 'get'
* Changed WaterML2 rbind fill from plyr function to dplyr. Removed plyr import, added dplyr.
*
Laura A DeCicco's avatar
Laura A DeCicco committed
dataRetrieval 1.3.3
===========
Laura A DeCicco's avatar
Laura A DeCicco committed

Laura A DeCicco's avatar
Laura A DeCicco committed
* Updated getNWISSiteInfo to retrieve multiple site file datasets at once using a vector of siteNumbers as input argument.
* Updated error-handling for Web service calls. More information is returned when errors happen
* Added some basic processing to Water Quality Portal raw data retrievals. Date columns are returned as Date objects, value columns are numeric, and a column is created from the date/time/timezone columns that is POSIXct.
* Added very generalized NWIS and WQP retrieval functions (getNWISData, getNWISSites, getGeneralWQPData, and getWQPSites) which allow the user to use any argument available on the Web service platform.
Laura A DeCicco's avatar
Laura A DeCicco committed

Laura A DeCicco's avatar
Laura A DeCicco committed
dataRetrieval 1.3.2
===========
Laura A DeCicco's avatar
Laura A DeCicco committed

Laura A DeCicco's avatar
Laura A DeCicco committed
* Deprecated getQWData, updated getWQPData to take either parameter code or characteristic name.
* Changed the name of raw data retrievals to: getNWISqwData, getNWISunitData, getNWISdvData, and getWQPqwData (from: getNWISqwData, retrieveUnitNWISData, retrieveNWISData, getRawQWData)
* Added NA warning to getDVData function
* Updated mergeReport to allow for Sample data with different measurements taken on the same day
Laura A DeCicco's avatar
Laura A DeCicco committed


Sample Workflow
---------------

Load data from web services:

	library(dataRetrieval)
Laura A DeCicco's avatar
Laura A DeCicco committed
	Daily <- getNWISDaily("06934500","00060","1979-10-01","2010-09-30")
	Sample <-getNWISSample("06934500","00631","1970-10-01","2011-09-30")
	INFO <-getNWISInfo("06934500","00631", interactive=FALSE)
Laura A DeCicco's avatar
Laura A DeCicco committed
	Sample <-mergeReport(Daily, Sample)