Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Chapter 2: AI-Ready Geoscience Data

This chapter is the AI-ready-data pillar of the course. Machine learning projects in the geosciences succeed or fail on the quality of their data, and most of the work is upstream of any model: understanding what the data are, reading and writing standard formats, cleaning tables, reshaping arrays, resampling, characterizing distributions, transforming and filtering signals, generating honest synthetic data, engineering features, and reducing dimensionality. The chapter ends with a capstone lesson that defines AI-ready data operationally — provenance, metadata, tidy shapes, benchmark splits, and leakage controls — and that definition is graded in the final project. Three data streams run through the chapter and get equal treatment: gridded fields (climate rasters, imagery), regular high-rate sensor series (100 Hz seismograms, hourly tide gauges, daily GNSS), and irregular sparse point observations (multi-well groundwater networks, field campaigns) — because every geoscience project ends up handling at least two of them.

The Arc of the Chapter

The lessons build in order:

  1. 2.1 Data Definitions — data modalities in geoscience; arrays vs data frames; common and cloud-optimized formats.

  2. 2.2 Data Formats — hands-on reading and writing of CSV, GeoJSON, GeoTIFF, netCDF, HDF5, Parquet, and Zarr; comparing file sizes on disk.

  3. 2.3 Pandas DataFrames — series and data frames, datetime handling, filtering, grouping, aggregating, and mapping station metadata.

  4. 2.4 Preparing DataFrames — cleaning a whole-rock geochemistry table: missing data, sentinel values, censored values at a detection limit, informative missingness, correlations, and per-class distributions.

  5. 2.5 Gridded data — what one value in a reanalysis grid means, the file’s checksum and packing on disk, selecting a cell by coordinate without the two silent traps, units that stay true after conversion, and checking an agent’s grid code.

  6. 2.6 Resampling — statistical resampling (randomization, bootstrap, Monte Carlo) for uncertainty, then signal resampling: anti-alias decimation of a tide-gauge record, gap-policy interpolation of a degraded GNSS series, aggregation of an irregular multi-well network, and the block bootstrap for correlated noise — synthetic and real GNSS throughout.

  7. 2.7 Statistical Considerations — moments, distributions, and the Gutenberg-Richter law, on synthetic and real geochemical data.

  8. 2.8 Spectral Transforms — Fourier and wavelet transforms of seismograms and 2D fields.

  9. 2.9 Filtering — low-, high-, and band-pass filtering; zero-phase vs causal filters; separating trend, seasonal cycle, and noise; filtering across gaps and recovering a clock error on a real seismogram.

  10. 2.10 Synthetic Data — building synthetic seismograms and spectrum-matched noise; a worked STA/LTA detection-floor measurement with binomial error bars; when synthetic data is admissible in science.

  11. 2.11 Feature Engineering — hand-built and automated features for time series, with a real seismic waveform benchmark.

  12. 2.12 Dimensionality Reduction — PCA, EOFs on climate fields, ICA, and t-SNE.

  13. 2.13 AI-Ready Data (Capstone) — analysis readiness versus AI readiness, a rubric of eleven criteria scored 0/1/2, and partitions into within-domain and out-of-domain sets along statistical, spatiotemporal, and physical axes.

The Session 7 lab (start here), placed after 2.6, is self-guided. Each project team takes the track of its domain: a volcano (Mount St Helens seismograms and earthquake catalog, 2004 to 2008), soil moisture at a weather station (USCRN Spokane 17 SSW, 2015 to 2024), a land-surface model (CPC monthly soil water over the western United States, 1991 to 2020), or planets around other stars (TESS light curve and pixels of HD 209458, NASA Exoplanet Archive tables). Every track follows the same steps: pull the raw data from the provider and check that the file is the one recorded, compare the instrument’s native resolution with what the file delivers, read a table and arrays in 1D and 2D, hunt problems planted in a synthetic twin and measure how they bias a derived quantity, test a correlation against the physics, write the chain from raw file to a learning problem (including balancing), and check an AI agent on the same synthetic file.

The chapter closes with the final project assignment for this pillar (2.20): build an AI-ready dataset for your own project, with a description that travels with it and stored partitions, scored with the 2.13 rubric.

Learning Outcomes

By the end of this chapter, you will:

Assignments