Skip to main content

CO₂ Interpolation Tool

The CO₂ Interpolation Tool generates a spatial concentration map by fitting a Gaussian process model to the active CO₂ sensor network. The result is visualized as either a smooth heatmap or contour polygons on the Cesium globe.

note

The interpolation service runs on Jetstream2 at Indiana University through NSF ACCESS allocation CIS251126. See the Acknowledgments.

Prerequisites​

  • CO₂ Sensors must be enabled and loaded before running interpolation (see CO₂ Sensors)
  • At least 3 sensors must pass the validity checks

Opening the Tool Panel​

Enable CO₂ Sensors from the sidebar. A CO₂ Interpolation Tool panel appears as a floating panel above the bounding box area. It contains:

  • Run Interpolation button
  • Smooth / Contours mode toggle
  • Opacity slider (0–0.95)
  • Stats area (populated after a successful run)
  • Target Mode button

Sensor Validity Checks​

When Run Interpolation is clicked, the app screens each sensor:

CheckCriterion
Has coordinateslat and lon (or long) must be present and numeric
Valid CO₂ rangeCO₂ must be between 0 and 1500 ppm
Within Central FL boundsLatitude: 27.5–29.5 °N, Longitude: 80.5–82.5 °W

Sensors that fail are excluded. A rejection popup lists each excluded sensor and the reason. If fewer than 3 sensors pass, interpolation is aborted with an error notification.

The Interpolation Request​

Valid sensors are sent to the UCF JetStream Cloud backend:

POST https://ucf-urbangeolens-backend.cis251126.projects.jetstream-cloud.org/co2/interpolate-co2
Content-Type: application/json

{
"coordinates": [[lat1, lon1], [lat2, lon2], ...],
"values": [co2_1, co2_2, ...]
}

Response​

{
"status": "success",
"grid_points": [[lat, lon], ...],
"predictions": [co2_value, ...],
"contours": { GeoJSON FeatureCollection },
"l": 0.042,
"area_m2": 1234567.8,
"bbox_area_m2": 2000000.0
}
FieldDescription
grid_pointsRegular grid of coordinates covering the sensor convex hull
predictionsPredicted CO₂ value at each grid point
contoursGeoJSON polygons representing iso-concentration contours
lFitted Gaussian process length scale in the coordinate units sent to the backend. The current client multiplies it by 111,320 and labels the displayed value as metres.
area_m2Backend-reported convex-hull area value (m²). See the coordinate caveat below before interpreting it geographically.
bbox_area_m2Backend-reported bounding-box area value (m²). See the coordinate caveat below before interpreting it geographically.

The current client sends coordinate pairs as [latitude, longitude]. The backend's meter conversion currently reads coordinate index 1 as the latitude input, so area_m2 and bbox_area_m2 should not be treated as accurate geographic areas. This page describes the values the current service returns; see the backend implementation for its calculation.

Visualization Modes​

Smooth Heatmap​

A textured rectangle entity is rendered on the Cesium globe, sized to the sensor bounding box. The texture is generated by:

  1. Mapping each prediction value to an RGBA color (blue → green → yellow → red)
  2. Painting the colors onto a <canvas> as a grid
  3. Converting the canvas to a Cesium.Material using MaterialProperty

Contour Mode​

GeoJSON contour polygons from the API response are rendered as Cesium polygon entities. Each contour is filled with a semi-transparent color matching the CO₂ concentration range it represents.

Toggle between modes using the Smooth / Contours buttons in the tool panel.

Opacity Control​

The opacity slider adjusts the transparency of both the heatmap and contour layers in real time (range 0–0.95).

Statistics Panel​

After a successful run, animated stat cards display:

StatDescription
MeanAverage predicted CO₂ across the grid (ppm)
MedianMedian predicted CO₂ (ppm)
Std DevStandard deviation of predictions
Min / MaxMinimum and maximum predicted values
Length Scale (l)The client displays the fitted coordinate-unit scale multiplied by 111,320 as metres. This is an approximate conversion from degree coordinates.
Hull AreaBackend-reported value, displayed in km² when it reaches the client conversion threshold; see the coordinate caveat above.
Bbox AreaBackend-reported value, displayed in km² when it reaches the client conversion threshold; see the coordinate caveat above.

Copy buttons allow copying each stat to the clipboard.

Target Query Mode​

Click Target Mode to enable an on-map query cursor. Click any point on the globe to estimate the CO₂ concentration at that location using the fitted model. A pin is placed at the clicked location and the interpolated value is displayed.

Click Target Mode again to disable it.

Color Scale​

The CO₂ color mapping runs from blue (low) through green and yellow to red (high), scaled to the min/max of the current prediction set.

Limitations​

  • Interpolation is limited to the Central Florida region (sensor deployment area)
  • The JetStream Cloud backend must be reachable from the server
  • Results are a statistical estimate, not a direct measurement, sensor density and placement affect accuracy
  • The Gaussian process assumes spatial stationarity; it works best when sensors are distributed across the area of interest