Developer Resources

Weathertower Data API

Retrieve real-time and historical weather observations from the Carleton Weather Tower. The API endpoints serve data in JSON, CSV, Plain Text, and Excel formats.

Available Endpoints
Endpoint Method Formats Description
/api/weather/ GET json, csv, plaintext, xlsx Historical/tabular query over range.
/api/all_current/ GET json, csv, plaintext, xlsx All current weather values at a selected time.
/api/additional_data/ GET json, csv, plaintext, xlsx Secondary/computed metrics at a selected time.
/api/instrument_data/ GET json, csv, plaintext, xlsx Raw instrument outputs at a selected time.
Query Parameters
fields

Database field codes to retrieve (Multi-value parameter)

E.g., fields=ambient_temp_LM335&fields=RH_Precon

datetimes

A datetime range formatted as: MM/DD/YYYY hh:mm AM/PM - MM/DD/YYYY hh:mm AM/PM

E.g., datetimes=06/26/2026 10:00 AM - 06/26/2026 10:59 AM

interval

Spacing in minutes between rows (integer)

E.g., interval=10

form_datetime

Target datetime for single-datetime metrics (ISO format: YYYY-MM-DDTHH:MM)

E.g., form_datetime=2026-06-26T11:41

format

Output response serialization

One of: json (default), csv, plaintext (tab-separated values), or xlsx.

Example Request URLs

# Query last hour temperature in JSON format

/api/weather/?fields=ambient_temp_LM335&format=json

# Get all current fields as Plain Text for June 26, 2026 10:49 AM

/api/all_current/?form_datetime=2026-06-26T10:49&format=plaintext
Code Examples

Query the Weather Tower API directly from your terminal.

# Request JSON data

curl -G "http://weathertower.physics.carleton.edu/api/weather/" \
          --data-urlencode "fields=tower_datetime_utc" \
          --data-urlencode "fields=tower_datetime_chicago_txt" \
          --data-urlencode "fields=ambient_temp_LM335" \
          --data-urlencode "fields=RH_Precon" \
          --data-urlencode "fields=MetOne_wind_speed_average" \
          --data-urlencode "datetimes=06/30/2026 12:00 PM - 06/30/2026 12:48 PM" \
          --data-urlencode "interval=10" \
          --data-urlencode "format=json" \
          -H "Accept: application/json"

# Download CSV

curl -G "http://weathertower.physics.carleton.edu/api/weather/" \
        --data-urlencode "fields=tower_datetime_utc" \
        --data-urlencode "fields=tower_datetime_chicago_txt" \
        --data-urlencode "fields=ten_Peet_WindLHX" \
        --data-urlencode "fields=MetOne_wind_speed_average" \
        --data-urlencode "fields=soil_temp_30_below" \
        --data-urlencode "fields=soil_temp_40_below" \
        --data-urlencode "fields=soil_temp_48_below" \
        --data-urlencode "datetimes=06/30/2026 12:00 PM - 06/30/2026 12:53 PM" \
        --data-urlencode "interval=10" \
        --data-urlencode "format=csv" \
        -o weather_data.csv

Download CSV data directly into a Pandas DataFrame.

import io
        import pandas as pd
        import requests

        url = "http://weathertower.physics.carleton.edu/api/weather/"

        params = {
            "fields": [
                "ambient_temp_LM335",
                "RH_Precon"
            ],
            "datetimes": "06/26/2026 10:00 AM - 06/26/2026 10:59 AM",
            "format": "csv"
        }

        response = requests.get(url, params=params)

        if response.ok:
            df = pd.read_csv(io.StringIO(response.text))
            print(df.head())
        else:
            print(response.status_code)

Query the JSON endpoint using httr and jsonlite.

library(httr)
        library(jsonlite)

        url <- "http://weathertower.physics.carleton.edu/api/weather/"

        response <- GET(
        url,
        query = list(
            fields = c(
            "ambient_temp_LM335",
            "RH_Precon"
            ),
            datetimes = "06/26/2026 10:00 AM - 06/26/2026 10:59 AM",
            format = "json"
        )
        )

        if (status_code(response) == 200) {
        data <- fromJSON(
            content(response, "text", encoding = "UTF-8")
        )
        print(head(data))
        }