Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the Water Quality Portal summary services #445

Closed
jkreft-usgs opened this issue Sep 18, 2018 · 2 comments
Closed

Support the Water Quality Portal summary services #445

jkreft-usgs opened this issue Sep 18, 2018 · 2 comments

Comments

@jkreft-usgs
Copy link

The Water Quality Portal now has summary services!

Currently, there are station summary services that allow you to see details at the characteristicgroup level, where you can query by the various site level parameters:

For Example, here is a huc12 query for data collected in the last 5 years:

https://www.waterqualitydata.us/data/summary/monitoringLocation/search?huc=020700080901&mimeType=geojson&summaryYears=5

the summaryYears parameter allows for "1","5", or "all"

and here is the response:

{
	"type": "FeatureCollection",
	"features": [{
		"type": "Feature",
		"geometry": {
			"type": "Point",
			"coordinates": [-77.5442000, 38.9594000]
		},
		"properties": {
			"ProviderName": "STORET",
			"OrganizationIdentifier": "21VASWCB",
			"OrganizationFormalName": "VIRGINIA DEPARTMENT OF ENVIRONMENTAL QUALITY",
			"MonitoringLocationIdentifier": "21VASWCB-1ABRB015.38",
			"MonitoringLocationName": "Rt. # 621 (Evergreen Mills Rd)",
			"MonitoringLocationTypeName": "River/Stream",
			"ResolvedMonitoringLocationTypeName": "Stream",
			"HUCEightDigitCode": "02070008",
			"siteUrl": "https://www.waterqualitydata.us/data/provider/STORET/21VASWCB/21VASWCB-1ABRB015.38/",
			"activityCount": "5",
			"resultCount": "28",
			"StateName": "Virginia",
			"CountyName": "Loudoun County",
			"characteristicGroupResultCount": {
				"Inorganics, Major, Non-metals": 2,
				"Microbiological": 1,
				"Nutrient": 6,
				"Physical": 19
			}
		}
	}, {
		"type": "Feature",
		"geometry": {
			"type": "Point",
			"coordinates": [-77.5356000, 38.9525000]
		},
		"properties": {
			"ProviderName": "STORET",
			"OrganizationIdentifier": "21VASWCB",
			"OrganizationFormalName": "VIRGINIA DEPARTMENT OF ENVIRONMENTAL QUALITY",
			"MonitoringLocationIdentifier": "21VASWCB-1ASOR000.59",
			"MonitoringLocationName": "Rt. # 621  (Evergreen Mills Rd)",
			"MonitoringLocationTypeName": "River/Stream",
			"ResolvedMonitoringLocationTypeName": "Stream",
			"HUCEightDigitCode": "02070008",
			"siteUrl": "https://www.waterqualitydata.us/data/provider/STORET/21VASWCB/21VASWCB-1ASOR000.59/",
			"activityCount": "5",
			"resultCount": "22",
			"StateName": "Virginia",
			"CountyName": "Loudoun County",
			"characteristicGroupResultCount": {
				"Microbiological": 1,
				"Nutrient": 6,
				"Physical": 15
			}
		}
	}, {
		"type": "Feature",
		"geometry": {
			"type": "Point",
			"coordinates": [-77.5344000, 38.9517000]
		},
		"properties": {
			"ProviderName": "STORET",
			"OrganizationIdentifier": "21VASWCB",
			"OrganizationFormalName": "VIRGINIA DEPARTMENT OF ENVIRONMENTAL QUALITY",
			"MonitoringLocationIdentifier": "21VASWCB-VAG406014-001",
			"MonitoringLocationName": "Evergreen Store",
			"MonitoringLocationTypeName": "Facility Industrial",
			"ResolvedMonitoringLocationTypeName": "Facility",
			"HUCEightDigitCode": "02070008",
			"siteUrl": "https://www.waterqualitydata.us/data/provider/STORET/21VASWCB/21VASWCB-VAG406014-001/",
			"activityCount": "2",
			"resultCount": "5",
			"StateName": "Virginia",
			"CountyName": "Loudoun County",
			"characteristicGroupResultCount": {
				"Nutrient": 5
			}
		}
	}]
}
@jkreft-usgs
Copy link
Author

There are additional summary services that are even more helpful now. Specifically, there is a CSV output version of the site summary service that allows for a simple way to see available data over time.

An example url for a single site for the last 5 calendar years (so since this comment is being written in February of 2019, there is whatever was collected in 2019 plus 2015-2018 inclusive) is here:

https://www.waterqualitydata.us/data/summary/monitoringlocation/search?mimeType=csv&zip=yes&siteid=USGS-07144100&summaryYears=5&dataProfile=periodOfRecord

For an entire state, the URL would look like this:
https://www.waterqualitydata.us/data/summary/monitoringLocation/search?mimeType=csv&zip=yes&statecode=US%3A34&dataProfile=periodOfRecord

The columns that are available are:

  • Provider
  • MonitoringLocationIdentifier
  • YearSummarized
  • CharacteristicType
  • CharacteristicName
  • ActivityCount
  • ResultCount
  • LastResultSubmittedDate
  • OrganizationIdentifier
  • OrganizationFormalName
  • MonitoringLocationName
  • MonitoringLocationTypeName
  • ResolvedMonitoringLocationTypeName
  • HUCEightDigitCode
  • MonitoringLocationUrl
  • CountyName
  • StateName
  • MonitoringLocationLatitude
  • MonitoringLocationLongitude

There is also swagger documentation available, be sure to choose the 'WQP' link in the dropdown at the top of the page.
image

If you so desired, you could get this information for the entire WQP all at once, which would allow you to generate figures one or two in Read et al. with a single web service call:

https://www.waterqualitydata.us/data/summary/monitoringLocation/search?mimeType=csv&zip=yes&dataProfile=periodOfRecord
image

@ldecicco-USGS
Copy link
Collaborator

I think we got all this awhile ago. If there's something we're missing, let's make individual Issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

2 participants