Skip to content

Commit 16dc852

Browse files
authored
Merge pull request #31 from saberbrasher/content-mapping
Content mapping version 2 (Saber's edition)
2 parents da0f52f + c9ea30c commit 16dc852

File tree

9 files changed

+128
-61
lines changed

9 files changed

+128
-61
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ example_data/
44
*.h5
55
*.nc
66
_freeze
7+
.venv/

_quarto.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ website:
2727
href: index.qmd
2828
- section: "Getting Started"
2929
contents:
30-
- text: "How to use this cookbook"
31-
href: our-cookbook.qmd
3230
- text: "Getting an Earthdata Login"
3331
href: reference-guides/get-edl.qmd
3432
- text: "Tools we use"
@@ -38,48 +36,46 @@ website:
3836
- section: "NSIDC Data"
3937
# href: reference-guides/data-orient-overview.qmd
4038
contents:
41-
- text: "Types of data"
39+
- text: "Data types and formats"
4240
href: reference-guides/data-structures.qmd
43-
- text: "Common file formats"
44-
href: reference-guides/nsidc-file-formats.qmd
4541
- text: "NASA collections and granules"
4642
- text: "NSIDC map projections and grids"
4743
href: reference-guides/projections.qmd
48-
- text: "Quirky Datasets"
44+
- text: "Quirky datasets"
4945
href: reference-guides/datasets.qmd
5046
- section: "Working with Data"
5147
# href: reference-guides/working-with-data-overview.qmd
5248
contents:
53-
- section: "Finding and Accessing Data"
49+
- section: "Finding / accessing data"
5450
contents:
5551
- text: "Data search and discovery"
5652
href: reference-guides/dataset-search-and-discovery.qmd
5753
- text: "Data access"
5854
href: reference-guides/data-access.qmd
59-
- section: "Wrangling Data"
55+
- section: "Wrangling data"
6056
contents:
6157
- text: "Subsetting"
6258
- text: "Reformatting"
6359
- text: "Reprojecting"
6460
- text: "Resampling"
65-
- section: "Visualizing Data"
61+
- section: "Visualizing data"
6662
contents:
6763
- text: "Plotting data - time series, scatter plots"
6864
- text: "Plotting data on a map"
6965
href: reference-guides/plotting-data.qmd
70-
- section: "How do I..."
66+
- section: "How-To Guides"
7167
href: how-to-guides/overview.qmd
7268
contents:
7369
- section: "Search for data"
7470
- section: "Access data"
7571
- section: "Reproject data"
76-
- section: "Work with NetCDF files?"
72+
- section: "Work with NetCDF files"
7773
contents:
78-
- text: "get the bounding box of a netcdf file"
74+
- text: "Get the bounding box of a NetCDF file"
7975
href: how-to-guides/netcdf_cf.qmd
80-
- text: "get the latitude and longitudes for grid cells"
76+
- text: "Get the latitude and longitudes for grid cells"
8177
href: how-to-guides/get_latitude_and_longitude.qmd
82-
- section: "Tutorials"
78+
- section: "Tutorials / Workshops"
8379
href: tutorials/tutorials_overview.qmd
8480
contents:
8581
- text: "Direct cloud access of ICESat-2 data"
@@ -88,6 +84,7 @@ website:
8884
href: tutorials/working_with_icesat2_sea_ice_data.ipynb
8985
- section: "Appendices"
9086
contents:
87+
- text: "Contributing"
9188
- text: "Best Practices"
9289
- text: "What is an API?"
9390

how-to-guides/netcdf_cf.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "How do I get the bounding box of a NetCDF file in latitude and longitude?"
2+
title: "How to get the bounding box of a NetCDF file in latitude and longitude"
33
author: Andrew P. Barrett
44
date: last-modified
55
---

how-to-guides/overview.qmd

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
11
---
22
title: "How-To Guides"
3-
author: Andy P. Barrett
43
---
54

65
## Introduction
76

8-
This section of the cookbook contains **How To Guides** to help you
7+
This section of the cookbook contains **How-To Guides** to help you
98
solve a particular problem or task. You can think of these How-To
10-
Guides as recipes. For the most part they are short. They are
9+
Guides as programmatic recipes. For the most part they are short. They are
1110
written with the assumption that you know what you want to do and have
12-
some understanding of programing. You can think of each How-To as a
11+
some understanding of programming. You can think of each How-To as a
1312
building block that can be put together with other How-Tos to construct
1413
a workflow.
1514

16-
If you are just learning either programming or working in the cloud,
17-
we recommend looking at the other chapters in this cookbook.
18-
1915
How-To Guides are organized into the following sections:
20-
_Maybe add a short description of each section here_
2116

22-
- How do I search for data;
23-
- How do I accessing data;
24-
- How do I reproject and resample data;
25-
- How do I work with CF-compliant NetCDF files
26-
- [How do I get the bounding box of a NetCDF file in latitude and longitude?](netcdf_cf.qmd)
17+
- How to search for data (via `earthaccess`);
18+
- How to access data (via `earthaccess`);
19+
- How to reproject and resample data;
20+
- How to work with CF-compliant NetCDF files:
21+
- [How to get the bounding box of a NetCDF file in latitude and longitude](netcdf_cf.qmd)
22+
- [How to get latitude and longitude for the grid cells of a NetCDF file](get_latitude_and_longitude.qmd)
2723

index.qmd

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,35 @@ title: "NSIDC Data Cookbook"
33
author: NSIDC
44
---
55

6-
## Welcome
7-
8-
Welcome to the NSIDC Data Cookbook!
9-
106
<!-- prettier-ignore -->
117
> [!WARNING]
128
> This cookbook is under active development. Major changes to the structure of
139
> the book and its content are expected. We are striving to develop content
1410
> that is well-tested and peer-reviewed, but nothing contained here should be
1511
> expected to work correctly (or at all!) in this early phase. Many sections contain only an outline of the content.
16-
> These sections will have content added at the project develops.
12+
> These sections will have content added as the project develops.
13+
14+
## Welcome to the NSIDC Data Cookbook!
15+
16+
This Cookbook for National Snow and Ice Data Center Distributed Active Archive Center ([NSIDC DAAC](https://nsidc.org/data/data-programs/nsidc-daac)) Data is more Julia Child’s “Mastering the Art of French Cooking” than just a collection of recipes (or data tutorials). The aim is to not only provide easy to follow recipes for working with data but also to provide an understanding of the data managed by NSIDC and the tools available to work with the data. It is not an in-depth guide to the many datasets housed by NSIDC but instead is an introduction to the common types of data, file formats and data structures. The hope is that the cookbook will provide a guide and foundataion to help you *master the art of working with cryospheric data*.
17+
18+
## How to use this cookbook
19+
20+
If you are new to NASA or NSIDC data, begin with the **Getting Started** section. Beyond that, the cookbook is divided into four major sections: **NSIDC Data**, **Working with Data**, **How-To Guides**, and **Tutorials / Workshops**. We also include some **Appendices** that include a best practices guide for Python scripting, some background details on computing, and how to contribute to the cookbook (if you are so inclined!).
21+
22+
The **NSIDC Data** section is an introduction to the types of data managed by NSIDC, the file formats used to store that data, coordinate reference systems and grids comon to NSIDC data, and a guide to NASA terminology for Earth science data. There is also an introduction to some “quirky” datasets that do not fit more common simple data structures or are just a little more difficult to work with.
23+
24+
The **Working with Data** section is a guide to the tools and applications for accomplishing common steps in scientific workflows: finding and accessing data, wrangling data, and visualizing data. Wrangling data covers subsetting, reformatting, reprojecting and resampling data in preparation for analysis.
25+
26+
The **How-To Guides** section is a list of recipes to acheive common tasks. It is intended a list of solutions to common scientific programming tasks.
27+
28+
Lastly, the **Tutorials / Workshops** section serves to highlight content that was developed for past events or specific use cases.
29+
30+
## About the NSIDC DAAC
31+
32+
NSIDC has managed the NASA National Snow and Ice Data Center Distributed Active Archive Center (NSIDC DAAC) since 1993, archiving and distributing cryospheric and related geophysical data from NASA Earth-observing satellite missions, airborne campaigns and field observations. The NSIDC DAAC provides hundreds of free and open-access NASA Earth science data sets, detailed data documentation, data tools, resources and tutorials, as well as robust data user support services. These data can be used to study topics relating to snow cover, sea ice, ice sheets, ice shelves, glaciers, frozen ground, soil moisture, climate interactions, and more!
33+
34+
35+
36+
37+
Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
---
2-
title: "Data Structures"
2+
title: "Data types and formats"
33
---
44

5-
Describes common remote sensing data structures.
5+
There are many common data types/ structures and terminology to go along with them. Some examples:
66

7-
_We should add information for tabular data and Data Frames_
7+
- **Tabular** – rows and columns, often stored in CSV or TSV files. Each row is an observation, and each column is a variable (e.g., time, latitude, longitude, temperature).
8+
- **Data Frames** – tabular data structures used in programming languages like R or Python (pandas). Data frames allow for more complex indexing, metadata, and transformations than simple tabular files.
9+
- **Swath** – along-track measurements collected as the satellite passes over an area, usually irregular in shape and resolution.
10+
- **Raster / Grids** – data organized into regular grid cells, each cell representing a spatial unit (e.g., 25 km × 25 km grid of snow cover).
11+
- **Resampling** – methods for transforming data between swath, raster, or other structures (e.g., nearest neighbor, bilinear interpolation).
812

9-
- Swath
10-
- Along-track
11-
- Raster/Grids
12-
- Resampling
13+
14+
How to work with file formats commonly found at NSIDC: In most cases, it’s best to avoid low-level libraries such as `netCDF4` or `h5py`. Higher-level libraries provide more intuitive access, automatically handle metadata, and streamline analysis. Some format descriptions and reccomendations are in the table below.
15+
16+
| File Format | Description | Recommended Tools |
17+
| --------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
18+
| **NetCDF4 / NetCDFx** | Multidimensional climate/remote sensing data (time, lat, lon, variables). | `xarray` (`xr.open_dataset`) in Python; `terra` or `ncdf4` in R. |
19+
| **HDF5** | Hierarchical format for storing arrays, tables, and metadata; used widely in NASA products. | `xarray`, `pandas`; avoid `h5py` unless necessary. |
20+
| **HDF-EOS** | Earth Observing System variant of HDF, often with swath, grid, or point structures. | `xarray`, `h5netcdf`, NASA `harmony-py`. |
21+
| **Shapefile** | Vector geospatial data (points, lines, polygons) with CRS support. | `geopandas` (Python); `sf` (R). |
22+
| **GeoTIFF** | Georeferenced raster imagery and gridded data. | `rasterio`, `rioxarray` (Python); `terra`, `raster` (R). |
23+
| **CSV/TSV** | Tabular text-based files, rows = observations, columns = variables. | `pandas` (Python); `readr`/`data.table`/`tibble` (R). |

reference-guides/dataset-search-and-discovery.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The NSIDC Data Access Tool is accessible from landing pages on the NSIDC website
2626

2727
#### **Programmatic**
2828

29-
The majority of the shorter form "How Do I's" and longer form "Tutorials" will present programmatic data access methods using Python. We hope to expand to other languages, such as R, in the future.
29+
The majority of the shorter form "How-To Guides" and longer form "Tutorials / Workshops" will present programmatic data access methods using Python. We hope to expand to other languages, such as R, in the future.
3030

3131
**earthaccess Python library**
3232

tools-we-use.qmd

Lines changed: 49 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Tools we use"
33
#number-sections: true
44
---
55

6-
Currently, this cookbook features Python Packages (@sec-pythonpkg) for working with data supported by NSIDC DAAC. It also features some applications (@sec-applications) that are accessible through a web browser or as stand alone packages that need to be installed on your local machine.
6+
Currently, this cookbook features [Python Packages](#sec-pythonpkg) for working with data supported by NSIDC DAAC. It also features some [applications](#sec-applications) that are accessible through a web browser or as stand alone packages that need to be installed on your local machine.
77

88
The focus on Python not only reflects the expertise of NSIDC DAAC but also reflects the popularity of Python within the Earth and atmospheric science communities. However, we recognize that many of our users are more familiar with other programming langauges such as R and Matlab. We hope that we will be able to include these langauges as the Cookbook develops.
99

@@ -14,53 +14,86 @@ Using web or locally-installed applications is a good way to start to discover a
1414
There are many Python packages available for working with Earth science data. The packages we use in this Cookbook are an unashamedly opinionated selection; they are the tools we like to use. We also think that these tools are the easiest to use for the types of data mananaged by NSIDC DAAC. Most of the tools have been developed so that researchers do not have to worry about the low-level details of accessing and working with often complicated data used in Earth science. This reduces the amount of code you have to write and also reduces the number of mistakes you will inevitably make.
1515

1616
#### earthaccess
17-
[`earthaccess`](https://earthaccess.readthedocs.io/en/latest/) is a package to search for and access NASA Earth science data.
17+
18+
[`earthaccess`](https://earthaccess.readthedocs.io/en/latest/) — search for and access NASA Earth science data.
1819

1920
#### xarray
20-
[`xarray`](https://xarray.dev/) is a package to work with N-dimensional data (e.g `(time,x,y,z)`).
21+
22+
[`xarray`](https://xarray.dev/) — work with N-dimensional labeled data (e.g. `(time, x, y, z)`).
2123

2224
#### rioxarray
23-
[`rioxarray`](https://corteva.github.io/rioxarray/stable/index.html) is an extentsion to `xarray` that makes data "geospatially-aware".
25+
26+
[`rioxarray`](https://corteva.github.io/rioxarray/stable/index.html) — add geospatial awareness to `xarray`.
2427

2528
#### rasterio
26-
[`rasterio`](https://rasterio.readthedocs.io/en/stable/intro.html) is a Python geospatial library for working with raster data.
2729

28-
#### Pandas
29-
[`pandas`](https://pandas.pydata.org/docs/index.html) is a package to work with tabular data (e.g. the kind of data stored in spreadsheets or databases).
30+
[`rasterio`](https://rasterio.readthedocs.io/en/stable/intro.html) — read, write, and process raster datasets.
31+
32+
#### pandas
33+
34+
[`pandas`](https://pandas.pydata.org/docs/index.html) — handle tabular data (spreadsheets, databases, CSV).
35+
36+
#### geopandas
3037

31-
#### Geopandas
32-
[`geopandas`](https://geopandas.org/en/stable/) is an extension to `pandas` to work with geospatial data.
38+
[`geopandas`](https://geopandas.org/en/stable/) — extend `pandas` to work with geospatial vector data.
3339

3440
#### cartopy
35-
TBD
41+
42+
[`cartopy`](https://scitools.org.uk/cartopy/docs/latest/) — map projections, transformations, and plotting for geospatial data.
3643

3744
#### SlideRule
38-
TBD
45+
46+
[`SlideRule`](https://github.com/ICESat2-SlideRule/sliderule-python) — on-demand processing and access to ICESat-2 data.
3947

4048
#### icepyx
41-
TBD
49+
50+
[`icepyx`](https://icepyx.readthedocs.io/en/latest/) — search, subset, and download ICESat-2 data with built-in metadata handling.
4251

4352
#### satpy
44-
TBD
53+
54+
[`satpy`](https://satpy.readthedocs.io/en/stable/) — read, composite, and visualize meteorological satellite data.
4555

4656
#### dask
47-
TBD
4857

49-
## Installing Python Packages
58+
[`dask`](https://www.dask.org/) — scale computations from laptops to clusters with parallel, out-of-core workflows.
59+
60+
### Installing Python Packages
61+
62+
Most Python packages can be installed from the [Python Package Index (PyPI)](https://pypi.org/) using [pip](https://pip.pypa.io/en/stable/). Some scientific and geospatial packages are easier to install with [conda](https://docs.conda.io/), particularly through the [conda-forge community channel](https://conda-forge.org/).
5063

64+
For more details, see the [official Python documentation on installing packages](https://docs.python.org/3/installing/index.html), the [pip documentation](https://pip.pypa.io/en/stable/getting-started/), and the [conda user guide](https://docs.conda.io/projects/conda/en/latest/user-guide/index.html).
5165

5266
## Applications {#sec-applications}
5367

68+
Applications provide graphical interfaces for exploring, visualizing, and working with Earth science data. Some run directly in a web browser, while others require installation on your local machine. They are useful for quickly examining datasets, generating plots or maps, and learning about data structures before moving on to scripted workflows.
69+
5470
#### Earthdata Search
5571

72+
[`Earthdata Search`](https://search.earthdata.nasa.gov/) — NASA’s primary web application for searching, filtering, and downloading Earth science data.
73+
5674
#### Open Altimetry
5775

76+
[`Open Altimetry`](https://openaltimetry.org/) — a browser-based tool for visualizing and accessing ICESat and ICESat-2 altimetry data.
77+
5878
#### HDFView
5979

80+
[`HDFView`](https://portal.hdfgroup.org/display/support/HDFView) — a desktop application for viewing and editing HDF4 and HDF5 files.
81+
6082
#### Panoply
6183

84+
[`Panoply`](https://www.giss.nasa.gov/tools/panoply/) — a NASA tool for visualizing netCDF, HDF, and GRIB files with quick map and plot options.
85+
6286
#### NCView
6387

88+
[`NCView`](http://meteora.ucsd.edu/~pierce/ncview_home_page.html) — a lightweight utility for quickly viewing netCDF files, especially time series of 2D variables.
89+
6490
#### QGIS
6591

66-
#### ArcGIS
92+
[`QGIS`](https://qgis.org/) — an open-source geographic information system for analyzing and visualizing spatial data.
93+
94+
#### ArcGIS
95+
96+
[`ArcGIS`](https://www.esri.com/en-us/arcgis/about-arcgis/overview) — a commercial GIS platform for advanced mapping, spatial analysis, and data management.
97+
98+
99+

tutorials/tutorials_overview.qmd

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
---
2-
title: "Tutorials"
2+
title: "Tutorials / Workshops"
33
---
44

5-
This section of the cookbook contains longer form tutorials providing examples of data search and access within a workflow.
5+
This section of the cookbook contains longer form tutorials providing examples of data search and access within a workflow. NSIDC is frequently involved in hackweeks and workshops as well. Content from past events can be found in the [NSIDC Data Tutorials Repository](https://github.com/nsidc/NSIDC-Data-Tutorials).
6+
7+
**Current cookbook tutorials:**
8+
9+
- [Direct cloud access of ICESat-2 (*ATL06 Land Ice Height*) data](/tutorials/ATL06-direct-access.ipynb): a notebook that demonstrates searching for cloud-hosted ICESat-2 data and directly accessing Land Ice Height (ATL06) granules from an Amazon Compute Cloud (EC2) instance using the `earthaccess` package.
10+
- [Download of ICESat-2 (*ATL07 Sea Ice*) data](/tutorials/working_with_icesat2_sea_ice_data.ipynb): a notebook that demonstrates searching for and accessing ICESat-2 data using the Python `earthaccess` package, reading and visualizing the data using `xarray` and `pandas`, and that uses `matplotlib` and `cartopy` to produce a map of search results.
11+
12+
**Tutorials coming soon:**
13+
14+
- Ideas?
15+
- *Let us know what you'd like to see!*
616

7-
--Direct cloud access of ATL06 Land Ice Height data
8-
--Download of ATL07 Sea Ice Data

0 commit comments

Comments
 (0)