Visualize classified time series data with interactive Sankey plots in Google Earth Engine.
Project description
sankee
Visualize changes in classified time series data with interactive Sankey plots in Google Earth Engine
Description
Use Earth Engine to visualize changes in land cover, plant health, burn severity, or any other time series of classified imagery with interactive Sankey plots. Use a library of built-in datasets for convenience or define your own custom datasets for flexibility.
Installation
Pip
pip install sankee
Conda
conda install -c conda-forge sankee
Quickstart
Premade Datasets
Visualize annual changes in land cover using popular LULC datasets with a couple lines of code. Just choose a dataset, an area of interest, and a list of years to generate a Sankey diagram from a premade dataset. Below, we can look at 30 years of vegetation recovery in the area devastated by the Mt. St. Helens eruption.
import sankee
import ee
ee.Initialize()
sankee.datasets.LCMS_LC.sankify(
years=[1990, 2000, 2010, 2020],
region=ee.Geometry.Point([-122.192688, 46.25917]).buffer(2000),
max_classes=3,
title="Mt. St. Helens Recovery"
)
Check out the example notebook for an interactive demo.
Custom Datasets
Any classified images can be used by defining the dataset parameters (which pixel values correspond to which labels and colors). For example, we can look at classified Dynamic World scenes just two weeks apart that show substantial snow loss on Mountain Jefferson during the 2021 Heat Dome in the Pacific Northwest.
import sankee
import ee
ee.Initialize()
# Load a set of classified images
img_list = [
ee.Image("GOOGLE/DYNAMICWORLD/V1/20210616T185919_20210616T190431_T10TEQ"),
ee.Image("GOOGLE/DYNAMICWORLD/V1/20210706T185919_20210706T190638_T10TEQ")
]
# Which band contains the classified data?
band = "label"
# What labels correspond to which pixel values?
labels = {
0: "Water", 1: "Trees", 2: "Grass", 3: "Flooded", 4: "Crops",
5: "Shrub / Scrub", 6: "Build", 7: "Bare", 8: "Snow / Ice",
}
# What colors should be applied to which pixel values?
palette = {
0: "#419BDF", 1: "#397D49", 2: "#88B053", 3: "#7A87C6", 4: "#E49635",
5: "#DFC35A", 6: "#C4281B", 7: "#A59B8F", 8: "#B39FE1"
}
plot = sankee.sankify(
image_list=img_list,
band=band,
labels=labels,
palette=palette,
region=ee.Geometry.Point([-121.80183, 44.67655]).buffer(3000),
max_classes=3,
title="Mt. Jefferson Snow Loss - June 2021"
)
Integration with geemap
sankee premade datasets are usable through the geemap interactive GUI. Check out the documentation and video tutorials by @giswqs.
Contributing
If you find bugs or have feature requests, please open an issue!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sankee-0.3.0.tar.gz.
File metadata
- Download URL: sankee-0.3.0.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bf26895f08891390be851d8ff33d937def26e94f454c1872827210c8c16bf08
|
|
| MD5 |
084a22ed075921babd4a98fd74c2b07f
|
|
| BLAKE2b-256 |
bb91155adedd5d5355a2097e6272e1744b387ffc88572823f5eb2d29049869e9
|
Provenance
The following attestation bundles were made for sankee-0.3.0.tar.gz:
Publisher:
publish.yaml on aazuspan/sankee
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sankee-0.3.0.tar.gz -
Subject digest:
5bf26895f08891390be851d8ff33d937def26e94f454c1872827210c8c16bf08 - Sigstore transparency entry: 249092677
- Sigstore integration time:
-
Permalink:
aazuspan/sankee@04bb62f1fa94e4a7991fd751e63476faf7934fe9 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/aazuspan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@04bb62f1fa94e4a7991fd751e63476faf7934fe9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sankee-0.3.0-py3-none-any.whl.
File metadata
- Download URL: sankee-0.3.0-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
162ac5425a484b4f9172e18826c516abfd3c902d22df47cf98ba5fc183db5303
|
|
| MD5 |
7fb6d3cfcfa1ef3b422ea7db6ca47d95
|
|
| BLAKE2b-256 |
3f394e3aa0f07946d4ced95bd0aed7b63a9709641801e58efe746339b6571d47
|
Provenance
The following attestation bundles were made for sankee-0.3.0-py3-none-any.whl:
Publisher:
publish.yaml on aazuspan/sankee
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sankee-0.3.0-py3-none-any.whl -
Subject digest:
162ac5425a484b4f9172e18826c516abfd3c902d22df47cf98ba5fc183db5303 - Sigstore transparency entry: 249092681
- Sigstore integration time:
-
Permalink:
aazuspan/sankee@04bb62f1fa94e4a7991fd751e63476faf7934fe9 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/aazuspan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@04bb62f1fa94e4a7991fd751e63476faf7934fe9 -
Trigger Event:
push
-
Statement type: