README.md 4.77 KB
Newer Older
Laura A DeCicco's avatar
Laura A DeCicco committed
1
# dataRetrieval <img src="man/figures/logo.png" alt="dataRetrieval" height="150px" align="right" />
Laura A DeCicco's avatar
Laura A DeCicco committed
2

Laura A DeCicco's avatar
Laura A DeCicco committed
3
4
[![R build
status](https://github.com/USGS-R/dataRetrieval/workflows/R-CMD-check/badge.svg)](https://github.com/USGS-R/dataRetrieval/actions)[![Coverage
5
Status](https://coveralls.io/repos/github/USGS-R/dataRetrieval/badge.svg?branch=master)](https://coveralls.io/github/USGS-R/dataRetrieval?branch=master)
Laura A DeCicco's avatar
Laura A DeCicco committed
6
[![status](https://img.shields.io/badge/USGS-Core-green.svg)](https://owi.usgs.gov/R/packages.html#core)
7
8
9
10
[![CRAN
version](http://www.r-pkg.org/badges/version/dataRetrieval)](https://cran.r-project.org/package=dataRetrieval)
[![](http://cranlogs.r-pkg.org/badges/dataRetrieval)](https://cran.r-project.org/package=dataRetrieval)
[![](http://cranlogs.r-pkg.org/badges/grand-total/dataRetrieval)](https://cran.r-project.org/package=dataRetrieval)
Laura A DeCicco's avatar
Laura A DeCicco committed
11

12
Retrieval functions for USGS and EPA hydrologic and water quality data.
Laura A DeCicco's avatar
Laura A DeCicco committed
13

14
For complete tutorial information, see:
Laura A DeCicco's avatar
Laura A DeCicco committed
15

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<https://usgs-r.github.io/dataRetrieval>

<https://owi.usgs.gov/R/dataRetrieval.html>

# Sample Workflow

## USGS

``` r
library(dataRetrieval)
# Choptank River near Greensboro, MD
siteNumber <- "01491000" 
ChoptankInfo <- readNWISsite(siteNumber)
parameterCd <- "00060"

#Raw daily data:
rawDailyData <- readNWISdv(siteNumber,parameterCd,
                      "1980-01-01","2010-01-01")

# Sample data Nitrate:
parameterCd <- "00618"
qwData <- readNWISqw(siteNumber,parameterCd,
                      "1980-01-01","2010-01-01")

pCode <- readNWISpCode(parameterCd)
```

## Water Quality Portal

``` r
specificCond <- readWQPqw(siteNumbers = 'WIDNR_WQX-10032762',
                          parameterCd = 'Specific conductance',
                          startDate = '2011-05-01',
                          endDate = '2011-09-30')
```

mike's avatar
mike committed
52
53
54
55
56
57
58
59
## Network Linked Data Index

``` r
features <- findNLDI(nwis = "01491000",
                     nav = "UT",
                     find = c('basin', 'wqp'))
```

60
# Reporting bugs
Laura A DeCicco's avatar
Laura A DeCicco committed
61
62

Please consider reporting bugs and asking questions on the Issues page:
63
<https://github.com/USGS-R/dataRetrieval/issues>
Laura A DeCicco's avatar
Laura A DeCicco committed
64
65
66

Follow `@USGS_R` on Twitter for updates on USGS R packages:

67
68
[![Twitter
Follow](https://img.shields.io/twitter/follow/USGS_R.svg?style=social&label=Follow%20USGS_R)](https://twitter.com/USGS_R)
Laura A DeCicco's avatar
Laura A DeCicco committed
69

70
# Citing dataRetrieval
Laura A DeCicco's avatar
Laura A DeCicco committed
71
72
73

``` r
citation(package = "dataRetrieval")
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#> 
#> To cite dataRetrieval in publications, please use:
#> 
#>   De Cicco, L.A., Hirsch, R.M., Lorenz, D., Watkins, W.D., 2018,
#>   dataRetrieval: R packages for discovering and retrieving water data
#>   available from Federal hydrologic web services, doi:10.5066/P9X4L3GE
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     author = {Laura A. {De Cicco} and David Lorenz and Robert M. Hirsch and William Watkins},
#>     title = {dataRetrieval: R packages for discovering and retrieving water data available from U.S. federal hydrologic web services},
#>     publisher = {U.S. Geological Survey},
#>     address = {Reston, VA},
Laura A DeCicco's avatar
Laura A DeCicco committed
88
#>     version = {2.7.6},
89
90
91
92
93
#>     institution = {U.S. Geological Survey},
#>     year = {2018},
#>     doi = {10.5066/P9X4L3GE},
#>     url = {https://code.usgs.gov/water/dataRetrieval},
#>   }
Laura A DeCicco's avatar
Laura A DeCicco committed
94
```
Laura A DeCicco's avatar
conduct    
Laura A DeCicco committed
95

96
# Package Support
Laura A DeCicco's avatar
Laura A DeCicco committed
97

98
99
100
101
102
The Water Mission Area of the USGS supports the development and
maintenance of `dataRetrieval`, and most likely further into the future.
Resources are available primarily for maintenance and responding to user
questions. Priorities on the development of new features are determined
by the `dataRetrieval` development team.
Laura A DeCicco's avatar
Laura A DeCicco committed
103

Laura A DeCicco's avatar
Link    
Laura A DeCicco committed
104
[![USGS](http://usgs-r.github.io/images/usgs.png)](https://www.usgs.gov/)
Laura A DeCicco's avatar
Laura A DeCicco committed
105

106
# Installation
Laura A DeCicco's avatar
Laura A DeCicco committed
107

108
109
To install the dataRetrieval package, you must be using R 3.0 or greater
and run the following command:
110

111
``` r
112
113
114
install.packages("dataRetrieval")
```

115
116
To get cutting-edge changes, install from GitHub using the `remotes`
packages:
Laura A DeCicco's avatar
Laura A DeCicco committed
117

118
``` r
Laura A DeCicco's avatar
Laura A DeCicco committed
119
120
121
122
library(remotes)
install_github("USGS-R/dataRetrieval", 
               build_opts = c("--no-resave-data", "--no-manual"),
               build_vignettes = TRUE)
Laura A DeCicco's avatar
Laura A DeCicco committed
123
124
```

125
# Disclaimer
Laura A DeCicco's avatar
Laura A DeCicco committed
126

127
128
129
130
131
This software is in the public domain because it contains materials that
originally came from the U.S. Geological Survey, an agency of the United
States Department of Interior. For more information, see the [official
USGS copyright
policy](https://www2.usgs.gov/visual-id/credit_usgs.html#copyright)
Laura A DeCicco's avatar
Laura A DeCicco committed
132

133
134
135
136
137
138
Although this software program has been used by the U.S. Geological
Survey (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
139

140
This software is provided “AS IS.”
Laura A DeCicco's avatar
Laura A DeCicco committed
141

142
[![CC0](http://i.creativecommons.org/p/zero/1.0/88x31.png)](http://creativecommons.org/publicdomain/zero/1.0/)