Meet the data:
streams, formats, and a first real dataset

Session 4 · Wed Oct 7 · Book sections 2.1–2.2 & 1.6–1.7

🛰️

Today’s question

Every geoscience project ends up handling at least two kinds of data.

Which streams are yours — and what do they deserve to be stored in?

This lecture in the literature

📖 The playbook: data that are findable, accessible, interoperable, reusable — what “AI-ready” builds on.

Wilkinson, M. D., et al. (2016). The FAIR Guiding Principles for scientific data management and stewardship. Scientific Data, 3, 160018.

Doing it right: a geoscience paper whose data, provenance, and methods a reader — or a machine — can retrace.

Gil, Y., et al. (2016). Toward the Geoscience Paper of the Future: Best practices for documenting and sharing research from data to software to provenance. Earth and Space Science, 3, 388–415.

Open daily positions for thousands of GNSS stations — the archive today’s P395 series comes from.

Blewitt, G., Hammond, W. C., & Kreemer, C. (2018). Harnessing the GPS data explosion for interdisciplinary science. Eos, 99, doi:10.1029/2018EO104623.

A default file format silently rewrote gene names as dates — corrupting supplementary data across roughly a fifth of surveyed genomics papers.

Ziemann, M., Eren, Y., & El-Osta, A. (2016). Gene name errors are widespread in the scientific literature. Genome Biology, 17, 177.

Data stewardship is published, cited science — and format defaults have corrupted whole literatures.

Three data streams run through this course

Stream Geoscience examples Shape
Regular high-rate series 100 Hz seismograms, hourly tide gauges, daily GNSS 1D, clocked by the instrument
Gridded fields climate rasters, satellite imagery, model output 2D–4D arrays over region and time
Irregular sparse points multi-well networks, field campaigns samples wherever access allowed

The three get equal treatment in Chapter 2 — because every project ends up handling at least two of them.

Two containers

  • Arrays — values on a grid; the dimensions carry the meaning (time, latitude, depth)
  • Data frames — one data sample per row, one variable per column; mixed types welcome
  • Most projects need both: a gridded field of covariates and a table of observations

Choose the container from the data’s structure, not from the software you opened first.

The same field, on disk

133 kB as CSV — every number spelled out in text

33 kB as Parquet — the same table, typed and compressed

One 40 × 80 temperature-anomaly field, 3,200 grid cells — synthetic (mlgeo_synth), measured in the executed 2.2 notebook.

Text formats store digits; binary formats store numbers. The gap grows with dataset size.

A format is a set of promises

Format Built for Same field on disk
CSV small tables, human-readable anywhere 133.0 kB
Parquet large tables — columnar, typed, compressed 33.0 kB
netCDF / HDF5 self-describing arrays: data + units + coordinates in one file 33.9 kB
Zarr chunked arrays — parallel, partial reads from cloud storage 29.9 kB

The binary formats tie at this size — the difference is what each promises: readability, speed, self-description, or cloud-scale access.

The first real dataset

Plate tectonics, measured daily to a few millimeters: GNSS stations P395 & P563 (Pacific Northwest) drift steadily — 7,418 daily solutions at P395 since 2006. Real data — NGL, IGS20 frame.

Frozen data, living data

  • Frozen file (a released dataset): pin its checksum — every future run verifies it got the same bytes
  • Living file (NGL appends a new solution daily): pin nothing — log the checksum you actually received
  • Publishing or grading? Freeze a snapshot and pin that

Either way, your analysis names its exact input — that is provenance, and it costs one line.

Where each stream lives

Stream Today’s example Container Formats that earn it
Regular high-rate series P395 daily positions (real, NGL) time-indexed table / 1D array CSV small · Parquet, HDF5 at scale
Gridded fields temperature-anomaly field (synthetic, mlgeo_synth) labeled array netCDF local · Zarr cloud
Irregular sparse points Cascade volcano locations table + geometry GeoJSON · GeoParquet

Naming your streams and formats is the first line of your project’s data card — start it today.

Now run it yourself — open 2.2

  1. pixi run jupyter lab2.2_data_formats_rendered.ipynb
  2. Run the round-trips: JSON → CSV/Parquet → GeoTIFF/GeoJSON → netCDF → Zarr; reproduce the size table
  3. Open 1.7_get_geodetic_gnss.ipynb: download P395 with pooch, record the SHA256 your run prints
  4. Browse the data gallery (1.6): pick one dataset near your project and find its license + citation

Friday: tables that tell the truth (2.3–2.4) · Ch 1 quiz closes Thu Oct 8 · HW1 due Mon Oct 12