Skip to content

Incorrect URL in Notebook 01-data-structures-xarray.html #207

Description

@leehach

This is about Ch 7 notebook "Introduction to data structures in xarray".

In the very first code cell, the correct URL is constructed and then immediately overwritten to a string that is interpreted as a local filepath.

import xarray as xr
import rioxarray

bucket_url = "https://a3s.fi/swift/v1/AUTH_0914d8aff9684df589041a759b549fc2/PythonGIS"
url = bucket_url + "/elevation/kilimanjaro/ASTGTMV003_S03E036_dem.tif"
url = "data/temp/kilimanjaro_elevation.tif"

data = xr.open_dataset(url, engine="rasterio", masked=True)
data

Line 5 should be removed. With it, the xr.open_dataset call fails. Removing the line fixes it as the URL is defined correctly on the previous two lines.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions