Skip to content

Commit

Permalink
add warning for polygon plotting with spatial pandas locally
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc2 committed Dec 10, 2023
1 parent bc64bdc commit dbdd652
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions notebooks/03-uxarray-vis/03-polygons.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@
{
"cell_type": "markdown",
"source": [
"In most simulations, such as Global Climate Models, Unstructured Grids are composed of nodes that are connected with edges to form faces that discretize the surface of a sphere (i.e. Earth).\n",
"In most simulations, such as Global Climate Models, Unstructured Grids are composed of nodes that are connected with edges to form faces that discretize the surface of a sphere (i.e. Earth). For visualization, these faces can be geometrically represented as Polygons and shaded by a corresponding face-centered data variable.\n",
"\n",
"For visualization, these faces can be geometrically represented as Polygons and shaded by a corresponding face-centered data variable."
"This notebook showcases how UXarray can visualize unstructured grids as polygons.\n",
"\n",
":::{warning}\n",
"This cookbook builds the SpatialPandas library from source (i.e. from the latest commit to Github). If running this notebook locally, please\n",
"install SpatialPandas using the following command:\n",
"``pip install git+https://github.com/holoviz/spatialpandas.git``\n",
"\n",
"No action is needed if running this cookbook through Binder.\n",
":::"
],
"metadata": {
"collapsed": false
Expand Down Expand Up @@ -44,7 +52,7 @@
{
"cell_type": "markdown",
"source": [
"### Grid with Face-Centered Data Variable"
"### Grid with Face-Centered Data Variable\n"
],
"metadata": {
"collapsed": false
Expand Down Expand Up @@ -110,7 +118,7 @@
{
"cell_type": "markdown",
"source": [
"A `Grid` can be converted into a `GeoDataFrame`, which will contain a single \"geometry\" column, which is a series of Polygons that represent each face."
"A `Grid` can be converted into a `GeoDataFrame`, containing a single \"geometry\" column, which is a series of Polygons that represent each face."
],
"metadata": {
"collapsed": false
Expand Down Expand Up @@ -223,7 +231,7 @@
"source": [
"## Rasterized Polygon Plots\n",
"\n",
"For larger datasets & quicker visualizations, we can rasterize each polygon to obtain a Raster of our geometries.\n"
"For larger datasets and for obtaining quicker visualizations, we can rasterize each polygon to obtain a Raster of our geometries.\n"
],
"metadata": {
"collapsed": false
Expand Down Expand Up @@ -274,7 +282,7 @@
"\n",
"\n",
":::{important}\n",
"For larger, higher-resolution, grids, it's suggested to keep `exclude_antimeridian=True` for faster visualuzation. \n",
"For larger, higher-resolution, grids, it's suggested to keep `exclude_antimeridian=True` to decrease the time needed to process the grid for visualization.\n",
":::\n"
],
"metadata": {
Expand Down

0 comments on commit dbdd652

Please sign in to comment.