Skip to content

Commit

Permalink
o Fix markdown for notebook, make it clear and use Grid.from_file() a…
Browse files Browse the repository at this point in the history
…s pointed in PR reviews
  • Loading branch information
rajeeja committed Jan 11, 2025
1 parent f3c965d commit 507038a
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions docs/user-guide/from_file.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,13 @@
"metadata": {},
"source": [
"# Reading & Working with Geometry Files\n",
"uxarray Grid object provides a few options to load grid file. Such as:\n",
"\n",
"1. from_dataset (ux.Grid.from_dataset(GRID_FILENAME, use_dual=True or False))\n",
"2. open_grid (ux.open_grid(GRID_FILENAME, use_dual=True or False))\n",
"3. from_file (ux.Grid.from_file(GRID_FILENAME, backend=\"geopandas\" or \"xarray\"))\n",
"\n",
"This notebook demonstrates to use the from_file function and options. \n",
"Specifically focus loading the geometry files:\n",
"\n",
"This notebooks demonstrates how to use the `Grid.from_file()` class method to load in geometry files such as:\n",
"\n",
"1. Shapefile\n",
"2. Geojson\n",
"2. GeoJSON\n",
"\n",
"This notebook also showcases the use of uxarray's remapping a variable from unstructured grid to a Shapefile."
"Highlighted is a workflow showcasing how to remap a variable from an unstructured grid to a Shapefile."
]
},
{
Expand Down Expand Up @@ -48,7 +41,7 @@
"source": [
"## Load a shapefile and plot \n",
"\n",
"* This section demonstrates how to load a shapefile using uxarray's from_file function\n",
"* This section demonstrates how to load a shapefile using uxarray's Grid.from_file() function\n",
"* The shapefile used in this example is the US national boundary file from the US Census Bureau. It is a 20m resolution shapefile that represents the national boundary of the United States. \n",
"* The data plotted is subset to a specific bounding box, which is defined by the latitude and longitude bounds. The result is plotted using the matplotlib backend."
]
Expand Down Expand Up @@ -84,9 +77,9 @@
"id": "9808189d",
"metadata": {},
"source": [
"# Load a Geojson file and plot\n",
"## Load a Geojson file and plot\n",
"\n",
" * This section demonstrates how to load a Geojson file using uxarray's from_file function\n",
" * This section demonstrates how to load a Geojson file using uxarray's Grid.from_file() function\n",
" * The Geojson file used in this example is a few buildings around downtown Chicago. The plot is shown using the \"matplotlib\" backend for bounds specific to the region.\n",
"\n"
]
Expand All @@ -110,7 +103,7 @@
"id": "f2f14b3a",
"metadata": {},
"source": [
"# Open NetCDF mesh file using the Grid from_file function\n",
"## Open NetCDF mesh file using the Grid.from_file() function\n",
"\n",
"* Regular NetCDF files can also be opened using this function. Backend options available are:\n",
" * xarray\n",
Expand All @@ -135,7 +128,7 @@
"id": "f27481e2-5c1c-4189-b0c7-39737c4e47f8",
"metadata": {},
"source": [
"# Remapping from Shapefile\n",
"## Remapping from Shapefile\n",
"\n",
"### The following steps are needed for Remapping Global Relative Humidity Data on to a specific region defined by Shapefile using UXarray\n",
"\n",
Expand Down

0 comments on commit 507038a

Please sign in to comment.