Skip to content

NOC-OI/class_streamlit_zarr

Repository files navigation

Zarr Data Visualization App

Overview

This repository contains a Streamlit-based web application designed to visualize Zarr datasets. The application provides an interactive interface for users to select and visualize local raster datasets using various plotting libraries like Plotly, Cartopy, and Leaflet. The app is particularly useful for handling large-scale geospatial data and allows for customization of plot styles and color palettes.

Features

  • Dataset Selection: Choose datasets and variables from Zarr files.
  • Map Visualization: Visualize datasets using Plotly, Cartopy, or Leaflet.
  • Custom Plotting: Customize the plot with different color palettes, scales, and map projections.
  • Interactive Controls: Adjust latitude, longitude, and time limits for specific data slices.

Prerequisites

  • Python 3.10 or higher
  • Poetry (for dependency management)

Setup

1. Clone the Repository

git clone [email protected]:NOC-OI/class_streamlit_zarr.git
cd class_streamlit_zarr

2. Install Dependencies

Make sure you have Poetry installed. If not, you can install it using the following command:

pip install poetry

Once Poetry is installed, install the project dependencies:

poetry install

3. Environment Variables

Create a .env file in the root of the project and add the following environment variables:

aws_secret_access_key= # bucket secret
aws_access_key_id= # bucket key
endpoint_url= # bucket endpoint url
TILESERVER_URL= # TileServer URL for loading and displaying map tiles

4. Run the Application

After setting up the environment, you can start the Streamlit application:

poetry run streamlit run app.py

The application will start and can be accessed at http://localhost:8501 in your web browser.

Usage

1. Select Bucket

In the app, you will first select a bucket by its chunk strategy. This is done by selecting an option from the dropdown menu.

2. Select Dataset and Variable

After selecting the bucket, you can choose the dataset and variable to visualize. The app provides a list of variables available in the selected dataset.

3. Define Plotting Preferences

You can choose from different plotting styles (Plotly, Cartopy, Leaflet) and customize your plot with the following options:

  • Latitude and Longitude Limits: Adjust the geographical bounds of the plot.
  • Time Counter: Select a specific timestamp if your data includes temporal dimensions.
  • Color Palette: Choose a color palette for your plot.
  • Scale: Set minimum and maximum values for the color scale (Leaflet only).

4. Plot Data

Click on the "Clip and Plot Data" button to generate and visualize the data according to your preferences.

Contributing

If you would like to contribute to this project, please fork the repository and create a pull request with your changes.

License

This project is licensed under the MIT License.

About

Streamlit application for zarr files visualisation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published