EarthNet Toolkit
The EarthNet2021 Toolkit.
Documentation
Find more information on https://www.earthnet.tech.
Install
pip install earthnet
Downloading new dataset EarthNet2023 - Africa
Ensure you have enough free disk space! We recommend 1.5TB.
import earthnet as entk
entk.download(dataset = "earthnet2023", split = "all", save_directory = "data_dir")
Where data_dir is the directory where EarthNet2023 - Africa shall be saved and split is "all" or a subset of ["train", "test].
When using EarthNet2023 - Africa, please for now cite the DOI 10.5281/zenodo.10659371, until there is an original publication on the dataset.
Vitus Benson, Christian Requena-Mesa, Jeran Poehls, Lazaro Alonso, Claire Robin, Nuno Carvalhais, Markus Reichstein. (2024).
EarthNet Toolkit for accessing the EarthNet2023 - Africa dataset.
Zenodo. https://doi.org/10.5281/zenodo.10659371
This work has received funding from the European Union’s Horizon 2020 Research and Innovation Project DeepCube, under Grant Agreement Numbers 101004188.
Downloading new dataset EarthNet2021x / GreenEarthNet
Ensure you have enough free disk space! We recommend 1TB.
import earthnet as en
en.download(dataset = "earthnet2021x", split = "train", save_directory = "data_dir")
Where data_dir is the directory where EarthNet2021 shall be saved and split is "all"or a subset of ["train","iid","ood","extreme","seasonal"].
Scoring new dataset EarthNet2021x
Save your predictions for one test set in one folder in the following way:
{pred_dir/region/cubename.nc}
Name your NDVI prediction variable as "ndvi_pred".
Then use the data_dir/dataset/split as the targets.
Then compute the normalized NSE over the full dataset:
import earthnet as en
scores = en.score_over_dataset(Path/to/targets, Path/to/predictions)
print(scores["veg_macro_score"])
Alternatively you can score a single minicube:
import earthnet as en
df = en.normalized_NSE(Path/to/target_minicube, Path/to/prediction_minicube)
print(df.describe())
Download
Ensure you have enough free disk space! We recommend 1TB.
import earthnet as en
en.Downloader.get(data_dir, splits)
Where data_dir is the directory where EarthNet2021 shall be saved and splits is "all"or a subset of ["train","iid","ood","extreme","seasonal"].
Alternatively if package was installed locally:
cd earthnet-toolkit/earthnet/
python download.py -h
python download.py "Path/To/Download/To" "all"
For using in the commandline.
Use EarthNetScore
Save your predictions for one test set in one folder in one of the following ways:
{pred_dir/tile/cubename.npz, pred_dir/tile/experiment_cubename.npz}
Then use the Path/To/Download/To/TestSet as the targets.
Then use the EarthNetScore:
import earthnet as en
en.EarthNetScore.get_ENS(Path/to/predictions, Path/to/targets, data_output_file = Path/to/data.json, ens_output_file = Path/to/ens.json)
Get Coordinates for a cube
Getting Lon-Lat-coordinates for a cube or tile is as simple as:
import earthnet as en
en.get_coords_from_cube(cubename, return_meso = False)
en.get_coords_from_tile(tilename)
Plotting a cube
Creating a gallery view for a cube is done as follows:
import earthnet as en
import matplotlib.pyplot as plt
fig = en.cube_gallery(cubepath, variable = "ndvi")
plt.show()
Creating a NDVI timeseries view for a cube is done as follows:
import earthnet as en
import matplotlib.pyplot as plt
fig = en.cube_ndvi_timeseries(predpath, targpath)
plt.show()
Metadata
Release files for earthnet 0.3.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| earthnet-0.3.11.tar.gz | 1.1 MB | Without provenance | Details for earthnet-0.3.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| earthnet-0.3.11-py3-none-any.whl | Python 3 | none | any | Details for earthnet-0.3.11-py3-none-any.whl |
Total release size: 2.2 MB
Release files / earthnet-0.3.11.tar.gz
| Download URL | earthnet-0.3.11.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
badb5e464edcdf9a8a8266bd13169d8d1c9eb73f671b16e477aaf1f9603c26c9
|
|
BLAKE2b-256 checksum How to use checksums |
40669afc80d07d70022bc8ac289e5724c780f1477c5247139fcdb8232d57fb65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.13
|
Release files / earthnet-0.3.11-py3-none-any.whl
| Download URL | earthnet-0.3.11-py3-none-any.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
163c3c138f8ccb91b8bf24043b0924d4b6de0a96ecf8f05fe1194e3e8cad34e9
|
|
BLAKE2b-256 checksum How to use checksums |
9de0278141b3984d072f22566d8b6dedc3bb37ce43ff434741756d49abbc3081
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.13
|
Security for earthnet 0.3.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.