Colab and Python tutorials: clarify paths, use new NC dataset by petrasovaa · Pull Request #146 · OSGeo/grass-tutorials · GitHub
Skip to content

Colab and Python tutorials: clarify paths, use new NC dataset - #146

Open
petrasovaa wants to merge 1 commit into
OSGeo:mainfrom
petrasovaa:fixes-updates-colab
Open

petrasovaa wants to merge 1 commit into
OSGeo:mainfrom
petrasovaa:fixes-updates-colab

Conversation

@petrasovaa

Copy link
Copy Markdown
Contributor

Colab tutorial clarity

A user ran the whole notebook top to bottom, not realizing the sections
after installation are alternatives. Changes:

  • Callout after the install section announcing that what follows is a
    choice, and headings renamed to Option A/B/C so the TOC shows it too.
  • Option C (Google Drive) reframed as orthogonal — it applies to whichever
    option you picked — and shows both variants instead of silently repeating
    Option A.
  • Note in Option B about ending an existing session before gj.init()
    switches to another project.
  • Short definition of what a GRASS project is, linking to the
    manual,
    since "sample dataset" suggested a folder of GeoTIFFs.
  • Fixed gs.init()gj.init(), which raised AttributeError
    (init is not exported from grass.script).
  • Typo: "bare in mind" → "bear in mind".

New sample project

Both tutorials now use raleigh_northcarolina_usa_epsg6542. elevation
and landuse carry over, but two cells in the fast track needed changes:

  • r.univar -t ... separator=comma into pd.read_csv failed, because the
    NLCD class labels contain commas (Developed, Open Space). Switched to
    the pipe separator. (format="json" would be the robust fix, but
    r.univar gained it in 8.5 and Colab's ubuntugis PPA is still on 8.4.2.)
  • The census vector doesn't exist in the new project; replaced with
    census_blocks and its POP20 / HOUSING20 columns.
  • Regenerated grass_python_histogram.png from the new elevation raster.
    This also corrects the legend, whose labels were swapped in the old figure.

All cells in both tutorials were run against a fresh download of the new
project.

Mark the three Colab paths as alternatives rather than steps, define
what a GRASS project is, and fix gs.init -> gj.init. Switch both
tutorials to raleigh_northcarolina_usa_epsg6542, adapting the r.univar
and census examples and regenerating the histogram figure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant