diff --git a/README.md b/README.md index aa38ba3..3d8af5d 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,12 @@ ## Latest Announcements -:mega: **01/16/2025:** `dataretrieval` now features the `waterdata` module, +**02/24/2026** The `get_gwlevels`, `get_discharge_measurements` functions in the `nwis` module are defunct and have been replaced with the `get_field_measurements` function in the `waterdata` module. The `get_pmcodes` function in the `nwis` module has been replaced with the `get_reference_table(collection='parameter_code)` function. Finally, the `get_water_use` function in the `nwis` module is defunct with no current replacement. + +:mega: **01/16/2026:** `dataretrieval` now features the `waterdata` module, which provides access to USGS's modernized [Water Data APIs](https://api.waterdata.usgs.gov/). The Water Data API endpoints include -daily values, **instantaneous values**, field measurements, time series metadata, +daily values, instantaneous values, field measurements, time series metadata, statistics, and discrete water quality data from the [Samples database](https://waterdata.usgs.gov/download-samples/#dataProfile=site). This new module replaces the `nwis` module, which provides access to the legacy [NWIS Water Services](https://waterservices.usgs.gov/). Take a look at the new [`waterdata` module demo notebook](demos/WaterData_demo.ipynb), which walks through an extended example using a majority of the available `waterdata` functions. @@ -136,7 +138,7 @@ To log messages to a file, you can specify a filename in the logging.basicConfig(filename='waterdata.log', level=logging.INFO) ``` -### NWIS Legacy Services (Deprecated but still functional) +### Legacy NWIS Services (Deprecated but still functional) The `nwis` module accesses legacy NWIS Water Services: @@ -219,6 +221,7 @@ print(f"Found {len(flowlines)} upstream tributaries within 50km") - **Time series metadata**: Information about available data parameters - **Latest daily values**: Most recent daily statistical summary data - **Latest instantaneous values**: Most recent high-frequency continuous data +- **Daily, monthly, and annual statistics**: Median, maximum, minimum, arithmetic mean, and percentile statistics - **Samples data**: Discrete USGS water quality data ### Legacy NWIS Services (Deprecated) @@ -227,7 +230,6 @@ print(f"Found {len(flowlines)} upstream tributaries within 50km") - **Site info (site)**: Basic site information - **Statistics (stat)**: Statistical summaries - **Discharge peaks (peaks)**: Annual peak discharge events -- **Discharge measurements (measurements)**: Direct flow measurements ### Water Quality Portal - **Results**: Water quality analytical results from USGS, EPA, and other agencies diff --git a/dataretrieval/nwis.py b/dataretrieval/nwis.py index e4615d1..b0093ff 100644 --- a/dataretrieval/nwis.py +++ b/dataretrieval/nwis.py @@ -37,11 +37,7 @@ WATERSERVICES_SERVICES = ["dv", "iv", "site", "stat"] WATERDATA_SERVICES = [ - "gwlevels", - "measurements", "peaks", - "pmcodes", - "water_use", "ratings", ] # NAD83 @@ -135,7 +131,7 @@ def get_qwdata( **kwargs, ) -> Tuple[pd.DataFrame, BaseMetadata]: """ - Get water sample data from qwdata service - deprecated, use `get_samples()` + This function is defunct, use `get_samples()` in the waterdata module. """ @@ -152,54 +148,14 @@ def get_discharge_measurements( **kwargs, ) -> Tuple[pd.DataFrame, BaseMetadata]: """ - Get discharge measurements from the waterdata service. - - Parameters - ---------- - sites: string or list of strings, optional, default is None - start: string, optional, default is None - Supply date in the format: YYYY-MM-DD - end: string, optional, default is None - Supply date in the format: YYYY-MM-DD - ssl_check: bool, optional - If True, check SSL certificates, if False, do not check SSL, - default is True - **kwargs: optional - If supplied, will be used as query parameters - - Returns - ------- - df: ``pandas.DataFrame`` - Times series data from the NWIS JSON - md: :obj:`dataretrieval.utils.Metadata` - A custom metadata object - - Examples - -------- - .. doctest:: - - >>> # Get discharge measurements for site 05114000 - >>> df, md = dataretrieval.nwis.get_discharge_measurements( - ... sites="05114000", start="2000-01-01", end="2000-01-30" - ... ) - - >>> # Get discharge measurements for sites in Alaska - >>> df, md = dataretrieval.nwis.get_discharge_measurements( - ... start="2012-01-09", end="2012-01-10", stateCd="AK" - ... ) + This function is defunct, use `get_field_measurements()` + in the waterdata module. """ - _check_sites_value_types(sites) - - kwargs["site_no"] = kwargs.pop("site_no", sites) - kwargs["begin_date"] = kwargs.pop("begin_date", start) - kwargs["end_date"] = kwargs.pop("end_date", end) - - if "format" not in kwargs: - kwargs["format"] = "rdb" + raise NameError( + "`nwis.get_discharge_measurements` has been replaced with `waterdata.get_field_measurements`." + ) - response = query_waterdata("measurements", ssl_check=ssl_check, **kwargs) - return _read_rdb(response.text), NWIS_Metadata(response, **kwargs) def get_discharge_peaks( @@ -281,78 +237,14 @@ def get_gwlevels( **kwargs, ) -> Tuple[pd.DataFrame, BaseMetadata]: """ - Queries the groundwater level service from waterservices - - Parameters - ---------- - sites: string or list of strings, optional, default is None - If the waterdata parameter site_no is supplied, it will overwrite the - sites parameter - start: string, optional, default is '1851-01-01' - If the waterdata parameter begin_date is supplied, it will overwrite - the start parameter - end: string, optional, default is None - If the waterdata parameter end_date is supplied, it will overwrite the - end parameter (YYYY-MM-DD) - multi_index: bool, optional - If False, a dataframe with a single-level index (datetime) is returned, - default is True - datetime_index : bool, optional - If True, create a datetime index, default is True - ssl_check: bool, optional - If True, check SSL certificates, if False, do not check SSL, - default is True - **kwargs: optional - If supplied, will be used as query parameters - - Returns - ------- - df: ``pandas.DataFrame`` - Times series data from the NWIS JSON - md: :obj:`dataretrieval.utils.Metadata` - A custom metadata object - - Examples - -------- - .. doctest:: - - >>> # Get groundwater levels for site 434400121275801 - >>> df, md = dataretrieval.nwis.get_gwlevels(sites="434400121275801") + This function is defunct, use `get_field_measurements()` + in the waterdata module. """ - _check_sites_value_types(sites) - - # Make kwargs backwards compatible with waterservices - # vocabulary - if "startDT" in kwargs: - kwargs["begin_date"] = kwargs.pop("startDT") - if "endDT" in kwargs: - kwargs["end_date"] = kwargs.pop("endDT") - if "sites" in kwargs: - kwargs["site_no"] = kwargs.pop("sites") - if "stateCd" in kwargs: - kwargs["state_cd"] = kwargs.pop("stateCd") - - kwargs["begin_date"] = kwargs.pop("begin_date", start) - kwargs["end_date"] = kwargs.pop("end_date", end) - kwargs["site_no"] = kwargs.pop("site_no", sites) - kwargs["multi_index"] = multi_index - - response = query_waterdata("gwlevels", format="rdb", ssl_check=ssl_check, **kwargs) - - df = _read_rdb(response.text) - - if datetime_index is True: - df = format_datetime(df, "lev_dt", "lev_tm", "lev_tz_cd") - - # Filter by kwarg parameterCd because the service doesn't do it - if "parameterCd" in kwargs: - pcodes = kwargs["parameterCd"] - if isinstance(pcodes, str): - pcodes = [pcodes] - df = df[df["parameter_cd"].isin(pcodes)] + raise NameError( + "`nwis.get_gwlevels` has been replaced with `waterdata.get_field_measurements()`." + ) - return format_response(df, **kwargs), NWIS_Metadata(response, **kwargs) def get_stats( @@ -784,79 +676,16 @@ def get_pmcodes( partial: bool = True, ssl_check: bool = True, ) -> Tuple[pd.DataFrame, BaseMetadata]: - """ - Return a ``pandas.DataFrame`` containing all NWIS parameter codes. - - Parameters - ---------- - parameterCd: string or list of strings, default is 'All' - Accepts parameter codes or names - partial: bool, optional - Default is True (partial querying). If False, the function will query - only exact matches, default is True - ssl_check: bool, optional - If True, check SSL certificates, if False, do not check SSL, - default is True - - Returns - ------- - df: ``pandas.DataFrame`` - Data retrieved from the NWIS web service. - md: :obj:`dataretrieval.utils.Metadata` - A custom metadata object - - Examples - -------- - .. doctest:: - - >>> # Get information about the '00060' pcode - >>> df, md = dataretrieval.nwis.get_pmcodes( - ... parameterCd="00060", partial=False - ... ) - - >>> # Get information about all 'Discharge' pcodes - >>> df, md = dataretrieval.nwis.get_pmcodes( - ... parameterCd="Discharge", partial=True - ... ) + """ + This function is defunct, use + `get_reference_table(collection="parameter-codes")`. """ - payload = {"fmt": "rdb"} - url = PARAMCODES_URL - - if isinstance(parameterCd, str): # when a single code or name is given - if parameterCd.lower() == "all": - payload.update({"group_cd": "%"}) - url = ALLPARAMCODES_URL - response = query(url, payload, ssl_check=ssl_check) - return _read_rdb(response.text), NWIS_Metadata(response) - - else: - parameterCd = [parameterCd] - - if not isinstance(parameterCd, list): - raise TypeError( - "Parameter information (code or name) must be type string or list" + raise NameError( + "`nwis.get_pmcodes` has been replaced with `get_reference_table(collection='parameter-codes')`." ) - # Querying with a list of parameters names, codes, or mixed - return_list = [] - for param in parameterCd: - if isinstance(param, str): - if partial: - param = f"%{param}%" - payload.update({"parm_nm_cd": param}) - response = query(url, payload, ssl_check=ssl_check) - if len(response.text.splitlines()) < 10: # empty query - raise TypeError( - "One of the parameter codes or names entered does not" - "return any information, please try a different value" - ) - return_list.append(_read_rdb(response.text)) - else: - raise TypeError("Parameter information (code or name) must be type string") - return pd.concat(return_list), NWIS_Metadata(response) - def get_water_use( years: Union[str, List[str]] = "ALL", @@ -866,74 +695,12 @@ def get_water_use( ssl_check: bool = True, ) -> Tuple[pd.DataFrame, BaseMetadata]: """ - Water use data retrieval from USGS (NWIS). - - Parameters - ---------- - years: string or list of strings - List or comma delimited string of years. Must be years ending in 0 or - 5, or "ALL", which retrieves all available years, default is "ALL" - state: string, optional, default is None - full name, abbreviation or id - counties: string or list of strings - County IDs from county lookup or "ALL", default is "ALL" - categories: string or list of strings - List or comma delimited string of Two-letter category abbreviations, - default is "ALL" - ssl_check: bool, optional - If True, check SSL certificates, if False, do not check SSL, - default is True - - Returns - ------- - df: ``pandas.DataFrame`` - Data from NWIS - md: :obj:`dataretrieval.utils.Metadata` - A custom metadata object - - Examples - -------- - .. doctest:: - - >>> # Get total population for RI from the NWIS water use service - >>> df, md = dataretrieval.nwis.get_water_use( - ... years="2000", state="RI", categories="TP" - ... ) - - >>> # Get the national total water use for livestock in Bgal/day - >>> df, md = dataretrieval.nwis.get_water_use(years="2010", categories="L") - - >>> # Get 2005 domestic water use for Apache County in Arizona - >>> df, md = dataretrieval.nwis.get_water_use( - ... years="2005", state="Arizona", counties="001", categories="DO" - ... ) + This function is defunct and currently has no replacement. """ - if years: - if not isinstance(years, list) and not isinstance(years, str): - raise TypeError("years must be a string or a list of strings") - - if counties: - if not isinstance(counties, list) and not isinstance(counties, str): - raise TypeError("counties must be a string or a list of strings") - - if categories: - if not isinstance(categories, list) and not isinstance(categories, str): - raise TypeError("categories must be a string or a list of strings") - - payload = { - "rdb_compression": "value", - "format": "rdb", - "wu_year": years, - "wu_category": categories, - "wu_county": counties, - } - url = WATERDATA_URL + "water_use" - if state is not None: - url = WATERDATA_BASE_URL + state + "/nwis/water_use" - payload.update({"wu_area": "county"}) - response = query(url, payload, ssl_check=ssl_check) - return _read_rdb(response.text), NWIS_Metadata(response) + raise NameError( + "`nwis.get_water_use` is defunct." + ) def get_ratings( @@ -1075,11 +842,7 @@ def get_record( - 'iv' : instantaneous data - 'dv' : daily mean data - 'site' : site description - - 'measurements' : discharge measurements - 'peaks': discharge peaks - - 'gwlevels': groundwater levels - - 'pmcodes': get parameter codes - - 'water_use': get water use data - 'ratings': get rating table - 'stat': get statistics ssl_check: bool, optional @@ -1105,29 +868,9 @@ def get_record( >>> # Get site description for site 01585200 >>> df = dataretrieval.nwis.get_record(sites="01585200", service="site") - >>> # Get discharge measurements for site 01585200 - >>> df = dataretrieval.nwis.get_record( - ... sites="01585200", service="measurements" - ... ) - >>> # Get discharge peaks for site 01585200 >>> df = dataretrieval.nwis.get_record(sites="01585200", service="peaks") - >>> # Get latest groundwater level for site 434400121275801 - >>> df = dataretrieval.nwis.get_record( - ... sites="434400121275801", service="gwlevels" - ... ) - - >>> # Get information about the discharge parameter code - >>> df = dataretrieval.nwis.get_record( - ... service="pmcodes", parameterCd="00060" - ... ) - - >>> # Get water use data for livestock nationally in 2010 - >>> df = dataretrieval.nwis.get_record( - ... service="water_use", years="2010", categories="L" - ... ) - >>> # Get rating table for USGS streamgage 01585200 >>> df = dataretrieval.nwis.get_record(sites="01585200", service="ratings") @@ -1171,12 +914,6 @@ def get_record( df, _ = get_info(sites=sites, ssl_check=ssl_check, **kwargs) return df - elif service == "measurements": - df, _ = get_discharge_measurements( - site_no=sites, begin_date=start, end_date=end, ssl_check=ssl_check, **kwargs - ) - return df - elif service == "peaks": df, _ = get_discharge_peaks( site_no=sites, @@ -1188,26 +925,6 @@ def get_record( ) return df - elif service == "gwlevels": - df, _ = get_gwlevels( - sites=sites, - startDT=start, - endDT=end, - multi_index=multi_index, - datetime_index=datetime_index, - ssl_check=ssl_check, - **kwargs, - ) - return df - - elif service == "pmcodes": - df, _ = get_pmcodes(ssl_check=ssl_check, **kwargs) - return df - - elif service == "water_use": - df, _ = get_water_use(state=state, ssl_check=ssl_check, **kwargs) - return df - elif service == "ratings": df, _ = get_ratings(site=sites, ssl_check=ssl_check, **kwargs) return df @@ -1461,8 +1178,3 @@ def site_info(self) -> Optional[Tuple[pd.DataFrame, BaseMetadata]]: else: return None # don't set metadata site_info attribute - @property - def variable_info(self) -> Optional[Tuple[pd.DataFrame, BaseMetadata]]: - # define variable_info metadata based on parameterCd if available - if "parameterCd" in self._parameters: - return get_pmcodes(parameterCd=self._parameters["parameterCd"]) diff --git a/demos/R Python Vignette equivalents.ipynb b/demos/R Python Vignette equivalents.ipynb index 12cd52e..31114af 100755 --- a/demos/R Python Vignette equivalents.ipynb +++ b/demos/R Python Vignette equivalents.ipynb @@ -62,9 +62,7 @@ "\n", "# sample data Nitrate:\n", "parameterCd = \"00618\"\n", - "samples_data, md = waterdata.get_samples(monitoringLocationIdentifier=f\"USGS-{siteNumber}\", usgsPCode=parameterCd, activityStartDateLower=\"1980-01-01\", activityStartDateUpper=\"2010-01-01\")\n", - "\n", - "pCode, md = nwis.get_pmcodes(parameterCd=parameterCd)" + "samples_data, md = waterdata.get_samples(monitoringLocationIdentifier=f\"USGS-{siteNumber}\", usgsPCode=parameterCd, activityStartDateLower=\"1980-01-01\", activityStartDateUpper=\"2010-01-01\")\n" ] }, { @@ -98,25 +96,6 @@ "dailyDataAvailable, md = nwis.get_dv(sites=siteNumbers, statCd=\"00003\")" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "pycharm": { - "is_executing": false - } - }, - "outputs": [], - "source": [ - "'''\n", - "# Using defaults:\n", - "parameterCd <- \"00618\" \n", - "parameterINFO <- readNWISpCode(parameterCd)\n", - "'''\n", - "\n", - "pCode, md = nwis.get_pmcodes(parameterCd=\"00618\")" - ] - }, { "cell_type": "code", "execution_count": null, @@ -211,20 +190,6 @@ " activityStartDateLower=startDate, activityStartDateUpper=endDate)" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "'''\n", - "siteNumber <- \"434400121275801\"\n", - "groundWater <- readNWISgwl(siteNumber)\n", - "'''\n", - "siteNumber = \"434400121275801\"\n", - "groundWater, md = nwis.get_gwlevels(sites=siteNumber)" - ] - }, { "cell_type": "code", "execution_count": null, @@ -252,35 +217,6 @@ "ratings_data, md = nwis.get_ratings(site='01594440', file_type=\"base\")" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "'''surfaceData <- readNWISmeas(siteNumber)'''\n", - "siteNumber = '01594440'\n", - "surface_data, md = nwis.get_discharge_measurements(sites=siteNumber)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "'''\n", - "allegheny <- readNWISuse(stateCd = \"Pennsylvania\",\n", - " countyCd = \"Allegheny\")\n", - "national <- readNWISuse(stateCd = NULL, \n", - " countyCd = NULL, \n", - " transform = TRUE)\n", - "'''\n", - "allegheny, md = nwis.get_water_use(state=\"PA\", counties=\"003\")\n", - "\n", - "national, md = nwis.get_water_use()" - ] - }, { "cell_type": "code", "execution_count": null, @@ -295,22 +231,6 @@ "discharge_stats, md = nwis.get_stats(sites='02319394', parameterCd=\"00060\", statReportType='annual', statTypeCd='all')" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# '''\n", - "# specificCond <- readWQPqw('WIDNR_WQX-10032762',\n", - "# 'Specific conductance',\n", - "# '2011-05-01','2011-09-30')\n", - "# '''\n", - "# specific_cond, md = wqp.get_results(siteid='WIDNR_WQX-10032762',\n", - "# characteristicName = 'Specific conductance',\n", - "# startDateLo='2011-05-01', startDateHi='2011-09-30')" - ] - }, { "cell_type": "code", "execution_count": null, diff --git a/tests/data/water_use_allegheny.txt b/tests/data/water_use_allegheny.txt deleted file mode 100755 index 159e7e3..0000000 --- a/tests/data/water_use_allegheny.txt +++ /dev/null @@ -1,320 +0,0 @@ -# -# File created on 2020-02-28 18:06:58 EST -# Refresh Date: 2018-06 -# -# U.S. Geological Survey -# -# This file contains selected WaterUse data -# -# The data you have secured from the USGS NWISWeb database may include data that have -# not received Director's approval and as such are provisional and subject to revision. -# The data are released on the condition that neither the USGS nor the United States -# Government may be held liable for any damages resulting from its authorized or -# unauthorized use. -# -# * References to sources of water-use data can be found here. - https://water.usgs.gov/watuse -# -# Search Criteria: -# Year(s) - ALL -# Area - county -# County Codes(s) - 003 -# County Name(s) - -# Category Code(s) - ALL -# Category Name(s) - -# -# Columns: -# state_cd - State Code -# state_name - State Name -# county_cd - County Code -# county_nm - County Name -# year - Year -# -# The following categories are included: -# Total Population total population of area, in thousands -# Public Supply population served by groundwater, in thousands -# Public Supply population served by surface water, in thousands -# Public Supply total population served, in thousands -# Public Supply self-supplied groundwater withdrawals, fresh, in Mgal/d -# Public Supply self-supplied groundwater withdrawals, saline, in Mgal/d -# Public Supply total self-supplied withdrawals, groundwater, in Mgal/d -# Public Supply self-supplied surface-water withdrawals, fresh, in Mgal/d -# Public Supply self-supplied surface-water withdrawals, saline, in Mgal/d -# Public Supply total self-supplied withdrawals, surface water, in Mgal/d -# Public Supply total self-supplied withdrawals, fresh, in Mgal/d -# Public Supply total self-supplied withdrawals, saline, in Mgal/d -# Public Supply total self-supplied withdrawals, total, in Mgal/d -# Public Supply deliveries to domestic, in Mgal/d -# Public Supply deliveries to commercial, in Mgal/d -# Public Supply deliveries to industrial, in Mgal/d -# Public Supply deliveries to thermoelectric, in Mgal/d -# Public Supply total deliveries, in Mgal/d -# Public Supply public use and losses, in Mgal/d -# Public Supply per capita use, in gallons/person/day -# Public Supply reclaimed wastewater, in Mgal/d -# Public Supply number of facilities -# Domestic self-supplied groundwater withdrawals, fresh, in Mgal/d -# Domestic self-supplied groundwater withdrawals, saline, in Mgal/d -# Domestic total self-supplied withdrawals, groundwater, in Mgal/d -# Domestic self-supplied surface-water withdrawals, fresh, in Mgal/d -# Domestic self-supplied surface-water withdrawals, saline, in Mgal/d -# Domestic total self-supplied withdrawals, surface water, in Mgal/d -# Domestic total self-supplied withdrawals, fresh, in Mgal/d -# Domestic self-supplied population, in thousands -# Domestic deliveries from public supply, in Mgal/d -# Domestic total self-supplied withdrawals, saline, in Mgal/d -# Domestic per capita use, public-supplied, in gallons/person/day -# Domestic total self-supplied withdrawals, in Mgal/d -# Domestic total self-supplied withdrawals plus deliveries, in Mgal/d -# Domestic consumptive use, fresh, in Mgal/d -# Domestic consumptive use, saline, in Mgal/d -# Domestic total consumptive use, in Mgal/d -# Domestic per capita use, self-supplied, in gallons/person/day -# Domestic reclaimed wastewater, in Mgal/d -# Commercial self-supplied groundwater withdrawals, fresh, in Mgal/d -# Commercial self-supplied groundwater withdrawals, saline, in Mgal/d -# Commercial total self-supplied withdrawals, groundwater, in Mgal/d -# Commercial self-supplied surface-water withdrawals, fresh, in Mgal/d -# Commercial self-supplied surface-water withdrawals, saline, in Mgal/d -# Commercial total self-supplied withdrawals, surface water, in Mgal/d -# Commercial total self-supplied withdrawals, fresh, in Mgal/d -# Commercial total self-supplied withdrawals, saline, in Mgal/d -# Commercial total self-supplied withdrawals, in Mgal/d -# Commercial deliveries from public supply, in Mgal/d -# Commercial total self-supplied withdrawals plus deliveries, in Mgal/d -# Commercial consumptive use, fresh, in Mgal/d -# Commercial consumptive use, saline, in Mgal/d -# Commercial total consumptive use, in Mgal/d -# Commercial reclaimed wastewater, in Mgal/d -# Industrial self-supplied groundwater withdrawals, fresh, in Mgal/d -# Industrial self-supplied groundwater withdrawals, saline, in Mgal/d -# Industrial total self-supplied withdrawals, groundwater, in Mgal/d -# Industrial self-supplied surface-water withdrawals, fresh, in Mgal/d -# Industrial self-supplied surface-water withdrawals, saline, in Mgal/d -# Industrial total self-supplied withdrawals, surface water, in Mgal/d -# Industrial total self-supplied withdrawals, fresh, in Mgal/d -# Industrial total self-supplied withdrawals, saline, in Mgal/d -# Industrial total self-supplied withdrawals, in Mgal/d -# Industrial deliveries from public supply, in Mgal/d -# Industrial total self-supplied withdrawals plus deliveries, in Mgal/d -# Industrial consumptive use, fresh, in Mgal/d -# Industrial consumptive use, saline, in Mgal/d -# Industrial total consumptive use, in Mgal/d -# Industrial reclaimed wastewater, in Mgal/d -# Industrial number of facilities -# Total Thermoelectric Power self-supplied groundwater withdrawals, fresh, in Mgal/d -# Total Thermoelectric Power self-supplied groundwater withdrawals, saline, in Mgal/d -# Total Thermoelectric Power total self-supplied withdrawals, groundwater, in Mgal/d -# Total Thermoelectric Power self-supplied surface-water withdrawals, fresh, in Mgal/d -# Total Thermoelectric Power self-supplied surface-water withdrawals, saline, in Mgal/d -# Total Thermoelectric Power total self-supplied withdrawals, surface water, in Mgal/d -# Total Thermoelectric Power total self-supplied withdrawals, fresh, in Mgal/d -# Total Thermoelectric Power total self-supplied withdrawals, saline, in Mgal/d -# Total Thermoelectric Power total self-supplied withdrawals, total, in Mgal/d -# Total Thermoelectric Power total self-supplied withdrawals plus deliveries, in Mgal/d -# Total Thermoelectric Power consumptive use, fresh, in Mgal/d -# Total Thermoelectric Power consumptive use, saline, in Mgal/d -# Total Thermoelectric Power total consumptive use, in Mgal/d -# Total Thermoelectric Power power generated, in gigawatt-hours -# Total Thermoelectric Power reclaimed wastewater, in Mgal/d -# Total Thermoelectric Power number of facilities -# Fossil-fuel Thermoelectric Power self-supplied groundwater withdrawals, fresh, in Mgal/d -# Fossil-fuel Thermoelectric Power self-supplied groundwater withdrawals, saline, in Mgal/d -# Fossil-fuel Thermoelectric Power total self-supplied withdrawals, groundwater, in Mgal/d -# Fossil-fuel Thermoelectric Power self-supplied surface-water withdrawals, fresh, in Mgal/d -# Fossil-fuel Thermoelectric Power self-supplied surface-water withdrawals, saline, in Mgal/d -# Fossil-fuel Thermoelectric Power total self-supplied withdrawals, surface water, in Mgal/d -# Fossil-fuel Thermoelectric Power total self-supplied withdrawals, fresh, in Mgal/d -# Fossil-fuel Thermoelectric Power total self-supplied withdrawals, saline, in Mgal/d -# Fossil-fuel Thermoelectric Power total self-supplied withdrawals, in Mgal/d -# Fossil-fuel Thermoelectric Power deliveries from public supply, in Mgal/d -# Fossil-fuel Thermoelectric Power total self-supplied withdrawals plus deliveries, in Mgal/d -# Fossil-fuel Thermoelectric Power consumptive use, fresh, in Mgal/d -# Fossil-fuel Thermoelectric Power consumptive use, saline, in Mgal/d -# Fossil-fuel Thermoelectric Power total consumptive use, in Mgal/d -# Fossil-fuel Thermoelectric Power power generation, in gigawatt-hours -# Fossil-fuel Thermoelectric Power reclaimed wastewater, in Mgal/d -# Fossil-fuel Thermoelectric Power number of facilities -# Geothermal Thermoelectric Power self-supplied groundwater withdrawals, fresh, in Mgal/d -# Geothermal Thermoelectric Power self-supplied groundwater withdrawals, saline, in Mgal/d -# Geothermal Thermoelectric Power total self-supplied withdrawals, groundwater, in Mgal/d -# Geothermal Thermoelectric Power self-supplied surface-water withdrawals, fresh, in Mgal/d -# Geothermal Thermoelectric Power self-supplied surface-water withdrawals, saline, in Mgal/d -# Geothermal Thermoelectric Power total self-supplied withdrawals, surface water, in Mgal/d -# Geothermal Thermoelectric Power total self-supplied withdrawals, fresh, in Mgal/d -# Geothermal Thermoelectric Power total self-supplied withdrawals, saline, in Mgal/d -# Geothermal Thermoelectric Power total self-supplied withdrawals, in Mgal/d -# Geothermal Thermoelectric Power deliveries from public supply, in Mgal/d -# Geothermal Thermoelectric Power total self-supplied withdrawals plus deliveries, in Mgal/d -# Geothermal Thermoelectric Power consumptive use, fresh, in Mgal/d -# Geothermal Thermoelectric Power consumptive use, saline, in Mgal/d -# Geothermal Thermoelectric Power total consumptive use, in Mgal/d -# Geothermal Thermoelectric Power power generation, in gigawatt-hours -# Geothermal Thermoelectric Power reclaimed wastewater, in Mgal/d -# Geothermal Thermoelectric Power number of facilities -# Nuclear Thermoelectric Power self-supplied groundwater withdrawals, fresh, in Mgal/d -# Nuclear Thermoelectric Power self-supplied groundwater withdrawals, saline, in Mgal/d -# Nuclear Thermoelectric Power total self-supplied withdrawals, groundwater, in Mgal/d -# Nuclear Thermoelectric Power self-supplied surface-water withdrawals, fresh, in Mgal/d -# Nuclear Thermoelectric Power self-supplied surface-water withdrawals, saline, in Mgal/d -# Nuclear Thermoelectric Power total self-supplied withdrawals, surface water, in Mgal/d -# Nuclear Thermoelectric Power total self-supplied withdrawals, fresh, in Mgal/d -# Nuclear Thermoelectric Power total self-supplied withdrawals, saline, in Mgal/d -# Nuclear Thermoelectric Power total self-supplied withdrawals, in Mgal/d -# Nuclear Thermoelectric Power deliveries from public supply, in Mgal/d -# Nuclear Thermoelectric Power total self-supplied withdrawals plus deliveries, in Mgal/d -# Nuclear Thermoelectric Power consumptive use, fresh, in Mgal/d -# Nuclear Thermoelectric Power consumptive use, saline, in Mgal/d -# Nuclear Thermoelectric Power total consumptive use, in Mgal/d -# Nuclear Thermoelectric Power power generation, in gigawatt-hours -# Nuclear Thermoelectric Power reclaimed wastewater, in Mgal/d -# Nuclear Thermoelectric Power number of facilities -# Thermoelectric Power (Once-through cooling) self-supplied groundwater withdrawals, fresh, in Mgal/d -# Thermoelectric Power (Once-through cooling) self-supplied groundwater withdrawals, saline, in Mgal/d -# Thermoelectric Power (Once-through cooling) total self-supplied withdrawals, groundwater, in Mgal/d -# Thermoelectric Power (Once-through cooling) self-supplied surface-water withdrawals, fresh, in Mgal/ -# Thermoelectric Power (Once-through cooling) self-supplied surface-water withdrawals, saline, in Mgal -# Thermoelectric Power (Once-through cooling) total self-supplied withdrawals, surface water, in Mgal/ -# Thermoelectric Power (Once-through cooling) total self-supplied withdrawals, fresh, in Mgal/d -# Thermoelectric Power (Once-through cooling) total self-supplied withdrawals, saline, in Mgal/d -# Thermoelectric Power (Once-through cooling) total self-supplied withdrawals, total, in Mgal/d -# Thermoelectric Power (Once-through cooling) deliveries from public supply, in Mgal/d -# Thermoelectric Power (Once-through cooling) total self-supplied withdrawals plus deliveries, in Mgal -# Thermoelectric Power (Once-through cooling) consumptive use, fresh, in Mgal/d -# Thermoelectric Power (Once-through cooling) consumptive use, saline, in Mgal/d -# Thermoelectric Power (Once-through cooling) total consumptive use, in Mgal/d -# Thermoelectric Power (Once-through cooling) power generated, in gigawatt-hours -# Thermoelectric Power (Once-through cooling) reclaimed wastewater, in Mgal/d -# Thermoelectric Power (Once-through cooling) number of facilities -# Thermoelectric Power (Closed-loop cooling) self-supplied groundwater withdrawals, fresh, in Mgal/d -# Thermoelectric Power (Closed-loop cooling) self-supplied groundwater withdrawals, saline, in Mgal/d -# Thermoelectric Power (Closed-loop cooling) total self-supplied withdrawals, groundwater, in Mgal/d -# Thermoelectric Power (Closed-loop cooling) self-supplied surface-water withdrawals, fresh, in Mgal/d -# Thermoelectric Power (Closed-loop cooling) self-supplied surface-water withdrawals, saline, in Mgal/ -# Thermoelectric Power (Closed-loop cooling) total self-supplied withdrawals, surface water, in Mgal/d -# Thermoelectric Power (Closed-loop cooling) total self-supplied withdrawals, fresh, in Mgal/d -# Thermoelectric Power (Closed-loop cooling) total self-supplied withdrawals, saline, in Mgal/d -# Thermoelectric Power (Closed-loop cooling) total self-supplied withdrawals, total, in Mgal/d -# Thermoelectric Power (Closed-loop cooling) deliveries from public supply, in Mgal/d -# Thermoelectric Power (Closed-loop cooling) total self-supplied withdrawals plus deliveries, in Mgal/ -# Thermoelectric Power (Closed-loop cooling) consumptive use, fresh, in Mgal/d -# Thermoelectric Power (Closed-loop cooling) consumptive use, saline, in Mgal/d -# Thermoelectric Power (Closed-loop cooling) total consumptive use, in Mgal/d -# Thermoelectric Power (Closed-loop cooling) power generated, in gigawatt-hours -# Thermoelectric Power (Closed-loop cooling) reclaimed wastewater, in Mgal/d -# Thermoelectric Power (Closed-loop cooling) number of facilities -# Mining self-supplied groundwater withdrawals, fresh, in Mgal/d -# Mining self-supplied groundwater withdrawals, saline, in Mgal/d -# Mining total self-supplied withdrawals, groundwater, in Mgal/d -# Mining self-supplied surface-water withdrawals, fresh, in Mgal/d -# Mining self-supplied surface-water withdrawals, saline, in Mgal/d -# Mining total self-supplied withdrawals, surface water, in Mgal/d -# Mining total self-supplied withdrawals, fresh, in Mgal/d -# Mining total self-supplied withdrawals, saline, in Mgal/d -# Mining total self-supplied withdrawals, in Mgal/d -# Mining consumptive use, fresh, in Mgal/d -# Mining consumptive use, saline, in Mgal/d -# Mining total consumptive use, in Mgal/d -# Mining reclaimed wastewater, in Mgal/d -# Livestock self-supplied groundwater withdrawals, fresh, in Mgal/d -# Livestock self-supplied surface-water withdrawals, fresh, in Mgal/d -# Livestock total self-supplied withdrawals, fresh, in Mgal/d -# Livestock consumptive use, fresh, in Mgal/d -# Livestock (Stock) self-supplied groundwater withdrawals, fresh, in Mgal/d -# Livestock (Stock) self-supplied groundwater withdrawals, saline, in Mgal/d -# Livestock (Stock) total self-supplied withdrawals, groundwater, in Mgal/d -# Livestock (Stock) self-supplied surface-water withdrawals, fresh, in Mgal/d -# Livestock (Stock) self-supplied surface-water withdrawals, saline, in Mgal/d -# Livestock (Stock) total self-supplied withdrawals, surface water, in Mgal/d -# Livestock (Stock) total self-supplied withdrawals, fresh, in Mgal/d -# Livestock (Stock) total self-supplied withdrawals, saline, in Mgal/d -# Livestock (Stock) total self-supplied withdrawals, in Mgal/d -# Livestock (Stock) consumptive use, fresh, in Mgal/d -# Livestock (Stock) consumptive use, saline, in Mgal/d -# Livestock (Stock) total consumptive use, in Mgal/d -# Livestock (Animal Specialties) self-supplied groundwater withdrawals, fresh, in Mgal/d -# Livestock (Animal Specialties) self-supplied groundwater withdrawals, saline, in Mgal/d -# Livestock (Animal Specialties) total self-supplied withdrawals, groundwater, in Mgal/d -# Livestock (Animal Specialties) self-supplied surface-water withdrawals, fresh, in Mgal/d -# Livestock (Animal Specialties) self-supplied surface-water withdrawals, saline, in Mgal/d -# Livestock (Animal Specialties) total self-supplied withdrawals, surface water, in Mgal/d -# Livestock (Animal Specialties) total self-supplied withdrawals, fresh, in Mgal/d -# Livestock (Animal Specialties) total self-supplied withdrawals, saline, in Mgal/d -# Livestock (Animal Specialties) total self-supplied withdrawals, in Mgal/d -# Livestock (Animal Specialties) consumptive use, fresh, in Mgal/d -# Livestock (Animal Specialties) consumptive use, saline, in Mgal/d -# Livestock (Animal Specialties) total consumptive use, in Mgal/d -# Aquaculture self-supplied groundwater withdrawals, fresh, in Mgal/d -# Aquaculture self-supplied groundwater withdrawals, saline, in Mgal/d -# Aquaculture total self-supplied withdrawals, groundwater, in Mgal/d -# Aquaculture self-supplied surface-water withdrawals, fresh, in Mgal/d -# Aquaculture self-supplied surface-water withdrawals, saline, in Mgal/d -# Aquaculture total self-supplied withdrawals, surface water, in Mgal/d -# Aquaculture total self-supplied withdrawals, fresh, in Mgal/d -# Aquaculture total self-supplied withdrawals, saline, in Mgal/d -# Aquaculture total self-supplied withdrawals, in Mgal/d -# Aquaculture consumptive use, fresh, in Mgal/d -# Aquaculture consumptive use, saline, in Mgal/d -# Aquaculture total consumptive use, in Mgal/d -# Irrigation, Total self-supplied groundwater withdrawals, fresh, in Mgal/d -# Irrigation, Total self-supplied groundwater withdrawals, saline, in Mgal/d -# Irrigation, Total total self-supplied withdrawals, groundwater, in Mgal/d -# Irrigation, Total self-supplied surface-water withdrawals, fresh, in Mgal/d -# Wastewater Treatment reclaimed wastewater released by public wastewater facilities, in Mgal/d -# Irrigation, Total self-supplied surface-water withdrawals, saline, in Mgal/d -# Irrigation, Total total self-supplied withdrawals, surface water, in Mgal/d -# Irrigation, Total total self-supplied withdrawals, fresh, in Mgal/d -# Irrigation, Total total self-supplied withdrawals, saline, in Mgal/d -# Irrigation, Total total self-supplied withdrawals, in Mgal/d -# Irrigation, Total consumptive use, fresh, in Mgal/d -# Irrigation, Total consumptive use, saline, in Mgal/d -# Irrigation, Total total consumptive use, in Mgal/d -# Irrigation, Total conveyance loss, in Mgal/d -# Irrigation, Total sprinkler irrigation, in thousand acres -# Irrigation, Total microirrigation, in thousand acres -# Irrigation, Total surface irrigation, in thousand acres -# Irrigation, Total total irrigation, in thousand acres -# Irrigation, Total reclaimed wastewater, in Mgal/d -# Irrigation, Crop self-supplied groundwater withdrawals for crops, fresh, in Mgal/d -# Irrigation, Crop self-supplied surface-water withdrawals for crops, fresh, in Mgal/d -# Irrigation, Crop total self-supplied withdrawals for crops, fresh, in Mgal/d -# Irrigation, Crop consumptive use for crops, fresh, in Mgal/d -# Irrigation, Crop conveyance loss for crops, in Mgal/d -# Irrigation, Crop sprinkler irrigation for crops, in thousand acres -# Irrigation, Crop microirrigation for crops, in thousand acres -# Irrigation, Crop surface irrigation for crops, in thousand acres -# Irrigation, Crop total irrigation for crops, in thousand acres -# Irrigation, Crop reclaimed wastewater for crops, in Mgal/d -# Irrigation, Golf Courses self-supplied groundwater withdrawals for golf courses, fresh, in Mgal/d -# Irrigation, Golf Courses self-supplied surface-water withdrawals for golf courses, fresh, in Mgal/d -# Irrigation, Golf Courses total self-supplied withdrawals for golf courses, fresh, in Mgal/d -# Irrigation, Golf Courses consumptive use for golf courses, fresh, in Mgal/d -# Irrigation, Golf Courses conveyance loss for golf courses, in Mgal/d -# Irrigation, Golf Courses sprinkler irrigation for golf courses, in thousand acres -# Irrigation, Golf Courses microirrigation for golf courses, in thousand acres -# Irrigation, Golf Courses surface irrigation for golf courses, in thousand acres -# Irrigation, Golf Courses total irrigation for golf courses, in thousand acres -# Irrigation, Golf Courses reclaimed wastewater for golf courses, in Mgal/d -# Hydroelectric Power instream water use, in Mgal/d -# Hydroelectric Power offstream surface-water withdrawals, fresh, in Mgal/d -# Hydroelectric Power surface water self-supplied offstream withdrawals, saline, in Mgal/d -# Hydroelectric Power total offstream surface-water withdrawals in Mgal/d -# Hydroelectric Power power generated by instream use, in gigawatt-hours -# Hydroelectric Power power generated by offstream use, in gigawatt-hours -# Hydroelectric Power total power generated, in gigawatt-hours -# Hydroelectric Power number of instream facilities -# Hydroelectric Power number of offstream facilities -# Hydroelectric Power total number of facilities -# Wastewater Treatment returns by public wastewater facilities, in Mgal/d -# Wastewater Treatment number of public wastewater facilities -# Wastewater Treatment number of wastewater facilities -# Wastewater Treatment reclaimed wastewater released by wastewater facilities, in Mgal/d -# -state_cd state_name county_cd county_nm year Total Population total population of area, in thousands Public Supply population served by groundwater, in thousands Public Supply population served by surface water, in thousands Public Supply total population served, in thousands Public Supply self-supplied groundwater withdrawals, fresh, in Mgal/d Public Supply self-supplied groundwater withdrawals, saline, in Mgal/d Public Supply total self-supplied withdrawals, groundwater, in Mgal/d Public Supply self-supplied surface-water withdrawals, fresh, in Mgal/d Public Supply self-supplied surface-water withdrawals, saline, in Mgal/d Public Supply total self-supplied withdrawals, surface water, in Mgal/d Public Supply total self-supplied withdrawals, fresh, in Mgal/d Public Supply total self-supplied withdrawals, saline, in Mgal/d Public Supply total self-supplied withdrawals, total, in Mgal/d Public Supply deliveries to domestic, in Mgal/d Public Supply deliveries to commercial, in Mgal/d Public Supply deliveries to industrial, in Mgal/d Public Supply deliveries to thermoelectric, in Mgal/d Public Supply total deliveries, in Mgal/d Public Supply public use and losses, in Mgal/d Public Supply per capita use, in gallons/person/day Public Supply reclaimed wastewater, in Mgal/d Public Supply number of facilities Domestic self-supplied groundwater withdrawals, fresh, in Mgal/d Domestic self-supplied groundwater withdrawals, saline, in Mgal/d Domestic total self-supplied withdrawals, groundwater, in Mgal/d Domestic self-supplied surface-water withdrawals, fresh, in Mgal/d Domestic self-supplied surface-water withdrawals, saline, in Mgal/d Domestic total self-supplied withdrawals, surface water, in Mgal/d Domestic total self-supplied withdrawals, fresh, in Mgal/d Domestic self-supplied population, in thousands Domestic deliveries from public supply, in Mgal/d Domestic total self-supplied withdrawals, saline, in Mgal/d Domestic per capita use, public-supplied, in gallons/person/day Domestic total self-supplied withdrawals, in Mgal/d Domestic total self-supplied withdrawals plus deliveries, in Mgal/d Domestic consumptive use, fresh, in Mgal/d Domestic consumptive use, saline, in Mgal/d Domestic total consumptive use, in Mgal/d Domestic per capita use, self-supplied, in gallons/person/day Domestic reclaimed wastewater, in Mgal/d Commercial self-supplied groundwater withdrawals, fresh, in Mgal/d Commercial self-supplied groundwater withdrawals, saline, in Mgal/d Commercial total self-supplied withdrawals, groundwater, in Mgal/d Commercial self-supplied surface-water withdrawals, fresh, in Mgal/d Commercial self-supplied surface-water withdrawals, saline, in Mgal/d Commercial total self-supplied withdrawals, surface water, in Mgal/d Commercial total self-supplied withdrawals, fresh, in Mgal/d Commercial total self-supplied withdrawals, saline, in Mgal/d Commercial total self-supplied withdrawals, in Mgal/d Commercial deliveries from public supply, in Mgal/d Commercial total self-supplied withdrawals plus deliveries, in Mgal/d Commercial consumptive use, fresh, in Mgal/d Commercial consumptive use, saline, in Mgal/d Commercial total consumptive use, in Mgal/d Commercial reclaimed wastewater, in Mgal/d Industrial self-supplied groundwater withdrawals, fresh, in Mgal/d Industrial self-supplied groundwater withdrawals, saline, in Mgal/d Industrial total self-supplied withdrawals, groundwater, in Mgal/d Industrial self-supplied surface-water withdrawals, fresh, in Mgal/d Industrial self-supplied surface-water withdrawals, saline, in Mgal/d Industrial total self-supplied withdrawals, surface water, in Mgal/d Industrial total self-supplied withdrawals, fresh, in Mgal/d Industrial total self-supplied withdrawals, saline, in Mgal/d Industrial total self-supplied withdrawals, in Mgal/d Industrial deliveries from public supply, in Mgal/d Industrial total self-supplied withdrawals plus deliveries, in Mgal/d Industrial consumptive use, fresh, in Mgal/d Industrial consumptive use, saline, in Mgal/d Industrial total consumptive use, in Mgal/d Industrial reclaimed wastewater, in Mgal/d Industrial number of facilities Total Thermoelectric Power self-supplied groundwater withdrawals, fresh, in Mgal/d Total Thermoelectric Power self-supplied groundwater withdrawals, saline, in Mgal/d Total Thermoelectric Power total self-supplied withdrawals, groundwater, in Mgal/d Total Thermoelectric Power self-supplied surface-water withdrawals, fresh, in Mgal/d Total Thermoelectric Power self-supplied surface-water withdrawals, saline, in Mgal/d Total Thermoelectric Power total self-supplied withdrawals, surface water, in Mgal/d Total Thermoelectric Power total self-supplied withdrawals, fresh, in Mgal/d Total Thermoelectric Power total self-supplied withdrawals, saline, in Mgal/d Total Thermoelectric Power total self-supplied withdrawals, total, in Mgal/d Total Thermoelectric Power total self-supplied withdrawals plus deliveries, in Mgal/d Total Thermoelectric Power consumptive use, fresh, in Mgal/d Total Thermoelectric Power consumptive use, saline, in Mgal/d Total Thermoelectric Power total consumptive use, in Mgal/d Total Thermoelectric Power power generated, in gigawatt-hours Total Thermoelectric Power reclaimed wastewater, in Mgal/d Total Thermoelectric Power number of facilities Fossil-fuel Thermoelectric Power self-supplied groundwater withdrawals, fresh, in Mgal/d Fossil-fuel Thermoelectric Power self-supplied groundwater withdrawals, saline, in Mgal/d Fossil-fuel Thermoelectric Power total self-supplied withdrawals, groundwater, in Mgal/d Fossil-fuel Thermoelectric Power self-supplied surface-water withdrawals, fresh, in Mgal/d Fossil-fuel Thermoelectric Power self-supplied surface-water withdrawals, saline, in Mgal/d Fossil-fuel Thermoelectric Power total self-supplied withdrawals, surface water, in Mgal/d Fossil-fuel Thermoelectric Power total self-supplied withdrawals, fresh, in Mgal/d Fossil-fuel Thermoelectric Power total self-supplied withdrawals, saline, in Mgal/d Fossil-fuel Thermoelectric Power total self-supplied withdrawals, in Mgal/d Fossil-fuel Thermoelectric Power deliveries from public supply, in Mgal/d Fossil-fuel Thermoelectric Power total self-supplied withdrawals plus deliveries, in Mgal/d Fossil-fuel Thermoelectric Power consumptive use, fresh, in Mgal/d Fossil-fuel Thermoelectric Power consumptive use, saline, in Mgal/d Fossil-fuel Thermoelectric Power total consumptive use, in Mgal/d Fossil-fuel Thermoelectric Power power generation, in gigawatt-hours Fossil-fuel Thermoelectric Power reclaimed wastewater, in Mgal/d Fossil-fuel Thermoelectric Power number of facilities Geothermal Thermoelectric Power self-supplied groundwater withdrawals, fresh, in Mgal/d Geothermal Thermoelectric Power self-supplied groundwater withdrawals, saline, in Mgal/d Geothermal Thermoelectric Power total self-supplied withdrawals, groundwater, in Mgal/d Geothermal Thermoelectric Power self-supplied surface-water withdrawals, fresh, in Mgal/d Geothermal Thermoelectric Power self-supplied surface-water withdrawals, saline, in Mgal/d Geothermal Thermoelectric Power total self-supplied withdrawals, surface water, in Mgal/d Geothermal Thermoelectric Power total self-supplied withdrawals, fresh, in Mgal/d Geothermal Thermoelectric Power total self-supplied withdrawals, saline, in Mgal/d Geothermal Thermoelectric Power total self-supplied withdrawals, in Mgal/d Geothermal Thermoelectric Power deliveries from public supply, in Mgal/d Geothermal Thermoelectric Power total self-supplied withdrawals plus deliveries, in Mgal/d Geothermal Thermoelectric Power consumptive use, fresh, in Mgal/d Geothermal Thermoelectric Power consumptive use, saline, in Mgal/d Geothermal Thermoelectric Power total consumptive use, in Mgal/d Geothermal Thermoelectric Power power generation, in gigawatt-hours Geothermal Thermoelectric Power reclaimed wastewater, in Mgal/d Geothermal Thermoelectric Power number of facilities Nuclear Thermoelectric Power self-supplied groundwater withdrawals, fresh, in Mgal/d Nuclear Thermoelectric Power self-supplied groundwater withdrawals, saline, in Mgal/d Nuclear Thermoelectric Power total self-supplied withdrawals, groundwater, in Mgal/d Nuclear Thermoelectric Power self-supplied surface-water withdrawals, fresh, in Mgal/d Nuclear Thermoelectric Power self-supplied surface-water withdrawals, saline, in Mgal/d Nuclear Thermoelectric Power total self-supplied withdrawals, surface water, in Mgal/d Nuclear Thermoelectric Power total self-supplied withdrawals, fresh, in Mgal/d Nuclear Thermoelectric Power total self-supplied withdrawals, saline, in Mgal/d Nuclear Thermoelectric Power total self-supplied withdrawals, in Mgal/d Nuclear Thermoelectric Power deliveries from public supply, in Mgal/d Nuclear Thermoelectric Power total self-supplied withdrawals plus deliveries, in Mgal/d Nuclear Thermoelectric Power consumptive use, fresh, in Mgal/d Nuclear Thermoelectric Power consumptive use, saline, in Mgal/d Nuclear Thermoelectric Power total consumptive use, in Mgal/d Nuclear Thermoelectric Power power generation, in gigawatt-hours Nuclear Thermoelectric Power reclaimed wastewater, in Mgal/d Nuclear Thermoelectric Power number of facilities Thermoelectric Power (Once-through cooling) self-supplied groundwater withdrawals, fresh, in Mgal/d Thermoelectric Power (Once-through cooling) self-supplied groundwater withdrawals, saline, in Mgal/d Thermoelectric Power (Once-through cooling) total self-supplied withdrawals, groundwater, in Mgal/d Thermoelectric Power (Once-through cooling) self-supplied surface-water withdrawals, fresh, in Mgal/ Thermoelectric Power (Once-through cooling) self-supplied surface-water withdrawals, saline, in Mgal Thermoelectric Power (Once-through cooling) total self-supplied withdrawals, surface water, in Mgal/ Thermoelectric Power (Once-through cooling) total self-supplied withdrawals, fresh, in Mgal/d Thermoelectric Power (Once-through cooling) total self-supplied withdrawals, saline, in Mgal/d Thermoelectric Power (Once-through cooling) total self-supplied withdrawals, total, in Mgal/d Thermoelectric Power (Once-through cooling) deliveries from public supply, in Mgal/d Thermoelectric Power (Once-through cooling) total self-supplied withdrawals plus deliveries, in Mgal Thermoelectric Power (Once-through cooling) consumptive use, fresh, in Mgal/d Thermoelectric Power (Once-through cooling) consumptive use, saline, in Mgal/d Thermoelectric Power (Once-through cooling) total consumptive use, in Mgal/d Thermoelectric Power (Once-through cooling) power generated, in gigawatt-hours Thermoelectric Power (Once-through cooling) reclaimed wastewater, in Mgal/d Thermoelectric Power (Once-through cooling) number of facilities Thermoelectric Power (Closed-loop cooling) self-supplied groundwater withdrawals, fresh, in Mgal/d Thermoelectric Power (Closed-loop cooling) self-supplied groundwater withdrawals, saline, in Mgal/d Thermoelectric Power (Closed-loop cooling) total self-supplied withdrawals, groundwater, in Mgal/d Thermoelectric Power (Closed-loop cooling) self-supplied surface-water withdrawals, fresh, in Mgal/d Thermoelectric Power (Closed-loop cooling) self-supplied surface-water withdrawals, saline, in Mgal/ Thermoelectric Power (Closed-loop cooling) total self-supplied withdrawals, surface water, in Mgal/d Thermoelectric Power (Closed-loop cooling) total self-supplied withdrawals, fresh, in Mgal/d Thermoelectric Power (Closed-loop cooling) total self-supplied withdrawals, saline, in Mgal/d Thermoelectric Power (Closed-loop cooling) total self-supplied withdrawals, total, in Mgal/d Thermoelectric Power (Closed-loop cooling) deliveries from public supply, in Mgal/d Thermoelectric Power (Closed-loop cooling) total self-supplied withdrawals plus deliveries, in Mgal/ Thermoelectric Power (Closed-loop cooling) consumptive use, fresh, in Mgal/d Thermoelectric Power (Closed-loop cooling) consumptive use, saline, in Mgal/d Thermoelectric Power (Closed-loop cooling) total consumptive use, in Mgal/d Thermoelectric Power (Closed-loop cooling) power generated, in gigawatt-hours Thermoelectric Power (Closed-loop cooling) reclaimed wastewater, in Mgal/d Thermoelectric Power (Closed-loop cooling) number of facilities Mining self-supplied groundwater withdrawals, fresh, in Mgal/d Mining self-supplied groundwater withdrawals, saline, in Mgal/d Mining total self-supplied withdrawals, groundwater, in Mgal/d Mining self-supplied surface-water withdrawals, fresh, in Mgal/d Mining self-supplied surface-water withdrawals, saline, in Mgal/d Mining total self-supplied withdrawals, surface water, in Mgal/d Mining total self-supplied withdrawals, fresh, in Mgal/d Mining total self-supplied withdrawals, saline, in Mgal/d Mining total self-supplied withdrawals, in Mgal/d Mining consumptive use, fresh, in Mgal/d Mining consumptive use, saline, in Mgal/d Mining total consumptive use, in Mgal/d Mining reclaimed wastewater, in Mgal/d Livestock self-supplied groundwater withdrawals, fresh, in Mgal/d Livestock self-supplied surface-water withdrawals, fresh, in Mgal/d Livestock total self-supplied withdrawals, fresh, in Mgal/d Livestock consumptive use, fresh, in Mgal/d Livestock (Stock) self-supplied groundwater withdrawals, fresh, in Mgal/d Livestock (Stock) self-supplied groundwater withdrawals, saline, in Mgal/d Livestock (Stock) total self-supplied withdrawals, groundwater, in Mgal/d Livestock (Stock) self-supplied surface-water withdrawals, fresh, in Mgal/d Livestock (Stock) self-supplied surface-water withdrawals, saline, in Mgal/d Livestock (Stock) total self-supplied withdrawals, surface water, in Mgal/d Livestock (Stock) total self-supplied withdrawals, fresh, in Mgal/d Livestock (Stock) total self-supplied withdrawals, saline, in Mgal/d Livestock (Stock) total self-supplied withdrawals, in Mgal/d Livestock (Stock) consumptive use, fresh, in Mgal/d Livestock (Stock) consumptive use, saline, in Mgal/d Livestock (Stock) total consumptive use, in Mgal/d Livestock (Animal Specialties) self-supplied groundwater withdrawals, fresh, in Mgal/d Livestock (Animal Specialties) self-supplied groundwater withdrawals, saline, in Mgal/d Livestock (Animal Specialties) total self-supplied withdrawals, groundwater, in Mgal/d Livestock (Animal Specialties) self-supplied surface-water withdrawals, fresh, in Mgal/d Livestock (Animal Specialties) self-supplied surface-water withdrawals, saline, in Mgal/d Livestock (Animal Specialties) total self-supplied withdrawals, surface water, in Mgal/d Livestock (Animal Specialties) total self-supplied withdrawals, fresh, in Mgal/d Livestock (Animal Specialties) total self-supplied withdrawals, saline, in Mgal/d Livestock (Animal Specialties) total self-supplied withdrawals, in Mgal/d Livestock (Animal Specialties) consumptive use, fresh, in Mgal/d Livestock (Animal Specialties) consumptive use, saline, in Mgal/d Livestock (Animal Specialties) total consumptive use, in Mgal/d Aquaculture self-supplied groundwater withdrawals, fresh, in Mgal/d Aquaculture self-supplied groundwater withdrawals, saline, in Mgal/d Aquaculture total self-supplied withdrawals, groundwater, in Mgal/d Aquaculture self-supplied surface-water withdrawals, fresh, in Mgal/d Aquaculture self-supplied surface-water withdrawals, saline, in Mgal/d Aquaculture total self-supplied withdrawals, surface water, in Mgal/d Aquaculture total self-supplied withdrawals, fresh, in Mgal/d Aquaculture total self-supplied withdrawals, saline, in Mgal/d Aquaculture total self-supplied withdrawals, in Mgal/d Aquaculture consumptive use, fresh, in Mgal/d Aquaculture consumptive use, saline, in Mgal/d Aquaculture total consumptive use, in Mgal/d Irrigation, Total self-supplied groundwater withdrawals, fresh, in Mgal/d Irrigation, Total self-supplied groundwater withdrawals, saline, in Mgal/d Irrigation, Total total self-supplied withdrawals, groundwater, in Mgal/d Irrigation, Total self-supplied surface-water withdrawals, fresh, in Mgal/d Wastewater Treatment reclaimed wastewater released by public wastewater facilities, in Mgal/d Irrigation, Total self-supplied surface-water withdrawals, saline, in Mgal/d Irrigation, Total total self-supplied withdrawals, surface water, in Mgal/d Irrigation, Total total self-supplied withdrawals, fresh, in Mgal/d Irrigation, Total total self-supplied withdrawals, saline, in Mgal/d Irrigation, Total total self-supplied withdrawals, in Mgal/d Irrigation, Total consumptive use, fresh, in Mgal/d Irrigation, Total consumptive use, saline, in Mgal/d Irrigation, Total total consumptive use, in Mgal/d Irrigation, Total conveyance loss, in Mgal/d Irrigation, Total sprinkler irrigation, in thousand acres Irrigation, Total microirrigation, in thousand acres Irrigation, Total surface irrigation, in thousand acres Irrigation, Total total irrigation, in thousand acres Irrigation, Total reclaimed wastewater, in Mgal/d Irrigation, Crop self-supplied groundwater withdrawals for crops, fresh, in Mgal/d Irrigation, Crop self-supplied surface-water withdrawals for crops, fresh, in Mgal/d Irrigation, Crop total self-supplied withdrawals for crops, fresh, in Mgal/d Irrigation, Crop consumptive use for crops, fresh, in Mgal/d Irrigation, Crop conveyance loss for crops, in Mgal/d Irrigation, Crop sprinkler irrigation for crops, in thousand acres Irrigation, Crop microirrigation for crops, in thousand acres Irrigation, Crop surface irrigation for crops, in thousand acres Irrigation, Crop total irrigation for crops, in thousand acres Irrigation, Crop reclaimed wastewater for crops, in Mgal/d Irrigation, Golf Courses self-supplied groundwater withdrawals for golf courses, fresh, in Mgal/d Irrigation, Golf Courses self-supplied surface-water withdrawals for golf courses, fresh, in Mgal/d Irrigation, Golf Courses total self-supplied withdrawals for golf courses, fresh, in Mgal/d Irrigation, Golf Courses consumptive use for golf courses, fresh, in Mgal/d Irrigation, Golf Courses conveyance loss for golf courses, in Mgal/d Irrigation, Golf Courses sprinkler irrigation for golf courses, in thousand acres Irrigation, Golf Courses microirrigation for golf courses, in thousand acres Irrigation, Golf Courses surface irrigation for golf courses, in thousand acres Irrigation, Golf Courses total irrigation for golf courses, in thousand acres Irrigation, Golf Courses reclaimed wastewater for golf courses, in Mgal/d Hydroelectric Power instream water use, in Mgal/d Hydroelectric Power offstream surface-water withdrawals, fresh, in Mgal/d Hydroelectric Power surface water self-supplied offstream withdrawals, saline, in Mgal/d Hydroelectric Power total offstream surface-water withdrawals in Mgal/d Hydroelectric Power power generated by instream use, in gigawatt-hours Hydroelectric Power power generated by offstream use, in gigawatt-hours Hydroelectric Power total power generated, in gigawatt-hours Hydroelectric Power number of instream facilities Hydroelectric Power number of offstream facilities Hydroelectric Power total number of facilities Wastewater Treatment returns by public wastewater facilities, in Mgal/d Wastewater Treatment number of public wastewater facilities Wastewater Treatment number of wastewater facilities Wastewater Treatment reclaimed wastewater released by wastewater facilities, in Mgal/d -2s 40s 3s 40s 4s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s -42 Pennsylvania 003 Allegheny County 1985 1388.300 99.900 1227.030 1326.930 16.47 - - 202.30 - - 218.77 - - 95.40 19.60 12.54 0.00 127.54 - - - - 3.05 - - 0.00 - - 3.05 61.370 95.400 - 72 - 98.45 9.84 - - 50 - 0.38 - - 0.00 - - 0.38 - - 19.60 - 2.34 - - - 20.69 0.00 20.69 477.73 0.00 477.73 498.42 0.00 498.42 12.54 510.96 34.98 0.00 34.98 0.00 - 0.00 - - - - - - - - - 1.01 0.00 1.01 3202.29 - - 0.00 - - 564.02 0.00 564.02 564.02 - - 0.00 - 1.01 0.00 1.01 3202.29 - - 0.00 0.00 0.00 - - - - - - 0.00 - 0.00 0.00 0.00 0.00 - - 0.00 - - 0.00 0.00 0.00 0.00 - - 0.00 - 0.00 0.00 0.00 0.00 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 15.89 0.00 15.89 2.72 0.00 2.72 18.61 0.00 18.61 2.16 0.00 2.16 - - - - - 0.14 - - 0.01 - - 0.15 - - 0.13 - - - - - - - - - - - - - - - - - - - - - - - - - - 0.00 - - 0.04 - - - 0.04 - - 0.04 - - 0.00 0.07 - 0.00 - 0.00 - - - - - - - - - - - - - - - - - - - - 0.00 - - - 0.00 - - - - - 266.21 85 - - -42 Pennsylvania 003 Allegheny County 1990 1336.450 221.260 1079.340 1300.600 13.51 - - 206.35 - - 219.86 - - 94.83 24.25 14.59 0.00 133.67 - - - 48 1.79 - - 0.00 - - 1.79 35.850 94.830 - 73 - 96.62 9.66 - - 50 - 0.34 - - 0.86 - - 1.20 - - 24.25 - 2.54 - - - 23.87 0.00 23.87 425.27 0.00 425.27 449.14 0.00 449.14 14.59 463.73 22.18 0.00 22.18 0.00 146 0.00 - - - - - - - - - 2.92 0.00 2.92 4856.20 - 2 0.00 - - 365.73 0.00 365.73 365.73 - - 0.00 - 2.92 0.00 2.92 4856.20 - 2 0.00 0.00 0.00 - - - - - - 0.00 - 0.00 0.00 0.00 0.00 - 0 0.00 - - 0.00 0.00 0.00 0.00 - - 0.00 - 0.00 0.00 0.00 0.00 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7.30 0.00 7.30 0.00 0.00 0.00 7.30 0.00 7.30 0.20 0.00 0.20 - - - - - 0.10 - - 0.01 - - 0.11 - - 0.08 - - 0.00 - - 0.00 - - 0.00 - - 0.00 - - - - - - - - - - - - - - 0.02 - - 0.08 - - - 0.10 - - 0.10 - - 0.00 0.21 - 0.00 - 0.00 - - - - - - - - - - - - - - - - - - - - 0.00 - - - 0.00 - - 0 - - 42.51 35 - - -42 Pennsylvania 003 Allegheny County 1995 1309.820 192.110 1090.800 1282.910 14.19 0.00 14.19 195.36 0.00 195.36 209.55 0.00 209.55 81.56 33.96 11.26 0.00 126.78 82.77 163 0.00 42 1.61 0.00 1.61 0.00 0.00 0.00 1.61 26.910 81.560 0.00 64 1.61 83.17 8.32 0.00 8.32 60 - 0.06 0.00 0.06 0.75 0.00 0.75 0.81 0.00 0.81 33.96 34.77 0.75 0.00 0.75 0.00 19.53 0.00 19.53 410.26 0.00 410.26 429.79 0.00 429.79 11.26 441.05 20.93 0.00 20.93 0.01 191 0.00 0.00 0.00 255.00 0.00 255.00 255.00 0.00 255.00 255.00 2.22 0.00 2.22 3430.50 0.00 4 0.00 0.00 0.00 255.00 0.00 255.00 255.00 0.00 255.00 0.00 255.00 2.22 0.00 2.22 3430.50 0.00 4 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0.06 0.00 0.06 0.02 0.00 0.02 0.08 0.00 0.08 0.02 0.00 0.02 0.00 - - - - 0.06 0.00 0.06 0.01 0.00 0.01 0.07 0.00 0.07 0.05 0.00 0.05 0.01 0.00 0.01 0.00 0.00 0.00 0.01 0.00 0.01 0.01 0.00 0.01 - - - - - - - - - - - - 0.08 0.00 0.08 0.01 - 0.00 0.01 0.09 0.00 0.09 0.09 0.00 0.09 0.00 0.18 0.05 0.00 0.23 0.00 - - - - - - - - - - - - - - - - - - - - 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0 0 0 225.27 21 - - -42 Pennsylvania 003 Allegheny County 2000 1281.670 - - 1281.670 13.48 - - 205.45 - - 218.93 - - - - - - - - - - - 0.00 - - 0.00 - - 0.00 0.000 - - - - - - - - na - - - - - - - - - - - - - - - - 19.48 0.00 19.48 319.51 0.00 319.51 338.99 0.00 338.99 - - - - - - - 0.00 0.00 0.00 258.51 0.00 258.51 258.51 0.00 258.51 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0.00 0.00 0.00 258.51 0.00 258.51 258.51 0.00 258.51 - - - - - - - - 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 - - - - - - - - 0.06 0.00 0.06 0.02 0.00 0.02 0.08 0.00 0.08 - - - - 0.06 0.01 0.07 - - - - - - - - - - - - - - - - - - - - - - - - - 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 - - - 0.01 - - 0.13 - - - 0.14 - - - - - - 0.30 0.07 0.00 0.37 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -42 Pennsylvania 003 Allegheny County 2005 1235.841 64.264 1171.577 1235.841 0.45 0.00 0.45 191.54 0.00 191.54 191.99 0.00 191.99 69.70 - - - - - 155 - - 0.00 - - 0.00 - - 0.00 0.000 69.700 - 56 - 69.70 - - - na - - - - - - - - - - - - - - - - 0.69 0.00 0.69 257.35 0.00 257.35 258.04 0.00 258.04 - - - - - 0.00 - 0.00 0.00 0.00 289.99 0.00 289.99 289.99 0.00 289.99 - - - - 2889.72 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0.00 0.00 0.00 284.24 0.00 284.24 284.24 0.00 284.24 - - - - - 2889.72 - - 0.00 0.00 0.00 5.75 0.00 5.75 5.75 0.00 5.75 - - - - - 0.00 - - 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 - - - - 0.06 0.01 0.07 - - - - - - - - - - - - - - - - - - - - - - - - - 0.00 - - 0.00 - - 0.00 - - - - - 0.19 - 0.19 0.47 - - 0.47 0.66 - 0.66 - - - - 3.07 0.12 0.00 3.19 - 0.03 0.07 0.10 - - 0.17 0.12 0.00 0.29 0.00 0.16 0.40 0.56 - - 2.90 0.00 0.00 2.90 - - - - - - - - - - - - - - - -42 Pennsylvania 003 Allegheny County 2010 1223.348 14.480 1021.370 1035.850 0.87 0.00 0.87 185.77 0.00 185.77 186.64 0.00 186.64 62.15 - - - - - 180 - - 11.25 - - 0.00 - - 11.25 187.498 62.150 - 60 - 73.40 - - - 60 - - - - - - - - - - - - - - - - 2.43 0.00 2.43 309.89 0.00 309.89 312.32 0.00 312.32 - - - - - - - 0.00 0.00 0.00 130.50 0.00 130.50 130.50 0.00 130.50 - - - - 2022.04 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0.00 0.00 0.00 130.45 0.00 130.45 130.45 0.00 130.45 - - - - - 2022.04 0.00 - 0.00 0.00 0.00 0.05 0.00 0.05 0.05 0.00 0.05 - - - - - 0.00 - - 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 - - - - 0.04 0.01 0.05 - - - - - - - - - - - - - - - - - - - - - - - - - 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 - - - 0.20 - 0.20 0.52 - - 0.52 0.72 - 0.72 - - - - 3.10 0.13 0.00 3.23 - 0.04 0.12 0.16 - - 0.20 0.13 0.00 0.33 - 0.16 0.40 0.56 - - 2.90 0.00 0.00 2.90 - - - - - - - - - - - - - - - -42 Pennsylvania 003 Allegheny County 2015 1230.459 91.855 980.108 1071.963 8.82 0.00 8.82 169.35 0.00 169.35 178.17 0.00 178.17 63.65 - - - - - 166 - - 9.51 - - 0.00 - - 9.51 158.496 63.650 - 59 - 73.16 - - - 60 - - - - - - - - - - - - - - - - 2.67 0.00 2.67 244.34 0.00 244.34 247.01 0.00 247.01 - - - - - - - 0.19 0.00 0.19 135.45 0.00 135.45 135.64 0.00 135.64 - 2.02 0.00 2.02 5867.00 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0.19 0.00 0.19 133.24 0.00 133.24 133.43 0.00 133.43 - - 0.19 0.00 0.19 1940.00 - - 0.00 0.00 0.00 2.21 0.00 2.21 2.21 0.00 2.21 - - 1.83 0.00 1.83 3927.00 - - 0.00 0.00 0.00 0.14 0.00 0.14 0.14 0.00 0.14 - - - - 0.04 0.00 0.04 - - - - - - - - - - - - - - - - - - - - - - - - - 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 - - - 0.78 - 0.78 0.95 - - 0.95 1.73 - 1.73 1.56 - 1.56 - 3.04 0.13 0.00 3.17 - 0.04 0.03 0.07 0.06 - 0.11 0.13 0.00 0.24 - 0.74 0.92 1.66 1.50 - 2.93 0.00 0.00 2.93 - - - - - - - - - - - - - - - diff --git a/tests/data/water_use_national.txt b/tests/data/water_use_national.txt deleted file mode 100755 index 44938db..0000000 --- a/tests/data/water_use_national.txt +++ /dev/null @@ -1,60 +0,0 @@ -# -# File created on 2020-02-28 18:01:44 EST -# Refresh Date: 2018-06 -# -# U.S. Geological Survey -# -# This file contains selected WaterUse data -# -# The data you have secured from the USGS NWISWeb database may include data that have -# not received Director's approval and as such are provisional and subject to revision. -# The data are released on the condition that neither the USGS nor the United States -# Government may be held liable for any damages resulting from its authorized or -# unauthorized use. -# -# * References to sources of water-use data can be found here. - https://water.usgs.gov/watuse -# -# Search Criteria: -# Year(s) - ALL -# Area - -# County Codes(s) - ALL -# County Name(s) - -# Category Code(s) - ALL -# Category Name(s) - -# -# Columns: -# National Totals - Summary -# -# The following years are included: -# 1950 -# 1955 -# 1960 -# 1965 -# 1970 -# 1975 -# 1980 -# 1985 -# 1990 -# 1995 -# 2000 -# 2005 -# 2010 -# 2015 -# -National Totals 1950 1955 1960 1965 1970 1975 1980 1985 1990 1995 2000 2005 2010 2015 -100s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s 16s -Population, in millions 150.7 164.0 179.3 193.8 205.9 216.4 229.6 242.4 252.3 267.1 285.3 300.7 312.6 325.0 -Total withdrawals, in Bgal/d 180 240 270 310 370 420 430 397 404 398 413 410a 354a 322 -Public supply, in Bgal/d 14 17 21 24 27 29 33 36.6 38.7 40.2 43.3 44.4a 42.0 39.0 -Self-supplied domestic, in Bgal/d 2.1 2.1 2.0 2.3 2.6 2.8 3.4 3.32 3.39 3.39 3.58 3.73a 3.53a 3.26 -Livestock, in Bgal/d 1.5 1.5 1.6 1.7 1.9 2.1 2.2 2.23 2.25 2.28 2.37a 2.15 2.00 2.00 -Irrigation, in Bgal/d 89 110 110 120 130 140 150 135 134 130 139 127 116a 118 -Thermoelectric power, in Bgal/d 40 72 100 130 170 200 210 187 194 190 195 201 162a 133 -Self-supplied industrial, in Bgal/d 37 39 38 46 47 45 45 25.8 22.4a 21.6 19.5a 18.1 16.2a 14.8 -Mining, In Bgal/d b b b b b b b 3.44 4.93 3.59 4.13a 3.83 3.97a 4.00 -Commercial, in Bgal/d b b b b b b b 1.23 2.39 2.89 c c c c -Aquaculture, in Bgal/d b b b b b b b 2.24 2.24 3.27a 5.79a 8.83a 8.96a 7.55 -Total Groundwater, fresh, in Bgal/d 34 47 50 60 68 82 83 73.4 79.4 76.4a 84.3a 78.9 75.9a 82.3 -Total Groundwater, saline, in Bgal/d c 0.6 0.4 0.5 1.0 1.0 0.93 0.66 1.30a 1.11 2.47a 1.51 2.22a 2.34 -Total Surface water, fresh, in Bgal/d 140 180 190 210 250 260 280 263 255a 261 265 270 231a 198 -Total Surface water, saline, in Bgal/d 10 18 31 43 53 69 71 59.6 68.7a 59.7 61.0 59.8a 45.0 38.6 diff --git a/tests/data/waterdata_gwlevels.txt b/tests/data/waterdata_gwlevels.txt deleted file mode 100755 index e1dbb76..0000000 --- a/tests/data/waterdata_gwlevels.txt +++ /dev/null @@ -1,74 +0,0 @@ -# ---------------------------------- WARNING ---------------------------------------- -# Some of the data that you have obtained from this U.S. Geological Survey database may not -# have received Director's approval. Any such data values are qualified as provisional and -# are subject to revision. Provisional data are released on the condition that neither the -# USGS nor the United States Government may be held liable for any damages resulting from its use. -# Additional info: http://help.waterdata.usgs.gov/policies/provisional-data-statement -# -# File-format description: http://help.waterdata.usgs.gov/faq/about-tab-delimited-output -# Automated-retrieval info: http://help.waterdata.usgs.gov/faq/automated-retrievals -# -# Contact: gs-w_support_nwisweb@usgs.gov -# retrieved: 2020-02-14 17:37:13 -05:00 (natwebsdas01) -# -# US Geological Survey groundwater levels -# -# Data for the following 1 site(s) are contained in this file -# USGS 434400121275801 21S/11E-19CCC -# ----------------------------------------------------------------------------------- -# -# The fields in this file include: -# --------------------------------- -# agency_cd Agency code -# site_no USGS site number -# site_tp_cd Site type code -# lev_dt Date level measured -# lev_tm Time level measured -# lev_tz_cd Time datum -# lev_va Water-level value in feet below land surface -# sl_lev_va Water-level value in feet above specific vertical datum -# sl_datum_cd Referenced vertical datum -# lev_status_cd Status -# lev_agency_cd Measuring agency -# lev_dt_acy_cd Water-level date-time accuracy -# lev_acy_cd Water-level accuracy -# lev_src_cd Source of measurement -# lev_meth_cd Method of measurement -# lev_age_cd Water-level approval status -# -# Referenced agency codes (lev_agency_cd) included in this output -# -# USGS U.S. Geological Survey -# -# Referenced site type codes (site_tp_cd) included in this output -# -# GW Well -# -# Referenced water-level site status codes (lev_status_cd) included in this output -# -# "" The reported water-level measurement represents a static level -# -# -# Referenced water-level date-time accuracy codes (lev_dt_acy_cd) included in this output -# -# m Date is accurate to the Minute -# -# Referenced water-level accuracy codes (lev_acy_cd) included in this output -# -# 2 Water level accuracy to nearest hundredth of a foot -# -# Referenced source of measurement codes (lev_src_cd) included in this output -# -# S Measured by personnel of reporting agency. -# -# Referenced method of measurement codes (lev_meth_cd) included in this output -# -# S Steel-tape measurement. -# -# Referenced water-level approval-status codes (lev_age_cd) included in this output -# -# A Approved for publication -- Processing and review completed. -# -agency_cd site_no site_tp_cd lev_dt lev_tm lev_tz_cd lev_va sl_lev_va sl_datum_cd lev_status_cd lev_agency_cd lev_dt_acy_cd lev_acy_cd lev_src_cd lev_meth_cd lev_age_cd -5s 15s 6s 10d 5d 5s 12s 12s 10s 1s 5s 1s 1s 1s 1s 1s -USGS 434400121275801 GW 2016-10-26 09:22 PDT 28.33 USGS m 2 S S A diff --git a/tests/data/waterdata_measurements.txt b/tests/data/waterdata_measurements.txt deleted file mode 100755 index 9fd0575..0000000 --- a/tests/data/waterdata_measurements.txt +++ /dev/null @@ -1,158 +0,0 @@ -# -# U.S. Geological Survey, National Water Information System -# Surface water measurements -# -# Retrieved: 2020-02-14 18:46:42 EST (nadww01) -# -# Further descriptions of the columns and codes used can be found at: -# https://help.waterdata.usgs.gov/output-formats#streamflow_measurement_data -# -# Data for the following 1 site(s) are contained in this file -# USGS 01594440 PATUXENT RIVER NEAR BOWIE, MD -# ----------------------------------------------------------------------------------- -# -# -agency_cd site_no measurement_nu measurement_dt tz_cd q_meas_used_fg party_nm site_visit_coll_agency_cd gage_height_va discharge_va measured_rating_diff gage_va_change gage_va_time control_type_cd discharge_cd -5s 15s 6s 19d 12s 1s 12s 5s 12s 12s 12s 7s 6s 21s 15s -USGS 01594440 214 2000-02-15 10:00:00 EST Yes JJM USGS 7.02 554 Good 0.02 1.00 Clear NONE -USGS 01594440 215 2000-03-07 08:10:00 EST Yes JJM USGS 4.92 226 Good 0.00 0.80 Clear NONE -USGS 01594440 216 2000-03-22 11:25:00 EST Yes JJM/EJD USGS 11.59 3190 Good 0.11 1.10 Clear NONE -USGS 01594440 217 2000-06-06 08:35:00 EDT Yes JJM USGS 4.69 202 Good 0.02 0.80 Clear NONE -USGS 01594440 218 2000-07-18 08:20:00 EDT Yes JJM USGS 4.79 215 Good -0.02 0.70 Clear NONE -USGS 01594440 219 2000-08-25 08:35:00 EDT Yes JJM USGS 4.17 142 Good -0.01 0.50 Clear NONE -USGS 01594440 220 2000-10-04 09:05:00 EDT Yes JJM USGS 4.94 239 Good -0.01 0.80 Clear NONE -USGS 01594440 221 2000-11-09 10:05:00 EST Yes JJM USGS 4.27 136 Good -0.01 1.00 Clear NONE -USGS 01594440 222 2000-12-15 12:40:00 EST Yes JJM/JMF USGS 6.40 442 Fair -0.16 1.20 Clear NONE -USGS 01594440 223 2001-02-21 11:45:00 EST Yes JJM USGS 5.57 346 Good 0.00 1.50 Clear NONE -USGS 01594440 224 2001-03-26 10:30:00 EST Yes JJM USGS 5.24 292 Good 0.00 0.70 Clear NONE -USGS 01594440 225 2001-05-03 10:55:00 EDT Yes JJM USGS 4.52 188 Good 0.01 1.00 Clear NONE -USGS 01594440 226 2001-06-05 08:55:00 EDT Yes JJM USGS 5.34 313 Good 0.00 1.00 Clear NONE -USGS 01594440 227 2001-07-19 08:20:00 EDT Yes JJM USGS 5.29 309 Good -0.03 0.70 Clear NONE -USGS 01594440 228 2001-10-09 11:15:00 EDT Yes JJM USGS 3.90 101 Good 0.01 0.70 Clear NONE -USGS 01594440 229 2001-11-13 11:30:00 EST Yes JJM USGS 4.07 111 Good 0.00 0.80 Clear NONE -USGS 01594440 230 2002-01-11 12:00:00 EST Yes JJM USGS 4.59 190 Good 0.05 0.70 Clear NONE -USGS 01594440 231 2002-02-20 10:20:00 EST Yes JJM USGS 4.15 123 Good 0.00 0.50 Clear NONE -USGS 01594440 232 2002-03-25 10:20:00 EST Yes JJM USGS 4.60 185 Good 0.01 0.50 Clear NONE -USGS 01594440 233 2002-06-04 10:35:00 EDT Yes JJM USGS 4.09 115 Good -0.01 0.50 Clear NONE -USGS 01594440 234 2002-07-11 10:20:00 EDT Yes JJM USGS 4.17 150 Good -0.01 0.60 Clear NONE -USGS 01594440 235 2002-08-23 11:10:00 EDT Yes JJM USGS 3.53 64.6 Good 0.00 0.50 Clear NONE -USGS 01594440 236 2002-10-02 13:00:00 EDT Yes JJM USGS 3.74 92.0 Good 0.01 0.50 Clear NONE -USGS 01594440 237 2002-12-23 09:15:00 EST Yes JJM USGS 5.07 260 Good -0.01 0.80 Clear NONE -USGS 01594440 238 2003-01-27 11:45:00 EST Yes JJM USGS 4.47 176 Good 0.02 0.70 Clear NONE -USGS 01594440 239 2003-05-14 11:00:00 EDT Yes JJM USGS 5.27 304 Good 0.00 0.70 Clear NONE -USGS 01594440 240 2003-08-25 10:37:00 EDT Yes JJM USGS 4.80 239 Good 0.00 0.70 Clear NONE -USGS 01594440 241 2003-10-09 10:20:00 EDT Yes JJM USGS 4.77 211 Good 0.00 0.70 Clear NONE -USGS 01594440 242 2004-04-16 11:50:00 EDT Yes JJM/JRD USGS 8.39 1010 Good -0.02 1.10 Clear NONE -USGS 01594440 243 2004-06-03 11:40:00 EDT Yes JJM USGS 5.42 320 Good -0.01 0.80 Clear NONE -USGS 01594440 244 2004-08-24 12:35:00 EDT Yes JJM USGS 4.39 174 Good 0.00 0.80 Clear NONE -USGS 01594440 245 2004-10-05 12:45:00 EDT Yes JJM USGS 4.46 177 Good 0.00 0.70 Clear NONE -USGS 01594440 246 2004-11-18 10:35:00 EST Yes JJM USGS 4.95 223 Good 0.00 1.00 Clear NONE -USGS 01594440 247 2004-12-30 11:20:00 EST Yes JJM USGS 5.10 245 Good 0.00 0.80 Clear NONE -USGS 01594440 248 2005-03-16 10:58:00 EST Yes JJM/AJT USGS 5.38 302 Good 0.01 0.30 Clear NONE -USGS 01594440 249 2005-06-23 11:40:00 EDT Yes JJM USGS 4.79 215 Good 0.00 0.60 Clear NONE -USGS 01594440 250 2005-08-12 10:43:00 EDT Yes JJM/GLZ USGS 4.73 214 Good 0.04 0.70 Clear NONE -USGS 01594440 251 2005-10-06 13:55:00 EDT Yes JJM USGS 3.89 101 Good -0.02 1.30 Clear NONE -USGS 01594440 252 2006-01-11 12:15:00 EST Yes GLZ USGS 5.56 290 Good 0.01 1.30 Clear NONE -USGS 01594440 253 2006-06-28 11:16:00 EDT Yes AJT/GLZ USGS 13.80 5380 Fair 0.06 0.50 Clear NONE -USGS 01594440 254 2006-10-30 11:03:00 EST Yes RHP/JJK USGS 6.56 408 Good -0.04 0.50 Clear NONE -USGS 01594440 255 2006-12-18 11:28:00 EST Yes KEB/GLZ USGS 5.04 214 Fair 0.00 1.20 Clear NONE -USGS 01594440 256 2007-03-20 09:35:00 EDT Yes AJT/JPS USGS 8.11 788 Good 0.00 0.20 Clear NONE -USGS 01594440 257 2007-04-18 13:11:00 EDT Yes AJT USGS 8.88 1110 Good -0.01 0.30 Clear NONE -USGS 01594440 258 2007-06-20 13:28:00 EDT Yes JJK/KEB USGS 4.54 146 Fair -0.01 0.60 Clear NONE -USGS 01594440 259 2007-06-20 14:51:00 EDT Yes JJK/MCG USGS 4.52 153 Fair 0.00 0.50 Clear NONE -USGS 01594440 260 2007-08-28 11:54:00 EDT Yes JJK USGS 4.08 94.3 Fair -0.01 1.00 Clear NONE -USGS 01594440 261 2007-10-03 09:00:00 EDT Yes EJD/JJK USGS 3.86 67.3 Fair -0.01 0.80 Clear NONE -USGS 01594440 262 2007-11-16 09:49:00 EST Yes JJK/JRD USGS 6.61 447 Fair -0.02 0.60 Clear NONE -USGS 01594440 263 2008-02-04 10:45:00 EST Yes MCG/JJK USGS 6.33 423 Fair -0.02 0.80 Clear NONE -USGS 01594440 264 2008-04-17 11:56:00 EDT Yes KEB/MCG USGS 4.68 181 Fair 0.00 0.50 Clear NONE -USGS 01594440 265 2008-04-17 13:10:00 EDT Yes MCG/KEB USGS 4.70 180 Fair 0.00 0.70 Clear NONE -USGS 01594440 266 2008-06-02 12:00:00 EDT Yes JJK USGS 5.62 298 Fair 0.00 1.00 Clear NONE -USGS 01594440 267 2008-06-02 12:30:00 EDT Yes KEB/JPS USGS 5.62 304 Fair 0.00 Clear NONE -USGS 01594440 268 2008-08-19 12:54:00 EDT Yes JPS USGS 4.02 91.4 Fair 0.00 0.60 Clear NONE -USGS 01594440 269 2008-11-03 12:36:34 EST Yes JPS USGS 4.36 119 Fair 0.02 0.80 Clear NONE -USGS 01594440 270 2009-01-23 10:44:58 EST Yes MAC USGS 4.64 170 Good 0.00 0.80 Clear NONE -USGS 01594440 271 2009-03-05 14:04:30 EST Yes MAC USGS 4.82 184 Good 0.01 0.90 Clear NONE -USGS 01594440 272 2009-04-29 19:22:00 EDT Yes MAC USGS 4.98 224 Good 1.10 Clear NONE -USGS 01594440 273 2009-07-06 14:08:00 EDT Yes MAC/AJG USGS 4.53 166 Good 0.01 0.90 Clear NONE -USGS 01594440 274 2009-09-10 16:47:30 EDT Yes MAC USGS 4.22 126 Good 0.00 0.90 Clear NONE -USGS 01594440 275 2009-10-09 09:31:30 EDT Yes MAC USGS 4.11 103 Fair -0.01 0.90 DebrisLight NONE -USGS 01594440 276 2009-11-13 10:40:00 EST Yes keb/dpb USGS 8.79 1000 Good Unspecifed NONE -USGS 01594440 277 2009-12-10 13:10:00 EST Yes keb/jrd USGS 12.39 4090 Good -0.04 0.20 Clear NONE -USGS 01594440 278 2010-02-02 12:58:00 EST Yes keb/elb USGS 6.02 393 Good -0.02 0.40 Clear NONE -USGS 01594440 279 2010-03-25 13:26:30 EDT Yes keb/mcg USGS 7.53 702 Fair DebrisModerate NONE -USGS 01594440 280 2010-05-24 15:35:18 EDT Yes keb USGS 7.31 639 Unspecified -0.01 0.40 Clear NONE -USGS 01594440 281 2010-07-14 12:46:43 EDT Yes keb/elb USGS 8.01 949 Good 0.02 0.20 Clear NONE -USGS 01594440 282 2010-09-15 13:52:30 EDT Yes keb USGS 4.18 116 Poor DebrisLight NONE -USGS 01594440 283 2010-11-22 12:35:00 EST Yes keb USGS 4.81 190 Good Clear NONE -USGS 01594440 284 2011-01-13 13:35:00 EST Yes MCG USGS 4.62 156 Good 0.00 0.70 Clear NONE -USGS 01594440 285 2011-02-28 14:17:00 EST Yes mcg/elb USGS 6.03 385 Good 0.01 0.50 NONE -USGS 01594440 286 2011-04-26 14:27:00 EDT Yes mcg/elb USGS 7.42 655 Fair 0.00 0.50 NONE -USGS 01594440 287 2011-06-15 13:43:00 EDT Yes mcg USGS 4.36 125 Good 0.01 0.70 Clear NONE -USGS 01594440 288 2011-08-09 13:52:30 EDT Yes mcg USGS 4.59 164 Good -0.02 1.10 Clear NONE -USGS 01594440 289 2011-08-28 14:01:30 EDT Yes MAC/AJG USGS 13.36 4670 Fair 0.40 Unspecifed NONE -USGS 01594440 290C 2011-09-08 13:15:00 EDT Yes MCG/SJP USGS 21.10 16600 Poor Unspecifed NONE -USGS 01594440 291 2011-09-09 15:10:13 EDT Yes mcg/elb USGS 14.42 5930 Poor -0.22 0.70 Unspecifed NONE -USGS 01594440 292 2011-11-07 12:46:00 EST Yes mcg USGS 5.35 235 Good Clear NONE -USGS 01594440 293 2012-01-05 13:01:00 EST Yes mcg USGS 6.60 499 Good 0.40 Clear NONE -USGS 01594440 294 2012-03-05 13:49:30 EST Yes mcg USGS 6.47 448 Good 0.00 0.30 Clear NONE -USGS 01594440 295 2012-05-29 13:16:00 EDT Yes mcg USGS 4.73 166 Good 0.01 1.00 Clear NONE -USGS 01594440 296 2012-08-06 11:36:30 EDT Yes mcg USGS 4.91 202 Fair 0.09 1.00 Clear NONE -USGS 01594440 297 2012-09-17 15:05:00 EDT Yes mcg USGS 4.09 96.6 Good 0.00 Clear NONE -USGS 01594440 298 2012-10-11 11:36:00 EDT Yes mcg USGS 4.38 116 Good -0.01 Clear NONE -USGS 01594440 299 2012-12-10 11:11:03 EST Yes jjk/mcg USGS 5.40 258 Fair 0.00 0.40 Clear NONE -USGS 01594440 300 2013-01-17 11:21:30 EST Yes jjk/elb USGS 9.01 1100 Fair -0.04 0.20 Clear NONE -USGS 01594440 301 2013-02-01 11:31:57 EST Yes jkspmg USGS 12.58 3810 Fair -0.03 0.50 Clear NONE -USGS 01594440 302 2013-02-20 12:19:15 EST Yes sjp/jjk USGS 6.57 453 Good 0.01 0.20 Clear NONE -USGS 01594440 303 2013-04-10 10:44:30 EDT Yes JJK/ASE USGS 5.41 277 Fair 0.00 0.30 Clear NONE -USGS 01594440 304 2013-06-18 09:49:58 EDT Yes JJK USGS 6.01 368 Poor 0.00 0.20 Clear NONE -USGS 01594440 305 2013-06-18 10:12:18 EDT Yes JJK USGS 6.01 376 Good 0.00 0.40 Clear NONE -USGS 01594440 306 2013-08-15 11:45:11 EDT Yes JJK USGS 4.63 165 Fair 0.00 0.30 Clear NONE -USGS 01594440 307 2013-10-21 13:01:20 EDT Yes jjk/sjp USGS 5.21 236 Fair 0.00 0.30 Clear NONE -USGS 01594440 308 2013-12-06 13:09:09 EST Yes JJK USGS 5.05 200 Fair 0.00 0.20 Clear NONE -USGS 01594440 309 2014-02-20 14:35:00 EST Yes jjk/sjp USGS 9.24 1320 Fair -0.01 0.60 Clear NONE -USGS 01594440 310 2014-03-11 13:55:56 EDT Yes JJK/HK USGS 6.54 468 Fair 0.00 0.30 Clear NONE -USGS 01594440 311 2014-03-31 13:43:43 EDT Yes JJK/SJP USGS 12.67 3960 Fair 0.01 0.40 Clear NONE -USGS 01594440 312 2014-04-24 14:58:21 EDT Yes JJK USGS 6.42 465 Fair -0.01 0.40 Clear NONE -USGS 01594440 313 2014-05-01 16:48:32 EDT Yes jjk/sjp USGS 20.50 16200 Fair 0.02 0.20 Clear NONE -USGS 01594440 314 2014-06-19 12:24:43 EDT Yes JJK USGS 6.66 539 Good 0.03 0.20 Clear NONE -USGS 01594440 315 2014-08-13 11:40:31 EDT Yes JJK/SJP USGS 12.52 3880 Fair 0.07 0.30 Clear NONE -USGS 01594440 316 2014-08-18 17:13:49 EDT Yes JJK USGS 5.30 260 Fair 0.00 0.30 Clear NONE -USGS 01594440 317 2014-10-16 10:44:41 EDT Yes JJK USGS 8.64 1060 Good 0.04 0.10 Clear NONE -USGS 01594440 318 2014-12-04 12:46:00 EST Yes JJK/APG USGS 6.18 370 Good -0.01 0.20 DebrisModerate NONE -USGS 01594440 319 2014-12-04 13:35:00 EST Yes JJK/APG USGS 6.14 369 Fair -0.01 0.30 DebrisModerate NONE -USGS 01594440 320 2015-02-09 16:32:11 EST Yes JJK USGS 5.44 266 Fair 0.00 0.40 DebrisModerate NONE -USGS 01594440 321 2015-03-11 13:34:57 EDT Yes JJK/SJP USGS 10.96 2390 Good 0.03 0.30 Clear NONE -USGS 01594440 322 2015-03-23 11:22:09 EDT Yes JJK USGS 7.11 583 Fair 0.00 0.30 DebrisLight NONE -USGS 01594440 323 2015-06-11 15:31:50 EDT Yes JJK USGS 5.35 262 Fair 0.01 0.40 DebrisModerate NONE -USGS 01594440 324 2015-08-20 12:50:32 EDT Yes JJK/PLG USGS 4.57 136 Fair 0.01 0.30 Clear NONE -USGS 01594440 325 2015-10-29 12:25:00 EDT Yes PJB/SJP USGS 7.22 607 Fair -0.03 0.30 Clear NONE -USGS 01594440 326 2015-12-09 12:55:18 EST Yes JJK/PJB USGS 5.05 205 Good 0.00 0.30 Clear NONE -USGS 01594440 327 2016-02-04 14:56:34 EST Yes JJK/RMJ USGS 11.63 2900 Fair 0.01 0.30 Clear OTHR -USGS 01594440 328 2016-04-13 15:34:30 EDT Yes JJK/AMR USGS 6.17 431 Fair -0.01 0.30 Clear NONE -USGS 01594440 329 2016-06-14 15:19:19 EDT Yes JKARJK USGS 4.75 181 Fair -0.01 0.50 Clear NONE -USGS 01594440 330 2016-07-27 13:28:09 EDT Yes JJKEKAR USGS 4.53 148 Fair Clear NONE -USGS 01594440 331 2016-10-12 12:32:40 EDT Yes JKBMBM USGS 4.71 170 Poor 0.01 0.30 Clear NONE -USGS 01594440 332 2016-12-06 11:13:50 EST Yes JJK USGS 5.26 218 Fair 0.00 0.30 Clear NONE -USGS 01594440 333 2016-12-07 14:24:52 EST Yes JJK/PLG USGS 8.47 862 Poor 0.01 0.30 Clear NONE -USGS 01594440 334 2017-01-04 11:33:32 EST Yes JJK USGS 9.48 1260 Fair -0.03 0.30 DebrisModerate NONE -USGS 01594440 335 2017-02-07 13:01:26 EST Yes JJK USGS 4.90 200 Fair 0.00 0.30 Clear NONE -USGS 01594440 336 2017-04-05 11:57:45 EDT Yes JJK USGS 5.43 281 Fair 0.00 0.30 Unspecifed NONE -USGS 01594440 337 2017-04-07 13:03:25 EDT Yes JJK USGS 12.19 3490 Poor -0.01 0.40 Clear NONE -USGS 01594440 338 2017-06-27 12:45:29 EDT Yes JJK USGS 4.50 132 Poor 0.01 0.40 Clear NONE -USGS 01594440 339 2017-08-31 14:28:01 EDT Yes JJK/BDM USGS 5.01 208 Poor 0.00 0.40 Clear NONE -USGS 01594440 340 2017-10-04 13:44:39 EDT Yes JJK/JEK USGS 4.49 136 Fair 0.02 0.30 Clear NONE -USGS 01594440 341 2017-10-04 14:23:05 EDT Yes JJK/JEK USGS 4.50 134 Fair 0.00 0.50 Clear NONE -USGS 01594440 342 2017-12-19 12:32:16 EST Yes JEK/AMR/BDM USGS 4.62 145 Fair 0.00 0.28 DebrisLight NONE -USGS 01594440 343 2018-02-23 13:50:13 EST Yes JEK/ASB USGS 5.56 293 Fair Clear NONE -USGS 01594440 344 2018-04-13 13:00:35 EDT Yes JEK/ASB USGS 4.93 187 Fair 0.00 0.50 Clear NONE -USGS 01594440 345 2018-06-04 12:12:57 EDT Yes MCG/JJK USGS 14.68 6280 Fair 0.18 0.40 Clear NONE -USGS 01594440 346 2018-06-27 13:29:03 EDT Yes JEK/SMM USGS 5.69 341 Poor 0.00 0.33 Clear NONE -USGS 01594440 347 2018-10-18 13:06:56 EDT Yes JEK/RMJ USGS 6.18 395 Fair 0.00 0.25 Clear NONE -USGS 01594440 348 2019-02-15 13:28:20 EST Yes AMR/ASB USGS 8.31 908 Fair 0.00 0.30 Clear NONE -USGS 01594440 349 2019-05-07 10:48:53 EDT Yes JEK/ATO USGS 7.99 796 Good -0.02 0.40 Clear NONE -USGS 01594440 350 2019-06-19 13:19:10 EDT Yes JEK/NCG USGS 6.64 515 Good 0.10 0.33 Clear NONE -USGS 01594440 351 2019-07-09 10:11:53 EDT Yes BDM/SJQ USGS 10.91 2140 Fair -0.01 0.27 Clear NONE -USGS 01594440 352 2019-08-15 12:58:13 EDT Yes JEK/KMN USGS 4.70 161 Fair 0.01 0.50 Clear NONE -USGS 01594440 353 2019-10-09 13:47:39 EDT Yes JEK/KMN USGS 4.38 112 Poor 0.02 0.50 Clear NONE -USGS 01594440 354 2019-12-13 12:09:37 EST Yes JEK/DTR USGS 5.47 268 Poor 0.01 0.50 Clear NONE -USGS 01594440 355 2020-02-06 12:23:06 EST Yes JEK/TRB USGS 6.23 398 Good 0.01 0.25 Clear NONE diff --git a/tests/data/waterdata_pmcodes.txt b/tests/data/waterdata_pmcodes.txt deleted file mode 100755 index 2dce370..0000000 --- a/tests/data/waterdata_pmcodes.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# National Water Information System -# 2022/06/08 -# -# -# Date Retrieved: USGS Water Data for the Nation Help System -# -parameter_cd group parm_nm epa_equivalence result_statistical_basis result_time_basis result_weight_basis result_particle_size_basis result_sample_fraction result_temperature_basis CASRN SRSName parm_unit -5s 8s 58s 5s 0s 0s 0s 0s 9s 0s 10s 7s 9s -00618 Nutrient Nitrate, water, filtered, milligrams per liter as nitrogen Agree Dissolved 14797-55-8 Nitrate mg/l as N diff --git a/tests/nwis_test.py b/tests/nwis_test.py index 375284d..07f24ac 100644 --- a/tests/nwis_test.py +++ b/tests/nwis_test.py @@ -12,7 +12,6 @@ get_record, preformat_peaks_response, what_sites, - get_gwlevels ) START_DATE = "2018-01-24" @@ -22,22 +21,6 @@ SITENO_COL = "site_no" -def test_measurements_service(): - """Test measurement service""" - start = "2018-01-24" - end = "2018-01-25" - service = "measurements" - site = "03339000" - df = get_record(site, start, end, service=service) - return df - - -def test_measurements_service_answer(): - df = test_measurements_service() - # check parsing - assert df.iloc[0]["measurement_nu"] == 801 - - def test_iv_service(): """Unit test of instantaneous value service""" start = START_DATE @@ -69,91 +52,10 @@ def test_preformat_peaks_response(): assert df["datetime"].isna().sum() == 0 -@pytest.mark.parametrize("site_input_type_list", [True, False]) -def test_get_record_site_value_types(site_input_type_list): - """Test that get_record method for valid input types for the 'sites' parameter.""" - start = "2018-01-24" - end = "2018-01-25" - service = "measurements" - site = "03339000" - if site_input_type_list: - sites = [site] - else: - sites = site - df = get_record(sites=sites, start=start, end=end, service=service) - assert df.iloc[0]["measurement_nu"] == 801 - - if __name__ == "__main__": - test_measurements_service_answer() test_iv_service_answer() -# tests using real queries to USGS webservices -# these specific queries represent some edge-cases and the tests to address -# incomplete date-time information - - -def test_inc_date_01(): - """Test based on GitHub Issue #47 - lack of timestamp for measurement.""" - site = "403451073585601" - # make call expecting a warning to be thrown due to incomplete dates - with pytest.warns(UserWarning): - df = get_record(site, "1980-01-01", "1990-01-01", service="gwlevels") - # assert that there are indeed incomplete dates - assert any(pd.isna(df.index) == True) - # assert that the datetime index is there - assert df.index.name == "datetime" - # make call without defining a datetime index and check that it isn't there - df2 = get_record( - site, "1980-01-01", "1990-01-01", service="gwlevels", datetime_index=False - ) - # assert shape of both dataframes is the same (contain the same data) - assert df.shape == df2.shape - # assert that the datetime index is not there - assert df2.index.name != "datetime" - - -def test_inc_date_02(): - """Test based on GitHub Issue #47 - lack of month, day, or time.""" - site = "180049066381200" - # make call expecting a warning to be thrown due to incomplete dates - with pytest.warns(UserWarning): - df = get_record(site, "1900-01-01", "2013-01-01", service="gwlevels") - # assert that there are indeed incomplete dates - assert any(pd.isna(df.index) == True) - # assert that the datetime index is there - assert df.index.name == "datetime" - # make call without defining a datetime index and check that it isn't there - df2 = get_record( - site, "1900-01-01", "2013-01-01", service="gwlevels", datetime_index=False - ) - # assert shape of both dataframes is the same (contain the same data) - assert df.shape == df2.shape - # assert that the datetime index is not there - assert df2.index.name != "datetime" - - -def test_inc_date_03(): - """Test based on GitHub Issue #47 - lack of day, and times.""" - site = "290000095192602" - # make call expecting a warning to be thrown due to incomplete dates - with pytest.warns(UserWarning): - df = get_record(site, "1975-01-01", "2000-01-01", service="gwlevels") - # assert that there are indeed incomplete dates - assert any(pd.isna(df.index) == True) - # assert that the datetime index is there - assert df.index.name == "datetime" - # make call without defining a datetime index and check that it isn't there - df2 = get_record( - site, "1975-01-01", "2000-01-01", service="gwlevels", datetime_index=False - ) - # assert shape of both dataframes is the same (contain the same data) - assert df.shape == df2.shape - # assert that the datetime index is not there - assert df2.index.name != "datetime" - - class TestTZ: """Tests relating to GitHub Issue #60.""" @@ -298,24 +200,5 @@ def test_set_metadata_info_countyCd(self): # assert that site_info is implemented assert md.site_info -class Testgwlevels: - """Tests of get_gwlevels function - - Notes - ----- - - gwlevels moved to a new web service endpoint in 2024 - - The new endpoint has quirks and doesn't recognize the - parameterCd kwarg advertisted by the service. - """ - def test_gwlevels_one_parameterCd(self): - pcode = "72019" - df,_ = get_gwlevels(sites="434400121275801", start = "2010-01-01", parameterCd=pcode) - assert set(df['parameter_cd'].unique().tolist()) == set([pcode]) - - def test_gwlevels_two_parameterCds(self): - pcode = ["72019", "62610"] - df,_ = get_gwlevels(sites="434400121275801", start = "2010-01-01", parameterCd=pcode) - assert set(df['parameter_cd'].unique().tolist()) == set(pcode) - diff --git a/tests/waterservices_test.py b/tests/waterservices_test.py index 449650a..1581cc8 100755 --- a/tests/waterservices_test.py +++ b/tests/waterservices_test.py @@ -4,17 +4,13 @@ from pandas import DataFrame from dataretrieval.nwis import ( - get_discharge_measurements, get_discharge_peaks, get_dv, - get_gwlevels, get_info, get_iv, - get_pmcodes, get_ratings, get_record, get_stats, - get_water_use, query_waterdata, query_waterservices, what_sites, @@ -202,45 +198,6 @@ def test_get_info(requests_mock): assert_metadata(requests_mock, request_url, md, site, [parameter_cd], format) -def test_get_gwlevels(requests_mock): - """Tests get_gwlevels method correctly generates the request url and returns the result in a DataFrame.""" - format = "rdb" - site = "434400121275801" - request_url = ( - "https://nwis.waterdata.usgs.gov/nwis/gwlevels?format={}&begin_date=1851-01-01" - "&site_no={}".format(format, site) - ) - response_file_path = "tests/data/waterdata_gwlevels.txt" - mock_request(requests_mock, request_url, response_file_path) - df, md = get_gwlevels(sites=site) - if not isinstance(df, DataFrame): - raise AssertionError(f"{type(df)} is not DataFrame base class type") - - assert df.size == 16 - assert_metadata(requests_mock, request_url, md, site, None, format) - - -@pytest.mark.parametrize("site_input_type_list", [True, False]) -def test_get_gwlevels_site_value_types(requests_mock, site_input_type_list): - """Tests get_gwlevels method for valid input types for the 'sites' parameter.""" - _format = "rdb" - site = "434400121275801" - request_url = ( - "https://nwis.waterdata.usgs.gov/nwis/gwlevels?format={}&begin_date=1851-01-01" - "&site_no={}".format(_format, site) - ) - response_file_path = "tests/data/waterdata_gwlevels.txt" - mock_request(requests_mock, request_url, response_file_path) - if site_input_type_list: - sites = [site] - else: - sites = site - df, md = get_gwlevels(sites=sites) - if not isinstance(df, DataFrame): - raise AssertionError(f"{type(df)} is not DataFrame base class type") - assert df.size == 16 - - def test_get_discharge_peaks(requests_mock): """Tests get_discharge_peaks method correctly generates the request url and returns the result in a DataFrame""" format = "rdb" @@ -283,187 +240,6 @@ def test_get_discharge_peaks_sites_value_types(requests_mock, site_input_type_li assert df.size == 240 -def test_get_discharge_measurements(requests_mock): - """Tests get_discharge_measurements method correctly generates the request url and returns the result in a - DataFrame""" - format = "rdb" - site = "01594440" - request_url = ( - "https://nwis.waterdata.usgs.gov/nwis/measurements?site_no={}" - "&begin_date=2000-02-14&end_date=2020-02-15&format={}".format(site, format) - ) - response_file_path = "tests/data/waterdata_measurements.txt" - mock_request(requests_mock, request_url, response_file_path) - df, md = get_discharge_measurements( - sites=[site], start="2000-02-14", end="2020-02-15" - ) - if not isinstance(df, DataFrame): - raise AssertionError(f"{type(df)} is not DataFrame base class type") - - assert df.size == 2130 - assert_metadata(requests_mock, request_url, md, site, None, format) - - -@pytest.mark.parametrize("site_input_type_list", [True, False]) -def test_get_discharge_measurements_sites_value_types( - requests_mock, site_input_type_list -): - """Tests get_discharge_measurements method for valid input types for 'sites' parameter""" - format = "rdb" - site = "01594440" - request_url = ( - "https://nwis.waterdata.usgs.gov/nwis/measurements?site_no={}" - "&begin_date=2000-02-14&end_date=2020-02-15&format={}".format(site, format) - ) - response_file_path = "tests/data/waterdata_measurements.txt" - mock_request(requests_mock, request_url, response_file_path) - if site_input_type_list: - sites = [site] - else: - sites = site - df, md = get_discharge_measurements( - sites=sites, start="2000-02-14", end="2020-02-15" - ) - if not isinstance(df, DataFrame): - raise AssertionError(f"{type(df)} is not DataFrame base class type") - assert df.size == 2130 - - -def test_get_pmcodes(requests_mock): - """Tests get_pmcodes method correctly generates the request url and returns the result in a - DataFrame""" - format = "rdb" - request_url = "https://help.waterdata.usgs.gov/code/parameter_cd_nm_query?fmt=rdb&parm_nm_cd=%2500618%25" - response_file_path = "tests/data/waterdata_pmcodes.txt" - mock_request(requests_mock, request_url, response_file_path) - df, md = get_pmcodes(parameterCd="00618") - if not isinstance(df, DataFrame): - raise AssertionError(f"{type(df)} is not DataFrame base class type") - assert df.size == 13 - assert_metadata(requests_mock, request_url, md, None, None, format) - - -@pytest.mark.parametrize("parameterCd_input_type_list", [True, False]) -def test_get_pmcodes_parameterCd_value_types( - requests_mock, parameterCd_input_type_list -): - """Tests get_pmcodes method for valid input types for the 'parameterCd' parameter""" - _format = "rdb" - parameterCd = "00618" - request_url = "https://help.waterdata.usgs.gov/code/parameter_cd_nm_query?fmt={}&parm_nm_cd=%25{}%25" - request_url = request_url.format(_format, parameterCd) - response_file_path = "tests/data/waterdata_pmcodes.txt" - mock_request(requests_mock, request_url, response_file_path) - if parameterCd_input_type_list: - parameterCd = [parameterCd] - else: - parameterCd = parameterCd - df, md = get_pmcodes(parameterCd=parameterCd) - if not isinstance(df, DataFrame): - raise AssertionError(f"{type(df)} is not DataFrame base class type") - assert df.size == 13 - - -def test_get_water_use_national(requests_mock): - """Tests get_discharge_measurements method correctly generates the request url and returns the result in a - DataFrame""" - format = "rdb" - request_url = ( - "https://nwis.waterdata.usgs.gov/nwis/water_use?rdb_compression=value&format={}&wu_year=ALL" - "&wu_category=ALL&wu_county=ALL".format(format) - ) - response_file_path = "tests/data/water_use_national.txt" - mock_request(requests_mock, request_url, response_file_path) - df, md = get_water_use() - if not isinstance(df, DataFrame): - raise AssertionError(f"{type(df)} is not DataFrame base class type") - assert df.size == 225 - assert_metadata(requests_mock, request_url, md, None, None, format) - - -@pytest.mark.parametrize("year_input_type_list", [True, False]) -def test_get_water_use_national_year_value_types(requests_mock, year_input_type_list): - """Tests get_water_use method for valid input types for the 'years' parameter""" - _format = "rdb" - year = "ALL" - request_url = ( - "https://nwis.waterdata.usgs.gov/nwis/water_use?rdb_compression=value&format={}&wu_year=ALL" - "&wu_category=ALL&wu_county=ALL".format(_format) - ) - response_file_path = "tests/data/water_use_national.txt" - mock_request(requests_mock, request_url, response_file_path) - if year_input_type_list: - years = [year] - else: - years = year - df, md = get_water_use(years=years) - assert type(df) is DataFrame - assert df.size == 225 - - -@pytest.mark.parametrize("county_input_type_list", [True, False]) -def test_get_water_use_national_county_value_types( - requests_mock, county_input_type_list -): - """Tests get_water_use method for valid input types for the 'counties' parameter""" - _format = "rdb" - county = "ALL" - request_url = ( - "https://nwis.waterdata.usgs.gov/nwis/water_use?rdb_compression=value&format={}&wu_year=ALL" - "&wu_category=ALL&wu_county=ALL".format(_format) - ) - response_file_path = "tests/data/water_use_national.txt" - mock_request(requests_mock, request_url, response_file_path) - if county_input_type_list: - counties = [county] - else: - counties = county - df, md = get_water_use(counties=counties) - if not isinstance(df, DataFrame): - raise AssertionError(f"{type(df)} is not DataFrame base class type") - assert df.size == 225 - - -@pytest.mark.parametrize("category_input_type_list", [True, False]) -def test_get_water_use_national_county_value_types( - requests_mock, category_input_type_list -): - """Tests get_water_use method for valid input types for the 'categories' parameter""" - _format = "rdb" - category = "ALL" - request_url = ( - "https://nwis.waterdata.usgs.gov/nwis/water_use?rdb_compression=value&format={}&wu_year=ALL" - "&wu_category=ALL&wu_county=ALL".format(_format) - ) - response_file_path = "tests/data/water_use_national.txt" - mock_request(requests_mock, request_url, response_file_path) - if category_input_type_list: - categories = [category] - else: - categories = category - df, md = get_water_use(categories=categories) - if not isinstance(df, DataFrame): - raise AssertionError(f"{type(df)} is not DataFrame base class type") - assert df.size == 225 - - -def test_get_water_use_allegheny(requests_mock): - """Tests get_discharge_measurements method correctly generates the request url and returns the result in a - DataFrame""" - format = "rdb" - request_url = ( - "https://nwis.waterdata.usgs.gov/PA/nwis/water_use?rdb_compression=value&format=rdb&wu_year=ALL" - "&wu_category=ALL&wu_county=003&wu_area=county" - ) - response_file_path = "tests/data/water_use_allegheny.txt" - mock_request(requests_mock, request_url, response_file_path) - df, md = get_water_use(state="PA", counties="003") - if not isinstance(df, DataFrame): - raise AssertionError(f"{type(df)} is not DataFrame base class type") - assert df.size == 1981 - assert_metadata(requests_mock, request_url, md, None, None, format) - - def test_get_ratings_validation(): """Tests get_ratings method correctly generates the request url and returns the result in a DataFrame""" site = "01594440" @@ -584,17 +360,6 @@ def assert_metadata(requests_mock, request_url, md, site, parameter_cd, format): site_info, _ = md.site_info if not isinstance(site_info, DataFrame): raise AssertionError(f"{type(site_info)} is not DataFrame base class type") - if parameter_cd is None: - assert md.variable_info is None - else: - for param in parameter_cd: - pcode_request_url = "https://help.waterdata.usgs.gov/code/parameter_cd_nm_query?fmt=rdb&parm_nm_cd=%25{}%25".format( - param - ) - with open("tests/data/waterdata_pmcodes.txt") as text: - requests_mock.get(pcode_request_url, text=text.read()) - variable_info, _ = md.variable_info - assert type(variable_info) is DataFrame if format == "rdb": assert md.comment is not None