Skip to content

Commit

Permalink
describe variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jrising committed Mar 3, 2024
1 parent 43e51de commit ba9bb41
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tutorial-content/content/working-with-shapefiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ to generate a collection of points at the center of each grid
cell. This approach can be used without generating an $A$ matrix,
but the matrix method improves efficiency.

As an example, you generate these points like so:
As an example, suppose that you have a grid with a longitudinal (zonal)
dimension from `longitude0` to `longitude1` and a latitudinal (meridional) dimension
from `latitude0` to `latitude1`, with equal spacing of `gridwidth` for
both dimensions. You can generate a full list of grid cell points like so:

`````{tab-set}
````{tab-item} R
Expand All @@ -84,6 +87,11 @@ pts = pd.DataFrame(np.array(np.meshgrid(longitudes, latitudes)).T.reshape(-1, 2)
````
`````

Often you can get the longitude and latitude values for the grid cells
directly from your weather dataset. In this case, replace the steps to
generate `longitudes` and `latitudes` variables by hand with directly
loading those values.

Now, you can iterate through each region, and get a list of all of the
points within each region. Here's how you would do that with the
`PBSmapping` library in R:
Expand Down Expand Up @@ -173,4 +181,4 @@ Matching observations by name can be very time-consuming. These problems even ex

2. Use string matching. However, in this case, you will need to inspect all of the matches to make sure that they are correct.

3. Construct “translation functions” for each dataset, which map the regional names in that dataset to a canonical list of region names. For example, choose the names in one dataset as a canonical list, and name the matching functions as `<dataset>2canonical` and `canonical2<dataset2>`.
3. Construct “translation functions” for each dataset, which map the regional names in that dataset to a canonical list of region names. For example, choose the names in one dataset as a canonical list, and name the matching functions as `<dataset>2canonical` and `canonical2<dataset2>`.

0 comments on commit ba9bb41

Please sign in to comment.