├── .gitignore ├── LICENSE ├── README.md ├── bokeh_plot.png ├── enmap_explore_cp.ipynb └── requirements.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | data/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | wheels/ 24 | pip-wheel-metadata/ 25 | share/python-wheels/ 26 | *.egg-info/ 27 | .installed.cfg 28 | *.egg 29 | MANIFEST 30 | 31 | # PyInstaller 32 | # Usually these files are written by a python script from a template 33 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 34 | *.manifest 35 | *.spec 36 | 37 | # Installer logs 38 | pip-log.txt 39 | pip-delete-this-directory.txt 40 | 41 | # Unit test / coverage reports 42 | htmlcov/ 43 | .tox/ 44 | .nox/ 45 | .coverage 46 | .coverage.* 47 | .cache 48 | nosetests.xml 49 | coverage.xml 50 | *.cover 51 | *.py,cover 52 | .hypothesis/ 53 | .pytest_cache/ 54 | 55 | # Translations 56 | *.mo 57 | *.pot 58 | 59 | # Django stuff: 60 | *.log 61 | local_settings.py 62 | db.sqlite3 63 | db.sqlite3-journal 64 | 65 | # Flask stuff: 66 | instance/ 67 | .webassets-cache 68 | 69 | # Scrapy stuff: 70 | .scrapy 71 | 72 | # Sphinx documentation 73 | docs/_build/ 74 | 75 | # PyBuilder 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | .python-version 87 | 88 | # pipenv 89 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 90 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 91 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 92 | # install all needed dependencies. 93 | #Pipfile.lock 94 | 95 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 96 | __pypackages__/ 97 | 98 | # Celery stuff 99 | celerybeat-schedule 100 | celerybeat.pid 101 | 102 | # SageMath parsed files 103 | *.sage.py 104 | 105 | # Environments 106 | .env 107 | .venv 108 | env/ 109 | venv/ 110 | ENV/ 111 | env.bak/ 112 | venv.bak/ 113 | 114 | # Spyder project settings 115 | .spyderproject 116 | .spyproject 117 | 118 | # Rope project settings 119 | .ropeproject 120 | 121 | # mkdocs documentation 122 | /site 123 | 124 | # mypy 125 | .mypy_cache/ 126 | .dmypy.json 127 | dmypy.json 128 | 129 | # Pyre type checker 130 | .pyre/ 131 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Glenn Moncrieff 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # xarray-enmap 2 | notebooks to get started working with enmap hyperspectral data in python 3 | 4 | ----- 5 | 6 | The best way to get started with data from the [DLR](https://www.dlr.de/EN/Home/home_node.html) hyperspectral mission [EnMap](https://www.enmap.org/) is to use the QGIS plugin EnMAP box. 7 | 8 | If you want to do analyses on large multi-image mosaics, fuse EnMAP with other satellite data, or do some scalable ML, you will need to use python tools like xarray and dask. This repo contains a notebook to get you started with using EnMAP data in python with xarray and doing some ML using dask-ml. This notebook is very basic and leaves out many data quality checks and model checks that you should do in a real-world setting. 9 | 10 | To get access to EnMAP data sign up [here](https://planning.enmap.org/) 11 | 12 | ![pca plot](bokeh_plot.png) 13 | -------------------------------------------------------------------------------- /bokeh_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GMoncrieff/xarray-enmap/5fe66a20523486905db236ff393b704601e1c90e/bokeh_plot.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | affine==2.3.1 2 | anyio==3.6.2 3 | appdirs==1.4.4 4 | argon2-cffi==21.3.0 5 | argon2-cffi-bindings==21.2.0 6 | asciitree==0.3.3 7 | asttokens==2.1.0 8 | attrs==22.1.0 9 | backcall==0.2.0 10 | beautifulsoup4==4.11.1 11 | bleach==5.0.1 12 | bokeh==2.4.3 13 | Bottleneck==1.3.5 14 | brotlipy 15 | Cartopy 16 | certifi==2022.9.24 17 | cffi 18 | cfgrib==0.9.10.2 19 | cftime==1.6.2 20 | charset-normalizer 21 | click 22 | click-plugins==1.1.1 23 | cligj==0.7.2 24 | cloudpickle 25 | colorcet 26 | contourpy 27 | cryptography 28 | cycler 29 | dask 30 | dask-glm==0.2.0 31 | dask-ml==2022.5.27 32 | datashader 33 | datashape==0.5.4 34 | debugpy==1.6.3 35 | decorator==5.1.1 36 | defusedxml==0.7.1 37 | distributed==2022.10.2 38 | eccodes==1.5.0 39 | entrypoints 40 | executing==1.2.0 41 | fasteners==0.18 42 | fastjsonschema==2.16.2 43 | findlibs==0.0.2 44 | Fiona==1.8.22 45 | flox==0.6.3 46 | fonttools 47 | fsspec 48 | geopandas==0.12.1 49 | geoviews==1.9.5 50 | h5netcdf==1.0.2 51 | h5py==3.7.0 52 | HeapDict==1.0.1 53 | holoviews==1.15.2 54 | hvplot==0.8.1 55 | idna 56 | ipykernel==6.17.1 57 | ipython==8.6.0 58 | ipython-genutils==0.2.0 59 | ipywidgets==8.0.2 60 | jedi==0.18.1 61 | Jinja2==3.1.2 62 | joblib==1.2.0 63 | jsonschema==4.17.0 64 | jupyter==1.0.0 65 | jupyter-client==7.0.0 66 | jupyter-console==6.4.4 67 | jupyter-server==1.23.1 68 | jupyter_core 69 | jupyterlab-pygments==0.2.2 70 | jupyterlab-widgets==3.0.3 71 | kiwisolver 72 | llvmlite==0.39.1 73 | locket 74 | Markdown==3.4.1 75 | MarkupSafe==2.1.1 76 | matplotlib 77 | matplotlib-inline==0.1.6 78 | mistune==2.0.4 79 | msgpack==1.0.4 80 | multipledispatch==0.6.0 81 | munch==2.5.0 82 | munkres==1.1.4 83 | nb-conda-kernels 84 | nbclassic==0.4.8 85 | nbclient==0.7.0 86 | nbconvert==7.2.4 87 | nbformat==5.7.0 88 | nc-time-axis==1.4.1 89 | nest-asyncio 90 | netCDF4==1.6.1 91 | notebook==6.5.2 92 | notebook_shim==0.2.2 93 | numba==0.56.4 94 | numbagg==0.2.1 95 | numcodecs==0.10.2 96 | numpy 97 | numpy-groupies==0.9.20 98 | packaging 99 | pandas==1.5.1 100 | pandocfilters==1.5.0 101 | panel==0.14.1 102 | param 103 | parso==0.8.3 104 | partd 105 | pexpect==4.8.0 106 | pickleshare==0.7.5 107 | Pillow==9.3.0 108 | platformdirs==2.5.4 109 | pooch==1.6.0 110 | prometheus-client==0.15.0 111 | prompt-toolkit==3.0.32 112 | psutil==5.9.4 113 | ptyprocess==0.7.0 114 | pure-eval==0.2.2 115 | pycparser 116 | pyct==0.4.8 117 | Pygments==2.13.0 118 | pyOpenSSL 119 | pyparsing 120 | pyproj 121 | pyrsistent==0.19.2 122 | pyshp 123 | PySocks 124 | python-dateutil 125 | pytz 126 | pyviz-comms==2.2.1 127 | PyYAML 128 | pyzmq 129 | qtconsole==5.4.0 130 | QtPy==2.3.0 131 | rasterio==1.3.3 132 | requests 133 | rioxarray==0.13.1 134 | scikit-learn==1.1.3 135 | scipy==1.9.3 136 | seaborn==0.12.1 137 | Send2Trash==1.8.0 138 | Shapely 139 | six 140 | sklearn-xarray==0.4.0 141 | sniffio==1.3.0 142 | snuggs==1.4.7 143 | sortedcontainers==2.4.0 144 | soupsieve==2.3.2.post1 145 | stack-data==0.6.1 146 | tblib==1.7.0 147 | terminado==0.17.0 148 | threadpoolctl==3.1.0 149 | tinycss2==1.2.1 150 | toolz 151 | tornado==6.1 152 | tqdm==4.64.1 153 | traitlets 154 | typing_extensions==4.4.0 155 | unicodedata2 156 | urllib3==1.26.12 157 | wcwidth==0.2.5 158 | webencodings==0.5.1 159 | websocket-client==1.4.2 160 | widgetsnbextension==4.0.3 161 | xarray 162 | xgboost==1.5.0 163 | xoak==0.1.1 164 | zarr==2.13.3 165 | zict==2.2.0 166 | --------------------------------------------------------------------------------