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.

πŸ–₯️ Lecture slides β€” Session 04 (Wed Oct 7)

This course provides various tracks for students in geosciences. The data sets can be downloaded and used throughout the various exercises (e.g., classification, regression, clustering ...).

The tracks are: geophysical sciences (seismology and geodetic tracks), geology, cryospheric sciences, atmospheric sciences, ocean sciences, hydrology, and forestry.

We provide a series of small, curated data sets for the course. These are open-access data, each with its own license.

The collection lives in the UW-MLGEO/MLGeo-dataset repository.

How to download a file from the MLGeo-dataset repositoryΒΆ

To download a file from a GitHub repository, follow these steps:

  1. Identify the file URL:

    • Navigate to the CSV file in the GitHub repository.
    • Click on the file to view its contents.
    • Click the β€œRaw” button to get the direct URL to the file.
  2. Construct the download URL:

    The URL format is:

    https://raw.githubusercontent.com/UW-MLGEO/MLGeo-dataset/main/data/file.csv
  3. Download the file with pooch:

    pooch is a small Python library made for exactly this: fetch a file from a URL, cache it locally, and check its integrity.

    import pooch
    
    fname = pooch.retrieve(
        url="https://raw.githubusercontent.com/UW-MLGEO/MLGeo-dataset/main/data/EarthRocGranites.csv",
        known_hash=None,
    )

    pooch.retrieve downloads the file once, stores it in a local cache, and returns the path; later calls reuse the cached copy. With known_hash=None, pooch prints the SHA256 checksum of what it downloaded. Paste that checksum back into known_hash="sha256:..." in your code: from then on, pooch verifies every download against it and raises an error if the file on the server has changed. That is a small, cheap piece of reproducibility β€” you know your analysis ran on the file you think it did.

    As an aside, the shell equivalents work too, without caching or checksums:

    wget https://raw.githubusercontent.com/UW-MLGEO/MLGeo-dataset/main/data/EarthRocGranites.csv
    # or: curl -O <url>

Description of dataΒΆ

The collection of data aims to represent the diversity of data sets encountered in the geosciences.

The data includes time series across time scales (from the second to the 100 ka). The data is stored in CSV files for the class, but is typically stored in CSV, Arrow, H5, NetCDF, TileDB, mseed, and other discipline-specific formats.

Licenses and citationΒΆ

Every data set page in the MLGeo-dataset repository must carry two things: the license under which the data is distributed, and the citation for the data producer. When you reuse a data set, carry both forward into your own repository. For the flagship data sets, where known:

Geoscience temporal data. Each curve is one data set, normalized in amplitude and offset vertically by its index in the collection; the x-axis is normalized time. The collection includes extreme events, dynamic seismic waves, the rising CO2 record, and 15+ years of seasonal hydrological and weather signals.

Geoscience temporal data. Each curve is one data set, normalized in amplitude and offset vertically by its index in the collection; the x-axis is normalized time. The collection includes extreme events, dynamic seismic waves, the rising CO2 record, and 15+ years of seasonal hydrological and weather signals.