Skip to content

Commit 807191f

Browse files
committed
fix readme for III
1 parent 1ab7e5c commit 807191f

File tree

5 files changed

+112
-59
lines changed

5 files changed

+112
-59
lines changed

hands-on/session II/2.Explore_Data.ipynb

Lines changed: 30 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -276,72 +276,62 @@
276276
"metadata": {},
277277
"outputs": [],
278278
"source": [
279+
"is_log = True # Or False, depending on the mode\n",
280+
"EPSILON = 0.001\n",
281+
"\n",
279282
"try:\n",
283+
" # Select the colormap\n",
284+
" cmap_instance = plt.get_cmap(\"viridis\")\n",
285+
"\n",
286+
" # Process data range based on log/linear scaling you selected from dashboard\n",
287+
" # If is_log is True, we will use logarithmic scaling; otherwise, we will use linear scaling\n",
280288
" \n",
281-
" # Choose a colormap for visualizing the data\n",
282-
" # The colormap 'inferno' is used here, which is a perceptually uniform colormap\n",
283-
" cmap_instance = plt.get_cmap(\"inferno\")\n",
284-
" \n",
285-
" # Extract the latitude and longitude boundaries from the metadata\n",
286-
" lat_min = metadata[0][0] # Minimum latitude\n",
287-
" lat_max = metadata[0][1] # Maximum latitude\n",
288-
" lon_min = metadata[1][0] # Minimum longitude\n",
289-
" lon_max = metadata[1][1] # Maximum longitude\n",
289+
" if not is_log:\n",
290+
" vmin = np.min(actual_data)\n",
291+
" vmax = np.max(actual_data)\n",
292+
" norm = None # Use default linear normalization\n",
293+
" else:\n",
294+
" # Ensure data is positive for log scaling\n",
295+
" actual_data = np.clip(actual_data, EPSILON, None)\n",
296+
" vmin = np.min(actual_data)\n",
297+
" vmax = np.max(actual_data)\n",
298+
" from matplotlib.colors import LogNorm\n",
299+
" norm = LogNorm(vmin=vmin, vmax=vmax)\n",
290300
"\n",
301+
" # Extract bounds from metadata\n",
302+
" lat_min, lat_max = metadata[0]\n",
303+
" lon_min, lon_max = metadata[1]\n",
291304
"\n",
292-
" # Replot the figure with a fixed range from 0 to 3000\n",
293-
" # This range is arbitrary and meant to highlight different data ranges\n",
294-
" fixed_vmin = 0\n",
295-
" fixed_vmax = 600\n",
296-
" \n",
305+
" # Plotting\n",
297306
" fig, axs = plt.subplots(1, 1, figsize=(10, 8))\n",
298307
" axs.set_xlim(lat_min, lat_max)\n",
299308
" axs.set_ylim(lon_min, lon_max)\n",
300-
" axs.set_title(\"Selected Subregion Of Interest (Range 0 to 3000)\")\n",
309+
" axs.set_title(\"Selected Subregion Of Interest (Default Range)\")\n",
301310
" axs.set_xlabel(\"Longitude (Degrees)\")\n",
302311
" axs.set_ylabel(\"Latitude (Degrees)\")\n",
303-
" \n",
304-
" # Use imshow with the fixed range from 0 to 3000\n",
312+
"\n",
313+
" # Apply norm to imshow\n",
305314
" data_fig = axs.imshow(\n",
306315
" actual_data,\n",
307316
" cmap=cmap_instance,\n",
308-
" vmin=fixed_vmin,\n",
309-
" vmax=fixed_vmax,\n",
310317
" origin=\"lower\",\n",
311318
" extent=(lat_min, lat_max, lon_min, lon_max),\n",
319+
" norm=norm\n",
312320
" )\n",
313321
"\n",
314-
" # Add a colorbar with the fixed range\n",
322+
" # Add colorbar\n",
315323
" cbar = fig.colorbar(\n",
316324
" data_fig,\n",
317325
" ax=axs,\n",
318326
" fraction=0.046 * actual_data.shape[0] / actual_data.shape[1],\n",
319327
" pad=0.04,\n",
320328
" )\n",
321-
" \n",
322-
" # Set the ticks for the colorbar\n",
323-
" cbar_ticks = np.linspace(fixed_vmin, fixed_vmax, 8)\n",
324-
" cbar.set_ticks(cbar_ticks)\n",
325-
" \n",
326-
" print(\"You have successfully replotted your data with the range 0 to 3000.\")\n",
327-
" \n",
328-
" # Calculate statistical values for the data\n",
329-
" max_slope = vmax # Maximum value in the data\n",
330-
" min_slope = vmin # Minimum value in the data\n",
331-
" avg_slope = actual_data.mean() # Average value of the data\n",
332-
" std_slope = actual_data.std() # Standard deviation of the data\n",
333-
" \n",
334-
" # Print the calculated statistical values\n",
335-
" print(f\"Maximum slope value: {max_slope}\")\n",
336-
" print(f\"Minimum slope value: {min_slope}\")\n",
337-
" print(f\"Average slope value: {avg_slope}\")\n",
338-
" print(f\"Standard deviation of slope values: {std_slope}\")\n",
329+
" cbar.set_label('Value')\n",
339330
"\n",
340-
" # Display the plot with the fixed range\n",
331+
" print(\"You have successfully plotted your data with the selected color scale.\")\n",
341332
" plt.show()\n",
342333
"\n",
343334
"except Exception as e:\n",
344-
" # Handle any errors that occur during data loading or processing\n",
345335
" print(f\"Error: Failed to load or process data from '{data_file}'. {str(e)}\")\n"
346336
]
347337
}

