Skip to content

update example notebooks#164

Merged
Oisin-M merged 5 commits intofeat/tutorialsfrom
feat/cleanup_polytope_tutorials
Apr 15, 2026
Merged

update example notebooks#164
Oisin-M merged 5 commits intofeat/tutorialsfrom
feat/cleanup_polytope_tutorials

Conversation

@Oisin-M
Copy link
Copy Markdown
Contributor

@Oisin-M Oisin-M commented Apr 14, 2026

Description

The current example notebooks are not up to date, and some are broken. This PR begins to update them to follow the new template, use nicer syntax and try and show more functionality.

Summary of changes

  • for each notebook, now have a nice summary of contents + list of earthkit packages used (follows the template started in the nice ensemble example)
  • removed polytope logo example since it shows the exact same functionality as the polygon coverage example and is just duplication
  • polytope now returning "latitude", "longitude" and not "x", "y". Therefore, cleaned up the polytope polygon example
# chart.point_cloud(ds['2t'], x="y", y="x") # this is broken
chart.point_cloud(ds['2t'])
  • earthkit-plots already has magic keys supported for lat/lon so can simplify greatly the plot logic in timeseries example
# def location_to_string(location):
#     """
#     Converts latitude and longitude to a string representation with degrees
#     and N/S/E/W.
#     """
#     (lat, lon) = location
#     lat_dir = "N" if lat >= 0 else "S"
#     lon_dir = "E" if lon >= 0 else "W"
#     return f"{abs(lat):.2f}°{lat_dir}, {abs(lon):.2f}°{lon_dir}"
# ...
# chart.title(f"ECMWF ensemble meteogram at {location_to_string(location)}")
chart.title("ECMWF ensemble meteogram at {latitude:%Lt} {longitude:%Ln}")
  • in timeseries notebook, added small section showing using ekt to aggregate over ensemble and plot timeseries
  • vertical profile is just data loading with earthkit-data and nothing else, therefore have hidden for now while awaiting making it a proper example
  • meteogram example updated to use new ekp functional approach
  • in the country cut-out, show how to get country boundary using ekg

Contributor Declaration

By opening this pull request, I affirm the following:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

@Oisin-M Oisin-M marked this pull request as ready for review April 14, 2026 15:26
@Oisin-M Oisin-M changed the base branch from develop to feat/tutorials April 15, 2026 15:47
@Oisin-M Oisin-M merged commit 82ea843 into feat/tutorials Apr 15, 2026
2 of 5 checks passed
@Oisin-M Oisin-M deleted the feat/cleanup_polytope_tutorials branch April 15, 2026 15:51
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