SGU Client Documentation#

A modern Python client library for accessing Geological Survey of Sweden (SGU) groundwater data APIs with type safety and pandas integration.

Installation#

Install using pip:

pip install sgu-client

For pandas support:

pip install "sgu-client[recommended]"

Quick Example#

# import the SGU Client
from sgu_client import SGUClient

# initialize the client
client = SGUClient()

# get groundwater monitoring stations in southern Sweden
stations = client.levels.observed.get_stations(
    bbox=[12.0, 55.0, 16.0, 58.0],
    limit=50
)

# get recent measurements with date filtering
measurements = client.levels.observed.get_measurements_by_name(
    "95_2",
    datetime="2024-10-01/2025-09-31",
)

# convert to pandas Series (requires pandas)
s = measurements.to_series()
s.plot()

Documentation#