forked from scivision-gallery/scivision-basic-usage-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stac.py
36 lines (30 loc) · 710 Bytes
/
stac.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.14.1
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
# name: python3
# ---
from scivision import load_dataset
import matplotlib.pyplot as plt
data = load_dataset('https://github.com/alan-turing-institute/scivision_sentinel2_stac')
yy = data.load_data(resolution=20, bands=("red", "green", "blue"))
yy = yy.compute()
_ = (
yy.isel(time=0)
.to_array("band")
.plot.imshow(
col="band",
size=4,
vmin=0,
vmax=4000,
)
)
plt.show()