hands-on/session II/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ By the end of the tutorial, you will learn how to:
3030

3131
- **Build a modular workflow** that integrates your application with NSDF services
3232

33-
- ***Upload, download, and stream data** across **public and private storage** platforms
33+
- **Upload, download, and stream data** across **public and private storage** platforms
3434

3535
- Use the NSDF dashboard for **large-scale data access, visualization, and analysis**.
3636

hands-on/session III/README.md

Lines changed: 81 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,58 @@
1-
## Publicly Deployed Dashboards
2-
Publicly available dashboards for different purposed can be available from the links below.
1+
# **NSDF Tutorial: Using NSDF for End-to-End Analysis of Scientific Data - Petascale Ocean Data**
32

4-
- NASA Petascale Climate Data Exploration
5-
[```https://chpc3.nationalsciencedatafabric.org:11957/```](https://chpc3.nationalsciencedatafabric.org:11957/)
3+
<p align="center">
4+
<img src="images/Logos.png" width="450">
5+
</p>
66

7-
- NASA Coupled Dashboard for studying relationships between oceanic and atmospheric variables
8-
[```https://chpc3.nationalsciencedatafabric.org:11857/run```](https://chpc3.nationalsciencedatafabric.org:11857/run)
7+
<p align="center">
8+
<a href="https://www.python.org/downloads/release/python-310/"><img alt="Python 3.10" src="https://img.shields.io/badge/Python-3.10-3776AB.svg?style=flat&logo=python&logoColor=white"></a>
9+
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="License" src="https://img.shields.io/badge/License-Apache_2.0-green.svg"></a>
10+
<a href="https://nsdf-workspace.slack.com/"><img alt="Slack" src="https://badges.aleen42.com/src/slack.svg"></a>
11+
<a href="https://www.docker.com"><img alt="Docker" src="https://badges.aleen42.com/src/docker.svg"></a>
12+
<a href="https://github.com/astral-sh/ruff"><img alt="Ruff" src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json"></a>
13+
<a href="https://doi.org/10.5281/zenodo.10794642"><img alt="DOI" src="https://zenodo.org/badge/DOI/10.5281/zenodo.10794642.svg"></a>
14+
<a href="https://dl.acm.org/doi/10.1145/3588195.3595941"><img alt="DOI" src="https://zenodo.org/badge/DOI/10.1145/3588195.3595941.svg"></a>
15+
<a href="https://research.ibm.com/publications/enabling-scalability-in-the-cloud-for-scientific-workflows-an-earth-science-use-case"><img alt="DOI" src="https://zenodo.org/badge/DOI/10.1109/CLOUD60044.2023.00052.svg"></a>
16+
<a href="https://ieeexplore.ieee.org/document/9041768"><img alt="DOI" src="https://zenodo.org/badge/DOI/10.1109/eScience.2019.00008.svg"></a>
17+
<a href="http://doi.org/10.1145/582034.582036"><img alt="DOI" src="https://zenodo.org/badge/DOI/10.1145/582034.582036.svg"></a>
18+
<a href="https://www.taylorfrancis.com/chapters/edit/10.1201/b12985-32/visus-visualization-frame[…]a-gyulassy-cameron-christensen-sujin-philip-sidharth-kumar"><img alt="DOI" src="https://zenodo.org/badge/DOI/10.1201/b12985.svg"></a>
19+
<a href="https://doi.org/10.1145/1944846.1944847"><img alt="DOI" src="https://zenodo.org/badge/DOI/10.1145/1944846.1944847.svg"></a>
20+
</p>
921

10-
- NASA NEX-GDDP-CMIP6 Dataset
11-
[```https://chpc3.nationalsciencedatafabric.org:12347/```](https://chpc3.nationalsciencedatafabric.org:12347)
1222

13-
## Instructions to launch dashboard using NASA LLC2160 dataset from your machine or Github Codespaces
23+
24+
## Overview
25+
26+
This section of the tutorial introduces access to a petascale climate dataset hosted on the <a href ="https://osg-htc.org/services/osdf"> Open Science Data Federation (OSDF)</a> and distributed across three storage origins. The dataset is accessible through the <a href="https://pelicanplatform.org/"> Pelican platform </a> via direct URLs. It walks users through retrieving the data, performing basic statistical analyses, querying downsampled data for faster exploration, and extracting specific subregions for detailed study using scalable, cloud-native tools.
27+
28+
By the end of the tutorial, you will learn how to:
29+
30+
- **Access publicly available petascale datasets**
31+
32+
- Treat the petascale data as a NumPy array and **perform statistical analysis**
33+
34+
- Use the NSDF dashboard for **large-scale data access, visualization, and analysis**.
35+
36+
<p align="center">
37+
<img src="images/workflow.png" width="800">
38+
<br>
39+
<em>Figure 1. Workflow diagram illustrating the tutorial's process of data retrieval, visualization and downsampled analysis using the NSDF services.</em>
40+
</p>
41+
1442
----
15-
## Running the Tutorial with GitHub Codespaces
43+
## Table of contents
44+
45+
1. [Running the Tutorial](#running-the-tutorial)
46+
2. [Option 1: GitHub Codespaces (Recommended)](#option-1-GitHub-codespaces-recommended)
47+
3. [Option 2: Local Machine](#option-2-local)
48+
5. [Community and Resources](#community-and-resources)
49+
7. [Publications](#publications)
50+
8. [Copyright and License](#copyright-and-license)
51+
9. [Authors](#authors)
52+
10. [Acknowledgments](#acknowledgments)
53+
54+
## Running the Tutorial
55+
### Option 1: GitHub Codespaces (Recommended)
1656

1757
> :bulb: **Note:** To follow this tutorial using the GitHub Codespaces you must have a GitHub Account
1858
@@ -24,7 +64,7 @@ Please click the next button to open in GitHub Codespaces
2464

2565
Now follow these steps to set up your virtual environment using GitHub codespaces:
2666

27-
Verify that you are using the `main` branch, the repository name `nsdf-fabric/Tutorial_2024_IEEE_VIS` and the dev container configuration `NSDF Tutorial - Session III`. Then click on `Create Codespace`
67+
Verify that you are using the `main` branch, the repository name `TauferLab/NSDF-Tutorial-2025` and the dev container configuration `NSDF Tutorial - Session III`. Then click on `Create Codespace`
2868

2969
<p align="center">
3070
<img src="files/docs/codespaces.png" width="800">
@@ -87,8 +127,8 @@ Please click this link here. DO NOT copy and paste the link.
87127

88128

89129
----
90-
## Running the dashboard from your local machine:
91-
### Basic Pre-requirements
130+
### Option 2: Local Machine
131+
#### Basic Pre-requirements
92132
- Download [Python](https://www.python.org/downloads/) version > 3.8 and version< 3.12 depending on your OS
93133
- Install and setup latest version of [Git](https://git-scm.com/downloads)
94134

@@ -163,9 +203,25 @@ We understand that extracting a region from this huge dataset can be extremely u
163203

164204
- *Detailed Stats*: The detailed view also shows the minimum and amximum value for the selected region. If users want to download the data locally, it also shows the approximate file size. Again, this is set to a 20 MB max so that users don't accidentally download large chunk of data in their local machine without being aware of.
165205

206+
---
207+
## Community and Resources:
208+
209+
NSDF and OpenVisus are open-source projects. Questions, discussions, and contributions are welcome. Contributions can include new packages, bug fixes, documentation, or even new core features.
210+
166211

212+
NSDF Resources:
213+
214+
- **Slack workspace**: [nsdf-workspace](https://nsdf-workspace.slack.com/).
215+
- **Github Discussions**: [issues](https://github.com/nsdf-fabric/catalog-comparison-tool/issues): Discussions and Q&A.
216+
- **Mailing list**: [https://groups.google.com/g/nsdf](https://groups.google.com/g/nsdf) - nsdf@googlegroups.com
217+
- **LinkedIn**: [LinkedIn](https://www.linkedin.com/company/76216771/admin/dashboard/)
218+
219+
OpenVisus Resources:
220+
221+
- **Github:** [Open Source distribution of the ViSUS capabilities](https://github.com/sci-visus/openvisus)
222+
- **Webpage:** [VISUS - High performance Big Data Analysis and Visualization Solutions](https://visus.org/)
167223
---
168-
### Contact
224+
### Authors
169225

170226
Please feel free to contact us here for detailed information:
171227
- Aashish Panta [Email me](mailto:aashishpanta0@gmail.com)
@@ -177,8 +233,15 @@ We understand that extracting a region from this huge dataset can be extremely u
177233

178234

179235
1. Aashish Panta,Xuan Huang, Nina McCurdy, David Ellsworth, Amy A. Gooch, Giorgio Scorzelli, Hector Torres, Patrice Klein, Gustavo A. Ovando-Montejo, Valerio Pascucci. “Web-based Visualization and Analytics of Petascale data: Equity as a Tide that Lifts All Boats”. LDAV 2024
180-
2. DYAMOND Visualization Data. https://gmao.gsfc.nasa.gov/global_mesoscale/dyamond_phaseII/data_access/
181-
3. DYAMOND Visualization Data LLC2160 ocean dataset. https://data.nas.nasa.gov/viz/vizdata/DYAMOND_c1440_llc2160/GEOS/index.html.
182-
4. Pascucci, Valerio, et al. "The ViSUS visualization framework." High Performance Visualization. Chapman and Hall/CRC, 2012. 439-452. [Here](https://www.taylorfrancis.com/chapters/edit/10.1201/b12985-32/visus-visualization-framework-valerio-pascucci-giorgio-scorzelli-brian-summa-peer-timo-bremer-attila-gyulassy-cameron-christensen-sujin-philip-sidharth-kumar)
183-
5. Brian Summa, Giorgio Scorzelli, Ming Jiang, Peer-Timo Bremer, and Valerio Pascucci. 2011. Interactive editing of massive imagery made simple: Turning Atlanta into Atlantis. ACM Trans. Graph. 30, 2, Article 7 (April 2011), 13 pages. [Here](https://dl.acm.org/doi/10.1145/1944846.1944847)
236+
2. Pascucci, Valerio, et al. "The ViSUS visualization framework." High Performance Visualization. Chapman and Hall/CRC, 2012. 439-452. [Here](https://www.taylorfrancis.com/chapters/edit/10.1201/b12985-32/visus-visualization-framework-valerio-pascucci-giorgio-scorzelli-brian-summa-peer-timo-bremer-attila-gyulassy-cameron-christensen-sujin-philip-sidharth-kumar)
237+
3. Brian Summa, Giorgio Scorzelli, Ming Jiang, Peer-Timo Bremer, and Valerio Pascucci. 2011. Interactive editing of massive imagery made simple: Turning Atlanta into Atlantis. ACM Trans. Graph. 30, 2, Article 7 (April 2011), 13 pages. [Here](https://dl.acm.org/doi/10.1145/1944846.1944847)
238+
239+
## Acknowledgments
240+
241+
The authors of this tutorial would like to express their gratitude to:
242+
243+
- NSF through the awards 2138811, 2103845, 2334945, 2138296, and 2331152.
244+
- NASA Ames Research Center and NASA JPL
245+
- Open Science Data Federation (OSDF) and Pelican Platform Team
184246

247+
Any opinions, findings, conclusions, or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
293 KB
Loading
259 KB
Loading

0 commit comments

Comments
 (0)