Open Data
All open data collected by this site from various data sources is aggregated and shared as detailed below.
NOTE: Some data displayed on Open Water Data is not open data, so we are not allowed to share that data. We strive to find open data sources whenever possible.
CSV & JSON
The easiest way to access open data from Open Water Data is per location from CSV and JSON file downloads.
To download CSV or JSON file:
- Visit the Open Water Data Home Page.
- Find and double-click the desired location pin on the map.
- Click the light blue down-arrow to the right of the desired data.
- Click the CSV or JS (JSON) icon.
NOTE: You can copy the web address of the download. Right-click or (long-tap on touch devices) the CSV or JS icon and select "Copy Link" or similar in your web browser. Then, you can paste the web address.
CSV
CSV downloads can be opened in Microsoft Excel and other spreadsheet apps or any text editor.
The following columns are provided when available.
- OID - The Object ID, which is a simple numeric ID that uniquely identifies this water sample or other measurement from all others on the Open Water Data website.
- UUID - A Universally Unique ID that uniquely identifies this water sample or other measurement from all others on the Open Water Data website. While longer than the OID, it is more useful as a unique ID that can be used across many different systems that may share or sync the same data.
- CollectionTime - When the measurement was collected, which is often earlier than when it is published.
- Result - The value measured.
- DataSource - The name of the source of the data. This is typically the title of the website or organization where the data was originally downloaded from.
- Collector - The name of a person, people or organization who collected the specific sample.
JSON
JSON downloads are better suited for software applications to import or process. JSON downloads use cJSON format and the main object property names and values in the "contents" array match the CSV columns listed above.
COMAND Web Services
COMAND Web Services provide API access for research and software applications. Data can be queried and accessed across locations and measurements.
For example, the following query will get all geomean e. coli results greater than 200mpn in 2023 for beaches in the Greater Toronto Area when there was less than 2mm of precipitation over the previous 48 hours.
SELECT Label,
@(WaterSites)WaterSample.CollectionTime AS CollectionTime,
@(WaterSites)WaterSample.Result AS EcoliResult,
SUM(@(WaterSites)DataSample.Result) AS PrecipPrevious48Hours
FROM WaterSite
WHERE City IN ('Toronto','Etobicoke','Scarborough','Mississauga')
AND @(WaterSites)WaterSample.CollectionTime BETWEEN '2023-01-01 00:00:00' AND '2024-01-01 00:00:00'
AND @(WaterSites)WaterSample.Measurement='ecoli'
AND @(WaterSites)WaterSample.Units='mpn'
AND @(WaterSites)WaterSample.WaterSampleType.Kind='geomean'
AND @(WaterSites)WaterSample.Result>200
AND @(WaterSites)DataSample.CollectionTime BETWEEN DATE_SUB(@(WaterSites)WaterSample.CollectionTime, INTERVAL 48 HOUR) AND @(WaterSites)WaterSample.CollectionTime
AND @(WaterSites)DataSample.Measurement='Precipitation'
GROUP BY OID, @(WaterSites)WaterSample.OID
HAVING SUM(@(WaterSites)DataSample.Result)<2
ORDER BY CollectionTime
The query will return JSON results like the following:
{
"type": "COMAND",
"version": "1.0",
"contents": [
{
"Label": "Hanlan's Point Beach",
"CollectionTime": "2023-06-14 00:00:00",
"EcoliResult": 215,
"PrecipPrevious48Hours": 1.08
},
{
"Label": "Cherry Beach",
"CollectionTime": "2023-06-15 00:00:00",
"EcoliResult": 277,
"PrecipPrevious48Hours": 0
},
{
"Label": "Ontario Place West Beach",
"CollectionTime": "2023-06-15 00:00:00",
"EcoliResult": 375.4,
"PrecipPrevious48Hours": 0.23
}
]
}
More information can be found in the official documentation for COMAND Web Services.
A secure token is required to access COMAND Web Services. To request a secure token, please fill out the API Access Request Form.