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.
- 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.
- Python 3.10 or higher
- Poetry (for dependency management)
git clone git@github.com:NOC-OI/class_streamlit_zarr.git
cd class_streamlit_zarr
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
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
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.
In the app, you will first select a bucket by its chunk strategy. This is done by selecting an option from the dropdown menu.
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.
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).
Click on the "Clip and Plot Data" button to generate and visualize the data according to your preferences.
If you would like to contribute to this project, please fork the repository and create a pull request with your changes.
This project is licensed under the MIT License.