How are you collaborating with others to accomplish this?
Why is the Bureau doing this?
Does the NMWDI take the data?
What is an API and how can I use it?
Imagine you want a breakfast burrito. You go to your favorite New Mexican restaurant, check the menu, and place the order with a waiter. The waiter takes your order to the kitchen, where the cook assembles your breakfast burrito. The waiter then brings your food to your table. In this example, the menu is your application. You are sending a request by placing your order with the waiter. An API, like the waiter, is an intermediary who takes your request to the kitchen — the back-end system. You then get the breakfast burrito, or the response from the kitchen through the waiter, or the API.
In the context of NM Water Data, an API allows data from different agencies to be truly interoperable because it enables automated retrieval of data using a program rather than manually navigating websites. This could be especially useful whenever ongoing access to data is required. For example, a person or organization might have a streamflow model that requires input data from NM Water Data. Each time the model is run, the required inputs are automatically downloaded and used without the need for manually downloading data through the data catalog. Not only is automated retrieval easier, it reduces the potential for human error associated with a manual workflow.
In addition to facilitating data access, APIs empower users to create programmatic tools for rapidly searching and parsing datasets. Storing data is also simplified as an API can be used to load data without directly interacting with an underlying database. For example, development of a mobile app used to aggregate water data from multiple agencies is greatly simplified through the use of APIs.
NM Water Data uses the Open Geospatial Consortium ‘SensorThings’ API standard. This standard provides a powerful interface for accessing a variety of ground water data from multiple state agencies. This unified approach makes data sharing robust and transparent.
Using an API requires some technical knowledge, but should be approachable by anyone with some programming experience. We are in the process of developing in-depth resources for accessing NM Water Data SensorThings APIs. You can visit our developer resources page for more information.
What is a “SensorThings” API?
NM Water Data has implemented a “SensorThings” API which follows a structure specified by the Open Geospatial Consortium (https://www.ogc.org/standards/sensorthings). This is a relatively new standard, but enables sophisticated querying of data and has built in functions for filtering and sorting output. We are in the process of developing in-depth resources for accessing NM Water Data SensorThings APIs. Contact us for more information.
Difference between Static and Dynamic data?
Static data is data that does not change over time. All of the data uploaded to the NMWDI data catalog and not a link to an external site or API is static, though external sites and APIs can hold static data as well. The CSV, XML, PDF, JSON, etc files are data sets that are uploaded to the catalog at one point in time and do not constantly change. An example of static data could be site locations or well construction data, which typically does not change much or at all. Static data may also be one time sampling events as part of a review or study that is not expected to continue.
Dynamic data on the other hand, is data that is periodically updated or appended. In the case of NMWDI, this is often a time series data set that is added to daily or other periods of time. The data set grows as new data is made available, and the previous data does not change. An example would be the addition of new water level measurements for a well. From the data catalog, these are available as links to external sites including the USGS NM Lakes and Reservoirs Data and NOAA Monthly Soil Moisture Measurements, which have dynamic data updated daily and monthly respectively. These external sites have dynamic data displayed on their site and many also have a public API for automated querying and downloading of the data. Many of the links to external sites only host static data that is not periodically updated including the NMED Wetlands Program and OSE Hydrographic Survey and often this static data can be accessed through their public APIs as well.
Another NMWDI resource that hosts dynamic as well as static data provided from various agencies is the SensorThings API. For example, dynamic daily groundwater level data for the City of Albuquerque is available through the SensorThings API. Currently, users can either view this data directly in a web browser, though this can be confusing to users who do not understand the SensorThings API structure. Users who have some programming knowledge can also query this data with the Python programming language by following this tutorial. Development is currently underway for applications that more easily allow general users to query and visualize this data.