├── .gitignore ├── EJAtlas.ipynb ├── LICENSE ├── README.md ├── assets ├── GOES-16_ABI_RadF_true_color_20180910_170031_GOES-East.small.png ├── array_imshow_10.png ├── array_print_10.png ├── geostationary_orbit.mp4 ├── goes16_abi_4channel_montage.png ├── goes16_abi_cartopy_florida.png ├── goes16_sectors.png └── polar_orbit_with_path.mp4 ├── data ├── bbox_london.geojson └── markers.json ├── ibge.png ├── img ├── choropleth_map.png ├── datawrapper_maps.png ├── globalforestwatch.png ├── ibge.png ├── readme.md ├── satellite_data_sources.png ├── symbol_map.png └── terrasindigenas.png ├── markers.json ├── notebooks ├── BeautifulSoup.ipynb ├── EJAtlas.ipynb ├── Folium.ipynb ├── Teledetección y Python para analizar los efectos de la COVID-19.ipynb ├── geopandas-1.ipynb └── geopandas-2.ipynb ├── notebooks_delete ├── requirements.txt └── workshops └── siglibre-2023 ├── INSTALL.md ├── README.md ├── data ├── cat │ ├── Eleccions_Municipals_2023__resultats_provisionals_de_les_votacions_per_municipi.csv │ ├── Poblaci__de_Catalunya_per_municipi__rang_d_edat_i_sexe.csv │ ├── divisions-administratives-v2r1-catalunya-1000000-20230511.json │ ├── divisions-administratives-v2r1-comarques-1000000-20230511.json │ ├── divisions-administratives-v2r1-municipis-1000000-20230511.json │ └── divisions-administratives-v2r1-provincies-1000000-20230511.json ├── geo │ ├── 103.geojson │ ├── baikal.geojson │ ├── bbox_navarra.geojson │ ├── girona.geojson │ ├── lapalma.geojson │ ├── municipios_cat.geojson │ ├── navarra.geojson │ ├── pamplona.geojson │ ├── pamplona_b.geojson │ ├── provincias_cat.geojson │ ├── sanguesa.geojson │ └── toulouse.geojson ├── natalidad.csv └── provincias.geojson ├── notebooks ├── 0_geopandas.ipynb ├── 1_folium.ipynb ├── 2_sentinelsat.ipynb ├── 3_STAC.ipynb ├── 4_NDVI.ipynb ├── 5_SAM.ipynb └── ipyleaflet.ipynb ├── requirements.in └── 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 | # Assets 10 | assets/ 11 | 12 | # Slides 13 | *.pptx 14 | *.odp 15 | # Distribution / packaging 16 | .Python 17 | build/ 18 | develop-eggs/ 19 | dist/ 20 | downloads/ 21 | eggs/ 22 | .eggs/ 23 | lib/ 24 | lib64/ 25 | parts/ 26 | sdist/ 27 | var/ 28 | wheels/ 29 | pip-wheel-metadata/ 30 | share/python-wheels/ 31 | *.egg-info/ 32 | .installed.cfg 33 | *.egg 34 | MANIFEST 35 | 36 | # PyInstaller 37 | # Usually these files are written by a python script from a template 38 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 39 | *.manifest 40 | *.spec 41 | 42 | # Installer logs 43 | pip-log.txt 44 | pip-delete-this-directory.txt 45 | 46 | # Unit test / coverage reports 47 | htmlcov/ 48 | .tox/ 49 | .nox/ 50 | .coverage 51 | .coverage.* 52 | .cache 53 | nosetests.xml 54 | coverage.xml 55 | *.cover 56 | *.py,cover 57 | .hypothesis/ 58 | .pytest_cache/ 59 | 60 | # Translations 61 | *.mo 62 | *.pot 63 | 64 | # Django stuff: 65 | *.log 66 | local_settings.py 67 | db.sqlite3 68 | db.sqlite3-journal 69 | 70 | # Flask stuff: 71 | instance/ 72 | .webassets-cache 73 | 74 | # Scrapy stuff: 75 | .scrapy 76 | 77 | # Sphinx documentation 78 | docs/_build/ 79 | 80 | # PyBuilder 81 | target/ 82 | 83 | # Jupyter Notebook 84 | .ipynb_checkpoints 85 | 86 | # IPython 87 | profile_default/ 88 | ipython_config.py 89 | 90 | # pyenv 91 | .python-version 92 | 93 | # pipenv 94 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 95 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 96 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 97 | # install all needed dependencies. 98 | #Pipfile.lock 99 | 100 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 101 | __pypackages__/ 102 | 103 | # Celery stuff 104 | celerybeat-schedule 105 | celerybeat.pid 106 | 107 | # SageMath parsed files 108 | *.sage.py 109 | 110 | # Environments 111 | .env 112 | .venv 113 | env/ 114 | venv/ 115 | ENV/ 116 | env.bak/ 117 | venv.bak/ 118 | 119 | # Spyder project settings 120 | .spyderproject 121 | .spyproject 122 | 123 | # Rope project settings 124 | .ropeproject 125 | 126 | # mkdocs documentation 127 | /site 128 | 129 | # mypy 130 | .mypy_cache/ 131 | .dmypy.json 132 | dmypy.json 133 | 134 | # Pyre type checker 135 | .pyre/ 136 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Alberto Labarga 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 | # geospatial-python 2 | 3 | ## INSTALL REQUIREMENTS 4 | - Download or clone this repo 5 | - Install [Python 3.9](https://www.python.org/downloads/) 6 | - Install required libraries: `pip install -r workshops/siglibre-2023/requirements.txt` 7 | - CReate account in [Copernicus Open Access Hub](https://scihub.copernicus.eu/userguide/SelfRegistration) 8 | - Download datasets: 9 | - [Mapa de cultivos y aprovechamientos de Navarra (2021)](https://idena.navarra.es/descargas/OCUPAC_Pol_MCA_VE2021.zip) 10 | - Projects 11 | - Segmentation 12 | - https://github.com/AlbughdadiM/satellite-sam-dashboard/ (Clone or download) 13 | - https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth (model) 14 | 15 | ## Topics 16 | 17 | * Introduction to geospatial data. Main sources of information, data formats, examples. How to combine geospatial information with other sources of information. Refer to existing content in the Kit 18 | 19 | * How to get the data. 20 | 21 | * Basic intro to Python for non-developers 22 | 23 | * Introduction to geospatial data analysis in Python, with a focus on tabular vector data. It first focuses on introducing the participants to the different libraries to work with geospatial data and will cover munging geo-data and exploring relations over space. This includes importing data in different formats (e.g. shapefile, GeoJSON), visualizing, combining and tidying them up for analysis, and will use libraries such as pandas, geopandas, shapely, PySAL, or rasterio. 24 | 25 | * Creating interactive maps with Python 26 | 27 | * Analyzing satellite data 28 | * Copernicus es el programa civil de observación de la Tierra coordinado y gestionado por la Comisión Europea y la Agencia Europea del Medio Ambiente con el objetivo de proporcionar información precisa y actualizada en seis áreas temáticas: 29 | - cambio climático 30 | - seguridad 31 | - gestión de emergencias 32 | - atmósfera 33 | - ámbito terrestre 34 | 35 | * El satélite Sentinel-5p de la Agencia Espacial Europea lleva a bordo el sensor TROPOMI. Este sensor permite monitorizar concentraciones de gases como el ozono, el metano, el monóxido de carbono, el dióxido de nitrógeno o el óxido de azufre. Con una resolución espacial de unos 7kmx7km, Sentinel-5p cubre diariamente toda la superfície terrestre. De este modo puede hacerse un seguimiento exhaustivo de la evolución de estos gases, y analizar episodios muy concretos. 36 | 37 | * Acceso a Planet como empresa proveedora de imágenes de satélite y se enseñará paso a paso como usar Python notebooks en combinación con librerías de Planet y otras de tratamiento de imágenes para obtener un índice de vegetación (NDVI). 38 | 39 | ## Exposing the invisible Kit 40 | 41 | - [Using Maps to See Beyond the Obvious](https://kit.exposingtheinvisible.org/en/how/maps.html) 42 | - [Maps for advocacy](https://exposingtheinvisible.org/resources/maps-advocacy) [Booklet](https://www.civicspace.eu/upload/library/maps-for-advocacy-5d628d1228e69.pdf) 43 | - [Seeing the world through Google's eyes](https://exposingtheinvisible.org/resources/seeing-the-world-through-googles) 44 | - [Starting satellite investigations](https://exposingtheinvisible.org/resources/obtaining-evidence/starting-satellite-investigations) 45 | 46 | ## Using Datawrapper 47 | 48 | * How to visualize information using maps with [Datawrapper](https://www.datawrapper.de/maps/). Discuss point, bubble and choropleth map types, their uses, etc 49 | 50 | ![Maps with Datawrapper](https://raw.githubusercontent.com/alabarga/geospatial-python/master/img/datawrapper_maps.png) 51 | 52 | ## References 53 | - [Python for Journalists](https://github.com/winnydejong/pythonforjournalists) 54 | - [Coding for journalists](https://coding-for-journalists.readthedocs.io/en/latest/) 55 | - [Copernicus, el programa de observación de la Tierra](https://www.unigis.es/copernicus-observacion-tierra/) 56 | - [Mapping for Advocacy](https://www.opensocietyfoundations.org/publications/mapping-advocacy) 57 | - [Micro-satellite Data: Measuring Impact from Space](https://www.poverty-action.org/sites/default/files/publications/Goldilocks-Deep-Dive-Micro-satellite-Data-Measuring-Impact-from-Space_4.pdf) 58 | - [Teledetección y Python para analizar los efectos de la COVID-19](https://www.unigis.es/teledeteccion-y-python-para-analizar-los-efectos-de-la-covid-19/) 59 | - Introduction to Geospatial Data Analysis with Python ([video](https://www.youtube.com/watch?v=kJXUUO5M4ok&feature=youtu.be)) [Code](https://github.com/geopandas/scipy2018-geospatial-data) 60 | - [Análisis de imágenes de satélite con Python notebooks](https://www.unigis.es/webinar-analisis-de-imagenes-de-satelite-con-python-notebooks/) [Video](https://vimeo.com/427998599) [Code](https://github.com/ramiroaznar/ndvi-analysis) 61 | - [Geographic Data Science](http://darribas.org/gds19/) 62 | 63 | -------------------------------------------------------------------------------- /assets/GOES-16_ABI_RadF_true_color_20180910_170031_GOES-East.small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/assets/GOES-16_ABI_RadF_true_color_20180910_170031_GOES-East.small.png -------------------------------------------------------------------------------- /assets/array_imshow_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/assets/array_imshow_10.png -------------------------------------------------------------------------------- /assets/array_print_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/assets/array_print_10.png -------------------------------------------------------------------------------- /assets/geostationary_orbit.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/assets/geostationary_orbit.mp4 -------------------------------------------------------------------------------- /assets/goes16_abi_4channel_montage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/assets/goes16_abi_4channel_montage.png -------------------------------------------------------------------------------- /assets/goes16_abi_cartopy_florida.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/assets/goes16_abi_cartopy_florida.png -------------------------------------------------------------------------------- /assets/goes16_sectors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/assets/goes16_sectors.png -------------------------------------------------------------------------------- /assets/polar_orbit_with_path.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/assets/polar_orbit_with_path.mp4 -------------------------------------------------------------------------------- /data/bbox_london.geojson: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Feature", 3 | "geometry": { 4 | "type": "LineString", 5 | "coordinates": [ 6 | [-0.5103751, 51.6918741], [0.3340155, 51.6918741], [0.3340155, 51.2867602], [-0.5103751, 51.2867602] 7 | ] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ibge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/ibge.png -------------------------------------------------------------------------------- /img/choropleth_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/img/choropleth_map.png -------------------------------------------------------------------------------- /img/datawrapper_maps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/img/datawrapper_maps.png -------------------------------------------------------------------------------- /img/globalforestwatch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/img/globalforestwatch.png -------------------------------------------------------------------------------- /img/ibge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/img/ibge.png -------------------------------------------------------------------------------- /img/readme.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /img/satellite_data_sources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/img/satellite_data_sources.png -------------------------------------------------------------------------------- /img/symbol_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/img/symbol_map.png -------------------------------------------------------------------------------- /img/terrasindigenas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alabarga/geospatial-python/cf867a87da1b027fa6d9ec990b62851bc821f3e4/img/terrasindigenas.png -------------------------------------------------------------------------------- /notebooks/BeautifulSoup.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Web scraping using BeautifulSoup" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "## Summary\n", 15 | "\n", 16 | "This an introductory tutorial on web scraping in Python. All that is required to follow along is a basic understanding of the Python programming language.\n", 17 | "\n", 18 | "By the end of this tutorial, you will be able to scrape data from a static web page using the **requests** and **Beautiful Soup** libraries, and export that data into a structured text file using the **pandas** library." 19 | ] 20 | }, 21 | { 22 | "cell_type": "markdown", 23 | "metadata": {}, 24 | "source": [ 25 | "## Outline\n", 26 | "\n", 27 | "- What is web scraping?\n", 28 | "- Examining the New York Times article\n", 29 | " - Examining the HTML\n", 30 | " - Fact 1: HTML consists of tags\n", 31 | " - Fact 2: Tags can have attributes\n", 32 | " - Fact 3: Tags can be nested\n", 33 | "- Reading the web page into Python\n", 34 | "- Parsing the HTML using Beautiful Soup\n", 35 | " - Collecting all of the records\n", 36 | " - Extracting the date\n", 37 | " - Extracting the lie\n", 38 | " - Extracting the explanation\n", 39 | " - Extracting the URL\n", 40 | " - Recap: Beautiful Soup methods and attributes\n", 41 | "- Building the dataset\n", 42 | " - Applying a tabular data structure\n", 43 | " - Exporting the dataset to a CSV file\n", 44 | "- Summary: 16 lines of Python code\n", 45 | " - Appendix A: Web scraping advice\n", 46 | " - Appendix B: Web scraping resources\n", 47 | " - Appendix C: Alternative syntax for Beautiful Soup" 48 | ] 49 | }, 50 | { 51 | "cell_type": "markdown", 52 | "metadata": {}, 53 | "source": [ 54 | "## What is web scraping?\n", 55 | "\n", 56 | "On July 21, 2017, the New York Times updated an opinion article called [Trump's Lies](https://www.nytimes.com/interactive/2017/06/23/opinion/trumps-lies.html), detailing every public lie the President has told since taking office. Because this is a newspaper, the information was (of course) published as a block of text. This is a great format for human consumption, but it can't easily be understood by a computer. **In this tutorial, we'll extract the President's lies from the New York Times article and store them in a structured dataset.**\n", 57 | "\n", 58 | "This is a common scenario: You find a web page that contains data you want to analyze, but it's not presented in a format that you can easily download and read into your favorite data analysis tool. You might imagine manually copying and pasting the data into a spreadsheet, but in most cases, that is way too time consuming. A technique called **web scraping** is a useful way to automate this process.\n", 59 | "\n", 60 | "What is web scraping? It's the process of extracting information from a web page **by taking advantage of patterns** in the web page's underlying code. Let's start looking for these patterns!" 61 | ] 62 | }, 63 | { 64 | "cell_type": "markdown", 65 | "metadata": {}, 66 | "source": [ 67 | "## Examining the New York Times article\n", 68 | "\n", 69 | "Here's the way the article presented the information:\n", 70 | "\n", 71 | "![Screenshot of the article](images/article_1.png)\n", 72 | "\n", 73 | "When converting this into a dataset, **you can think of each lie as a \"record\" with four fields:**\n", 74 | "\n", 75 | "1. The date of the lie.\n", 76 | "2. The lie itself (as a quotation).\n", 77 | "3. The writer's brief explanation of why it was a lie.\n", 78 | "4. The URL of an article that substantiates the claim that it was a lie.\n", 79 | "\n", 80 | "Importantly, those fields have different formatting, which is consistent throughout the article: the date is bold red text, the lie is \"regular\" text, the explanation is gray italics text, and the URL is linked from the gray italics text.\n", 81 | "\n", 82 | "**Why does the formatting matter?** Because it's very likely that the code underlying the web page \"tags\" those fields differently, and we can take advantage of that pattern when scraping the page. Let's take a look at the source code, known as HTML:" 83 | ] 84 | }, 85 | { 86 | "cell_type": "markdown", 87 | "metadata": {}, 88 | "source": [ 89 | "## Examining the HTML\n", 90 | "\n", 91 | "To view the HTML code that generates a web page, you right click on it and select \"View Page Source\" in Chrome or Firefox, \"View Source\" in Internet Explorer, or \"Show Page Source\" in Safari. (If that option doesn't appear in Safari, just open Safari Preferences, select the Advanced tab, and check \"Show Develop menu in menu bar\".)\n", 92 | "\n", 93 | "Here are the first few lines you will see if you view the source of the New York Times article:\n", 94 | "\n", 95 | "![Screenshot of the source](images/source_1.png)\n", 96 | "\n", 97 | "Let's locate the **first lie** by searching the HTML for the text \"iraq\":\n", 98 | "\n", 99 | "![Screenshot of the source](images/source_2.png)\n", 100 | "\n", 101 | "Thankfully, you only have to understand **three basic facts** about HTML in order to get started with web scraping!" 102 | ] 103 | }, 104 | { 105 | "cell_type": "markdown", 106 | "metadata": {}, 107 | "source": [ 108 | "## Fact 1: HTML consists of tags\n", 109 | "\n", 110 | "You can see that the HTML contains the article text, along with \"tags\" (specified using angle brackets) that \"mark up\" the text. (\"HTML\" stands for Hyper Text Markup Language.)\n", 111 | "\n", 112 | "For example, one tag is ``, which means \"use bold formatting\". There is a `` tag before \"Jan. 21\" and a `` tag after it. The first is an \"opening tag\" and the second is a \"closing tag\" (denoted by the `/`), which indicates to the web browser **where to start and stop applying the formatting.** In other words, this tag tells the web browser to make the text \"Jan. 21\" bold. (Don't worry about the ` ` - we'll deal with that later.)" 113 | ] 114 | }, 115 | { 116 | "cell_type": "markdown", 117 | "metadata": {}, 118 | "source": [ 119 | "## Fact 2: Tags can have attributes\n", 120 | "\n", 121 | "HTML tags can have \"attributes\", which are specified in the opening tag. For example, `` indicates that this particular `` tag has a `class` attribute with a value of `short-desc`.\n", 122 | "\n", 123 | "For the purpose of web scraping, **you don't actually need to understand** the meaning of ``, `class`, or `short-desc`. Instead, you just need to recognize that tags can have attributes, and that they are specified in this particular way." 124 | ] 125 | }, 126 | { 127 | "cell_type": "markdown", 128 | "metadata": {}, 129 | "source": [ 130 | "## Fact 3: Tags can be nested\n", 131 | "\n", 132 | "Let's pretend my HTML code said:\n", 133 | "\n", 134 | "`Hello Ironhack students`\n", 135 | "\n", 136 | "The text **Ironhack students** would be bold, because all of that text is between the opening `` tag and the closing `` tag. The text ***Ironhack*** would also be in italics, because the `` tag means \"use italics\". The text \"Hello\" would not be bold or italics, because it's not within either the `` or `` tags. Thus, it would appear as follows:\n", 137 | "\n", 138 | "Hello ***Ironhack* students**\n", 139 | "\n", 140 | "The central point to take away from this example is that **tags \"mark up\" text from wherever they open to wherever they close,** regardless of whether they are nested within other tags.\n", 141 | "\n", 142 | "Got it? You now know enough about HTML in order to start web scraping!" 143 | ] 144 | }, 145 | { 146 | "cell_type": "markdown", 147 | "metadata": {}, 148 | "source": [ 149 | "## Reading the web page into Python\n", 150 | "\n", 151 | "The first thing we need to do is to read the HTML for this article into Python, which we'll do using the [requests](http://docs.python-requests.org/en/master/) library. (If you don't have it, you can `pip install requests` from the command line.)" 152 | ] 153 | }, 154 | { 155 | "cell_type": "code", 156 | "execution_count": 1, 157 | "metadata": { 158 | "collapsed": true 159 | }, 160 | "outputs": [], 161 | "source": [ 162 | "import requests\n", 163 | "r = requests.get('https://www.nytimes.com/interactive/2017/06/23/opinion/trumps-lies.html')" 164 | ] 165 | }, 166 | { 167 | "cell_type": "markdown", 168 | "metadata": {}, 169 | "source": [ 170 | "The code above fetches our web page from the URL, and stores the result in a \"response\" object called `r`. That response object has a `text` attribute, which contains the same HTML code we saw when viewing the source from our web browser:" 171 | ] 172 | }, 173 | { 174 | "cell_type": "code", 175 | "execution_count": 2, 176 | "metadata": {}, 177 | "outputs": [ 178 | { 179 | "name": "stdout", 180 | "output_type": "stream", 181 | "text": [ 182 | "\n", 183 | "\n", 184 | " 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mosgeo\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m gdal\n", 69 | "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'osgeo'" 70 | ] 71 | } 72 | ], 73 | "source": [ 74 | "from osgeo import gdal" 75 | ] 76 | }, 77 | { 78 | "cell_type": "markdown", 79 | "id": "9fc771e3", 80 | "metadata": {}, 81 | "source": [ 82 | "### Pamplona" 83 | ] 84 | }, 85 | { 86 | "cell_type": "code", 87 | "execution_count": 4, 88 | "id": "32de25bf", 89 | "metadata": {}, 90 | "outputs": [], 91 | "source": [ 92 | "name='pamplona'\n", 93 | "latitude=42.81349804717014\n", 94 | "longitude=-1.6453010275390108\n", 95 | "zoom=13" 96 | ] 97 | }, 98 | { 99 | "cell_type": "code", 100 | "execution_count": 5, 101 | "id": "d388907b", 102 | "metadata": { 103 | "scrolled": true 104 | }, 105 | "outputs": [ 106 | { 107 | "name": "stdout", 108 | "output_type": "stream", 109 | "text": [ 110 | "http://geojson.io/#map=13/42.81349804717014/-1.6453010275390108\n" 111 | ] 112 | } 113 | ], 114 | "source": [ 115 | "print(f'http://geojson.io/#map={zoom}/{latitude}/{longitude}')" 116 | ] 117 | }, 118 | { 119 | "cell_type": "code", 120 | "execution_count": 7, 121 | "id": "39e2b30d", 122 | "metadata": {}, 123 | "outputs": [ 124 | { 125 | "data": { 126 | "text/html": [ 127 | "
Make this Notebook Trusted to load map: File -> Trust Notebook
" 215 | ], 216 | "text/plain": [ 217 | "" 218 | ] 219 | }, 220 | "execution_count": 7, 221 | "metadata": {}, 222 | "output_type": "execute_result" 223 | } 224 | ], 225 | "source": [ 226 | "m = folium.Map([latitude, longitude], zoom_start=zoom)\n", 227 | "boundary = gpd.read_file(f'../data/geo/{name}.geojson')\n", 228 | "folium.GeoJson(boundary).add_to(m)\n", 229 | "m" 230 | ] 231 | }, 232 | { 233 | "cell_type": "markdown", 234 | "id": "6e6dbe05", 235 | "metadata": {}, 236 | "source": [ 237 | "### Create a footprint of the region and generate a query." 238 | ] 239 | }, 240 | { 241 | "cell_type": "code", 242 | "execution_count": 8, 243 | "id": "de9c7dc4", 244 | "metadata": {}, 245 | "outputs": [ 246 | { 247 | "data": { 248 | "image/svg+xml": [ 249 | "" 250 | ], 251 | "text/plain": [ 252 | "" 253 | ] 254 | }, 255 | "execution_count": 8, 256 | "metadata": {}, 257 | "output_type": "execute_result" 258 | } 259 | ], 260 | "source": [ 261 | "footprint = boundary['geometry'][0]\n", 262 | "footprint" 263 | ] 264 | }, 265 | { 266 | "cell_type": "markdown", 267 | "id": "dcc626d1", 268 | "metadata": {}, 269 | "source": [ 270 | "## Download data" 271 | ] 272 | }, 273 | { 274 | "cell_type": "code", 275 | "execution_count": 9, 276 | "id": "9be64802", 277 | "metadata": {}, 278 | "outputs": [], 279 | "source": [ 280 | "dates = ('20230601', '20210615')" 281 | ] 282 | }, 283 | { 284 | "cell_type": "code", 285 | "execution_count": 11, 286 | "id": "ddc1928f", 287 | "metadata": {}, 288 | "outputs": [], 289 | "source": [ 290 | "from dotenv import load_dotenv" 291 | ] 292 | }, 293 | { 294 | "cell_type": "code", 295 | "execution_count": 13, 296 | "id": "c4fc9859", 297 | "metadata": {}, 298 | "outputs": [ 299 | { 300 | "data": { 301 | "text/plain": [ 302 | "True" 303 | ] 304 | }, 305 | "execution_count": 13, 306 | "metadata": {}, 307 | "output_type": "execute_result" 308 | } 309 | ], 310 | "source": [ 311 | "load_dotenv()" 312 | ] 313 | }, 314 | { 315 | "cell_type": "code", 316 | "execution_count": 16, 317 | "id": "109bbf59", 318 | "metadata": {}, 319 | "outputs": [], 320 | "source": [ 321 | "user = os.environ['COPERNICUS_USER']\n", 322 | "password = os.environ['COPERNICUS_PASSWORD']" 323 | ] 324 | }, 325 | { 326 | "cell_type": "code", 327 | "execution_count": 17, 328 | "id": "87f80804", 329 | "metadata": {}, 330 | "outputs": [], 331 | "source": [ 332 | "api_url = 'https://scihub.copernicus.eu/dhus'" 333 | ] 334 | }, 335 | { 336 | "cell_type": "code", 337 | "execution_count": 18, 338 | "id": "b4369f91", 339 | "metadata": {}, 340 | "outputs": [], 341 | "source": [ 342 | "api = SentinelAPI(user, password, api_url) " 343 | ] 344 | }, 345 | { 346 | "cell_type": "code", 347 | "execution_count": 32, 348 | "id": "caa014a9", 349 | "metadata": {}, 350 | "outputs": [], 351 | "source": [ 352 | "dates = ('20230101', '20230610')" 353 | ] 354 | }, 355 | { 356 | "cell_type": "code", 357 | "execution_count": 33, 358 | "id": "6acc5f2e", 359 | "metadata": {}, 360 | "outputs": [], 361 | "source": [ 362 | "products = api.query(footprint,\n", 363 | " date = dates,\n", 364 | " platformname = 'Sentinel-2',\n", 365 | " processinglevel = 'Level-2A',\n", 366 | " cloudcoverpercentage = (0, 10))" 367 | ] 368 | }, 369 | { 370 | "cell_type": "code", 371 | "execution_count": 34, 372 | "id": "bcec22e8", 373 | "metadata": {}, 374 | "outputs": [ 375 | { 376 | "data": { 377 | "text/html": [ 378 | "
\n", 379 | "\n", 392 | "\n", 393 | " \n", 394 | " \n", 395 | " \n", 396 | " \n", 397 | " \n", 398 | " \n", 399 | " \n", 400 | " \n", 401 | " \n", 402 | " \n", 403 | " \n", 404 | " \n", 405 | " \n", 406 | " \n", 407 | " \n", 408 | " \n", 409 | " \n", 410 | " \n", 411 | " \n", 412 | " \n", 413 | " \n", 414 | " \n", 415 | " \n", 416 | " \n", 417 | " \n", 418 | " \n", 419 | " \n", 420 | " \n", 421 | " \n", 422 | " \n", 423 | " \n", 424 | " \n", 425 | " \n", 426 | " \n", 427 | " \n", 428 | " \n", 429 | " \n", 430 | " \n", 431 | " \n", 432 | " \n", 433 | " \n", 434 | " \n", 435 | " \n", 436 | " \n", 437 | " \n", 438 | " \n", 439 | " \n", 440 | " \n", 441 | " \n", 442 | " \n", 443 | " \n", 444 | " \n", 445 | " \n", 446 | " \n", 447 | " \n", 448 | " \n", 449 | " \n", 450 | " \n", 451 | " \n", 452 | " \n", 453 | " \n", 454 | " \n", 455 | " \n", 456 | " \n", 457 | " \n", 458 | " \n", 459 | " \n", 460 | " \n", 461 | " \n", 462 | " \n", 463 | " \n", 464 | " \n", 465 | " \n", 466 | " \n", 467 | " \n", 468 | " \n", 469 | " \n", 470 | " \n", 471 | " \n", 472 | " \n", 473 | " \n", 474 | " \n", 475 | " \n", 476 | " \n", 477 | " \n", 478 | " \n", 479 | " \n", 480 | " \n", 481 | " \n", 482 | " \n", 483 | " \n", 484 | " \n", 485 | " \n", 486 | " \n", 487 | " \n", 488 | " \n", 489 | " \n", 490 | " \n", 491 | " \n", 492 | " \n", 493 | " \n", 494 | " \n", 495 | " \n", 496 | " \n", 497 | " \n", 498 | " \n", 499 | " \n", 500 | " \n", 501 | " \n", 502 | " \n", 503 | " \n", 504 | " \n", 505 | " \n", 506 | " \n", 507 | " \n", 508 | " \n", 509 | " \n", 510 | " \n", 511 | " \n", 512 | " \n", 513 | " \n", 514 | " \n", 515 | " \n", 516 | " \n", 517 | " \n", 518 | " \n", 519 | " \n", 520 | " \n", 521 | " \n", 522 | " \n", 523 | " \n", 524 | " \n", 525 | " \n", 526 | " \n", 527 | " \n", 528 | " \n", 529 | " \n", 530 | " \n", 531 | " \n", 532 | " \n", 533 | " \n", 534 | " \n", 535 | " \n", 536 | " \n", 537 | " \n", 538 | " \n", 539 | " \n", 540 | " \n", 541 | " \n", 542 | " \n", 543 | " \n", 544 | " \n", 545 | " \n", 546 | " \n", 547 | " \n", 548 | " \n", 549 | " \n", 550 | " \n", 551 | " \n", 552 | " \n", 553 | " \n", 554 | " \n", 555 | " \n", 556 | " \n", 557 | " \n", 558 | " \n", 559 | " \n", 560 | " \n", 561 | " \n", 562 | " \n", 563 | " \n", 564 | " \n", 565 | " \n", 566 | " \n", 567 | " \n", 568 | " \n", 569 | " \n", 570 | " \n", 571 | " \n", 572 | " \n", 573 | " \n", 574 | " \n", 575 | " \n", 576 | " \n", 577 | " \n", 578 | " \n", 579 | " \n", 580 | " \n", 581 | " \n", 582 | " \n", 583 | " \n", 584 | " \n", 585 | " \n", 586 | " \n", 587 | " \n", 588 | " \n", 589 | " \n", 590 | " \n", 591 | " \n", 592 | " \n", 593 | " \n", 594 | " \n", 595 | " \n", 596 | " \n", 597 | " \n", 598 | " \n", 599 | " \n", 600 | " \n", 601 | " \n", 602 | " \n", 603 | " \n", 604 | " \n", 605 | " \n", 606 | " \n", 607 | " \n", 608 | " \n", 609 | " \n", 610 | " \n", 611 | " \n", 612 | " \n", 613 | " \n", 614 | " \n", 615 | " \n", 616 | " \n", 617 | " \n", 618 | " \n", 619 | " \n", 620 | " \n", 621 | " \n", 622 | " \n", 623 | " \n", 624 | " \n", 625 | " \n", 626 | " \n", 627 | " \n", 628 | " \n", 629 | " \n", 630 | " \n", 631 | " \n", 632 | " \n", 633 | " \n", 634 | " \n", 635 | " \n", 636 | " \n", 637 | "
titlelinklink_alternativelink_iconsummaryondemandgenerationdatebeginpositionendpositioningestiondate...producttypeplatformidentifierorbitdirectionplatformserialidentifierprocessingleveldatastripidentifiergranuleidentifieridentifieruuidgeometry
7da18c4b-4ce2-42e7-8ace-776f53420230S2A_MSIL2A_20230408T105621_N0509_R094_T30TXN_2...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...Date: 2023-04-08T10:56:21.024Z, Instrument: MS...false2023-04-08 17:08:542023-04-08 10:56:21.0242023-04-08 10:56:21.0242023-04-08 18:58:46.845...S2MSI2A2015-028ADESCENDINGSentinel-2ALevel-2AS2A_OPER_MSI_L2A_DS_2APS_20230408T170854_S2023...S2A_OPER_MSI_L2A_TL_2APS_20230408T170854_A0407...S2A_MSIL2A_20230408T105621_N0509_R094_T30TXN_2...7da18c4b-4ce2-42e7-8ace-776f53420230MULTIPOLYGON (((-0.45337 42.33578, -0.41248 43...
1391f05d-ecc4-40d6-8b42-0641479683a7S2A_MSIL2A_20230217T110121_N0509_R094_T30TWN_2...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...Date: 2023-02-17T11:01:21.024Z, Instrument: MS...false2023-02-17 17:04:592023-02-17 11:01:21.0242023-02-17 11:01:21.0242023-02-17 19:00:44.445...S2MSI2A2015-028ADESCENDINGSentinel-2ALevel-2AS2A_OPER_MSI_L2A_DS_2APS_20230217T170459_S2023...S2A_OPER_MSI_L2A_TL_2APS_20230217T170459_A0399...S2A_MSIL2A_20230217T110121_N0509_R094_T30TWN_2...1391f05d-ecc4-40d6-8b42-0641479683a7MULTIPOLYGON (((-1.66699 42.35632, -1.64554 43...
a3cece7a-6b25-4203-9897-48b974e5a414S2A_MSIL2A_20230217T110121_N0509_R094_T30TXN_2...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...Date: 2023-02-17T11:01:21.024Z, Instrument: MS...false2023-02-17 17:04:592023-02-17 11:01:21.0242023-02-17 11:01:21.0242023-02-17 18:52:19.674...S2MSI2A2015-028ADESCENDINGSentinel-2ALevel-2AS2A_OPER_MSI_L2A_DS_2APS_20230217T170459_S2023...S2A_OPER_MSI_L2A_TL_2APS_20230217T170459_A0399...S2A_MSIL2A_20230217T110121_N0509_R094_T30TXN_2...a3cece7a-6b25-4203-9897-48b974e5a414MULTIPOLYGON (((-0.45337 42.33578, -0.41248 43...
967c8759-80c3-48a9-adef-cbce8611cab8S2B_MSIL2A_20230212T110059_N0509_R094_T30TXN_2...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...Date: 2023-02-12T11:00:59.024Z, Instrument: MS...false2023-02-12 13:54:112023-02-12 11:00:59.0242023-02-12 11:00:59.0242023-02-12 16:27:39.852...S2MSI2A2017-013ADESCENDINGSentinel-2BLevel-2AS2B_OPER_MSI_L2A_DS_2BPS_20230212T135411_S2023...S2B_OPER_MSI_L2A_TL_2BPS_20230212T135411_A0310...S2B_MSIL2A_20230212T110059_N0509_R094_T30TXN_2...967c8759-80c3-48a9-adef-cbce8611cab8MULTIPOLYGON (((-0.45337 42.33578, -0.41248 43...
629f4e9b-0dda-4992-ac6e-c0262e28c10eS2B_MSIL2A_20230212T110059_N0509_R094_T30TWN_2...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...Date: 2023-02-12T11:00:59.024Z, Instrument: MS...false2023-02-12 13:54:112023-02-12 11:00:59.0242023-02-12 11:00:59.0242023-02-12 16:15:44.728...S2MSI2A2017-013ADESCENDINGSentinel-2BLevel-2AS2B_OPER_MSI_L2A_DS_2BPS_20230212T135411_S2023...S2B_OPER_MSI_L2A_TL_2BPS_20230212T135411_A0310...S2B_MSIL2A_20230212T110059_N0509_R094_T30TWN_2...629f4e9b-0dda-4992-ac6e-c0262e28c10eMULTIPOLYGON (((-1.66699 42.35632, -1.64554 43...
b903ee03-c77d-4056-92dd-4a7e47cdbff2S2B_MSIL2A_20230202T110159_N0509_R094_T30TXN_2...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...Date: 2023-02-02T11:01:59.024Z, Instrument: MS...false2023-02-02 12:24:542023-02-02 11:01:59.0242023-02-02 11:01:59.0242023-02-02 15:24:01.850...S2MSI2A2017-013ADESCENDINGSentinel-2BLevel-2AS2B_OPER_MSI_L2A_DS_2BPS_20230202T122454_S2023...S2B_OPER_MSI_L2A_TL_2BPS_20230202T122454_A0308...S2B_MSIL2A_20230202T110159_N0509_R094_T30TXN_2...b903ee03-c77d-4056-92dd-4a7e47cdbff2MULTIPOLYGON (((-0.45337 42.33578, -0.41248 43...
f59cd263-030f-4a51-b529-3f36d9e4c194S2B_MSIL2A_20230202T110159_N0509_R094_T30TWN_2...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...Date: 2023-02-02T11:01:59.024Z, Instrument: MS...false2023-02-02 12:24:542023-02-02 11:01:59.0242023-02-02 11:01:59.0242023-02-02 14:48:50.016...S2MSI2A2017-013ADESCENDINGSentinel-2BLevel-2AS2B_OPER_MSI_L2A_DS_2BPS_20230202T122454_S2023...S2B_OPER_MSI_L2A_TL_2BPS_20230202T122454_A0308...S2B_MSIL2A_20230202T110159_N0509_R094_T30TWN_2...f59cd263-030f-4a51-b529-3f36d9e4c194MULTIPOLYGON (((-1.66699 42.35632, -1.64554 43...
62a7e0d4-7f5f-441a-95ec-637a954838bcS2B_MSIL2A_20230103T110349_N0509_R094_T30TWN_2...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...Date: 2023-01-03T11:03:49.024Z, Instrument: MS...false2023-01-03 12:40:342023-01-03 11:03:49.0242023-01-03 11:03:49.0242023-01-03 15:32:27.204...S2MSI2A2017-013ADESCENDINGSentinel-2BLevel-2AS2B_OPER_MSI_L2A_DS_2BPS_20230103T124034_S2023...S2B_OPER_MSI_L2A_TL_2BPS_20230103T124034_A0304...S2B_MSIL2A_20230103T110349_N0509_R094_T30TWN_2...62a7e0d4-7f5f-441a-95ec-637a954838bcMULTIPOLYGON (((-1.66699 42.35632, -1.64554 43...
5dcd99f6-2370-49d9-98b4-f24e2bf7215aS2B_MSIL2A_20230103T110349_N0509_R094_T30TXN_2...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...https://scihub.copernicus.eu/dhus/odata/v1/Pro...Date: 2023-01-03T11:03:49.024Z, Instrument: MS...false2023-01-03 12:40:342023-01-03 11:03:49.0242023-01-03 11:03:49.0242023-01-03 15:24:26.942...S2MSI2A2017-013ADESCENDINGSentinel-2BLevel-2AS2B_OPER_MSI_L2A_DS_2BPS_20230103T124034_S2023...S2B_OPER_MSI_L2A_TL_2BPS_20230103T124034_A0304...S2B_MSIL2A_20230103T110349_N0509_R094_T30TXN_2...5dcd99f6-2370-49d9-98b4-f24e2bf7215aMULTIPOLYGON (((-0.45337 42.33578, -0.41248 43...
\n", 638 | "

9 rows × 41 columns

\n", 639 | "
" 640 | ], 641 | "text/plain": [ 642 | " title \\\n", 643 | "7da18c4b-4ce2-42e7-8ace-776f53420230 S2A_MSIL2A_20230408T105621_N0509_R094_T30TXN_2... \n", 644 | "1391f05d-ecc4-40d6-8b42-0641479683a7 S2A_MSIL2A_20230217T110121_N0509_R094_T30TWN_2... \n", 645 | "a3cece7a-6b25-4203-9897-48b974e5a414 S2A_MSIL2A_20230217T110121_N0509_R094_T30TXN_2... \n", 646 | "967c8759-80c3-48a9-adef-cbce8611cab8 S2B_MSIL2A_20230212T110059_N0509_R094_T30TXN_2... \n", 647 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e S2B_MSIL2A_20230212T110059_N0509_R094_T30TWN_2... \n", 648 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 S2B_MSIL2A_20230202T110159_N0509_R094_T30TXN_2... \n", 649 | "f59cd263-030f-4a51-b529-3f36d9e4c194 S2B_MSIL2A_20230202T110159_N0509_R094_T30TWN_2... \n", 650 | "62a7e0d4-7f5f-441a-95ec-637a954838bc S2B_MSIL2A_20230103T110349_N0509_R094_T30TWN_2... \n", 651 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a S2B_MSIL2A_20230103T110349_N0509_R094_T30TXN_2... \n", 652 | "\n", 653 | " link \\\n", 654 | "7da18c4b-4ce2-42e7-8ace-776f53420230 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 655 | "1391f05d-ecc4-40d6-8b42-0641479683a7 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 656 | "a3cece7a-6b25-4203-9897-48b974e5a414 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 657 | "967c8759-80c3-48a9-adef-cbce8611cab8 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 658 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 659 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 660 | "f59cd263-030f-4a51-b529-3f36d9e4c194 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 661 | "62a7e0d4-7f5f-441a-95ec-637a954838bc https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 662 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 663 | "\n", 664 | " link_alternative \\\n", 665 | "7da18c4b-4ce2-42e7-8ace-776f53420230 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 666 | "1391f05d-ecc4-40d6-8b42-0641479683a7 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 667 | "a3cece7a-6b25-4203-9897-48b974e5a414 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 668 | "967c8759-80c3-48a9-adef-cbce8611cab8 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 669 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 670 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 671 | "f59cd263-030f-4a51-b529-3f36d9e4c194 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 672 | "62a7e0d4-7f5f-441a-95ec-637a954838bc https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 673 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 674 | "\n", 675 | " link_icon \\\n", 676 | "7da18c4b-4ce2-42e7-8ace-776f53420230 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 677 | "1391f05d-ecc4-40d6-8b42-0641479683a7 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 678 | "a3cece7a-6b25-4203-9897-48b974e5a414 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 679 | "967c8759-80c3-48a9-adef-cbce8611cab8 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 680 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 681 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 682 | "f59cd263-030f-4a51-b529-3f36d9e4c194 https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 683 | "62a7e0d4-7f5f-441a-95ec-637a954838bc https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 684 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a https://scihub.copernicus.eu/dhus/odata/v1/Pro... \n", 685 | "\n", 686 | " summary \\\n", 687 | "7da18c4b-4ce2-42e7-8ace-776f53420230 Date: 2023-04-08T10:56:21.024Z, Instrument: MS... \n", 688 | "1391f05d-ecc4-40d6-8b42-0641479683a7 Date: 2023-02-17T11:01:21.024Z, Instrument: MS... \n", 689 | "a3cece7a-6b25-4203-9897-48b974e5a414 Date: 2023-02-17T11:01:21.024Z, Instrument: MS... \n", 690 | "967c8759-80c3-48a9-adef-cbce8611cab8 Date: 2023-02-12T11:00:59.024Z, Instrument: MS... \n", 691 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e Date: 2023-02-12T11:00:59.024Z, Instrument: MS... \n", 692 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 Date: 2023-02-02T11:01:59.024Z, Instrument: MS... \n", 693 | "f59cd263-030f-4a51-b529-3f36d9e4c194 Date: 2023-02-02T11:01:59.024Z, Instrument: MS... \n", 694 | "62a7e0d4-7f5f-441a-95ec-637a954838bc Date: 2023-01-03T11:03:49.024Z, Instrument: MS... \n", 695 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a Date: 2023-01-03T11:03:49.024Z, Instrument: MS... \n", 696 | "\n", 697 | " ondemand generationdate \\\n", 698 | "7da18c4b-4ce2-42e7-8ace-776f53420230 false 2023-04-08 17:08:54 \n", 699 | "1391f05d-ecc4-40d6-8b42-0641479683a7 false 2023-02-17 17:04:59 \n", 700 | "a3cece7a-6b25-4203-9897-48b974e5a414 false 2023-02-17 17:04:59 \n", 701 | "967c8759-80c3-48a9-adef-cbce8611cab8 false 2023-02-12 13:54:11 \n", 702 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e false 2023-02-12 13:54:11 \n", 703 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 false 2023-02-02 12:24:54 \n", 704 | "f59cd263-030f-4a51-b529-3f36d9e4c194 false 2023-02-02 12:24:54 \n", 705 | "62a7e0d4-7f5f-441a-95ec-637a954838bc false 2023-01-03 12:40:34 \n", 706 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a false 2023-01-03 12:40:34 \n", 707 | "\n", 708 | " beginposition \\\n", 709 | "7da18c4b-4ce2-42e7-8ace-776f53420230 2023-04-08 10:56:21.024 \n", 710 | "1391f05d-ecc4-40d6-8b42-0641479683a7 2023-02-17 11:01:21.024 \n", 711 | "a3cece7a-6b25-4203-9897-48b974e5a414 2023-02-17 11:01:21.024 \n", 712 | "967c8759-80c3-48a9-adef-cbce8611cab8 2023-02-12 11:00:59.024 \n", 713 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e 2023-02-12 11:00:59.024 \n", 714 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 2023-02-02 11:01:59.024 \n", 715 | "f59cd263-030f-4a51-b529-3f36d9e4c194 2023-02-02 11:01:59.024 \n", 716 | "62a7e0d4-7f5f-441a-95ec-637a954838bc 2023-01-03 11:03:49.024 \n", 717 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a 2023-01-03 11:03:49.024 \n", 718 | "\n", 719 | " endposition \\\n", 720 | "7da18c4b-4ce2-42e7-8ace-776f53420230 2023-04-08 10:56:21.024 \n", 721 | "1391f05d-ecc4-40d6-8b42-0641479683a7 2023-02-17 11:01:21.024 \n", 722 | "a3cece7a-6b25-4203-9897-48b974e5a414 2023-02-17 11:01:21.024 \n", 723 | "967c8759-80c3-48a9-adef-cbce8611cab8 2023-02-12 11:00:59.024 \n", 724 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e 2023-02-12 11:00:59.024 \n", 725 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 2023-02-02 11:01:59.024 \n", 726 | "f59cd263-030f-4a51-b529-3f36d9e4c194 2023-02-02 11:01:59.024 \n", 727 | "62a7e0d4-7f5f-441a-95ec-637a954838bc 2023-01-03 11:03:49.024 \n", 728 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a 2023-01-03 11:03:49.024 \n", 729 | "\n", 730 | " ingestiondate ... \\\n", 731 | "7da18c4b-4ce2-42e7-8ace-776f53420230 2023-04-08 18:58:46.845 ... \n", 732 | "1391f05d-ecc4-40d6-8b42-0641479683a7 2023-02-17 19:00:44.445 ... \n", 733 | "a3cece7a-6b25-4203-9897-48b974e5a414 2023-02-17 18:52:19.674 ... \n", 734 | "967c8759-80c3-48a9-adef-cbce8611cab8 2023-02-12 16:27:39.852 ... \n", 735 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e 2023-02-12 16:15:44.728 ... \n", 736 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 2023-02-02 15:24:01.850 ... \n", 737 | "f59cd263-030f-4a51-b529-3f36d9e4c194 2023-02-02 14:48:50.016 ... \n", 738 | "62a7e0d4-7f5f-441a-95ec-637a954838bc 2023-01-03 15:32:27.204 ... \n", 739 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a 2023-01-03 15:24:26.942 ... \n", 740 | "\n", 741 | " producttype platformidentifier \\\n", 742 | "7da18c4b-4ce2-42e7-8ace-776f53420230 S2MSI2A 2015-028A \n", 743 | "1391f05d-ecc4-40d6-8b42-0641479683a7 S2MSI2A 2015-028A \n", 744 | "a3cece7a-6b25-4203-9897-48b974e5a414 S2MSI2A 2015-028A \n", 745 | "967c8759-80c3-48a9-adef-cbce8611cab8 S2MSI2A 2017-013A \n", 746 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e S2MSI2A 2017-013A \n", 747 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 S2MSI2A 2017-013A \n", 748 | "f59cd263-030f-4a51-b529-3f36d9e4c194 S2MSI2A 2017-013A \n", 749 | "62a7e0d4-7f5f-441a-95ec-637a954838bc S2MSI2A 2017-013A \n", 750 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a S2MSI2A 2017-013A \n", 751 | "\n", 752 | " orbitdirection \\\n", 753 | "7da18c4b-4ce2-42e7-8ace-776f53420230 DESCENDING \n", 754 | "1391f05d-ecc4-40d6-8b42-0641479683a7 DESCENDING \n", 755 | "a3cece7a-6b25-4203-9897-48b974e5a414 DESCENDING \n", 756 | "967c8759-80c3-48a9-adef-cbce8611cab8 DESCENDING \n", 757 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e DESCENDING \n", 758 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 DESCENDING \n", 759 | "f59cd263-030f-4a51-b529-3f36d9e4c194 DESCENDING \n", 760 | "62a7e0d4-7f5f-441a-95ec-637a954838bc DESCENDING \n", 761 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a DESCENDING \n", 762 | "\n", 763 | " platformserialidentifier \\\n", 764 | "7da18c4b-4ce2-42e7-8ace-776f53420230 Sentinel-2A \n", 765 | "1391f05d-ecc4-40d6-8b42-0641479683a7 Sentinel-2A \n", 766 | "a3cece7a-6b25-4203-9897-48b974e5a414 Sentinel-2A \n", 767 | "967c8759-80c3-48a9-adef-cbce8611cab8 Sentinel-2B \n", 768 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e Sentinel-2B \n", 769 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 Sentinel-2B \n", 770 | "f59cd263-030f-4a51-b529-3f36d9e4c194 Sentinel-2B \n", 771 | "62a7e0d4-7f5f-441a-95ec-637a954838bc Sentinel-2B \n", 772 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a Sentinel-2B \n", 773 | "\n", 774 | " processinglevel \\\n", 775 | "7da18c4b-4ce2-42e7-8ace-776f53420230 Level-2A \n", 776 | "1391f05d-ecc4-40d6-8b42-0641479683a7 Level-2A \n", 777 | "a3cece7a-6b25-4203-9897-48b974e5a414 Level-2A \n", 778 | "967c8759-80c3-48a9-adef-cbce8611cab8 Level-2A \n", 779 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e Level-2A \n", 780 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 Level-2A \n", 781 | "f59cd263-030f-4a51-b529-3f36d9e4c194 Level-2A \n", 782 | "62a7e0d4-7f5f-441a-95ec-637a954838bc Level-2A \n", 783 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a Level-2A \n", 784 | "\n", 785 | " datastripidentifier \\\n", 786 | "7da18c4b-4ce2-42e7-8ace-776f53420230 S2A_OPER_MSI_L2A_DS_2APS_20230408T170854_S2023... \n", 787 | "1391f05d-ecc4-40d6-8b42-0641479683a7 S2A_OPER_MSI_L2A_DS_2APS_20230217T170459_S2023... \n", 788 | "a3cece7a-6b25-4203-9897-48b974e5a414 S2A_OPER_MSI_L2A_DS_2APS_20230217T170459_S2023... \n", 789 | "967c8759-80c3-48a9-adef-cbce8611cab8 S2B_OPER_MSI_L2A_DS_2BPS_20230212T135411_S2023... \n", 790 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e S2B_OPER_MSI_L2A_DS_2BPS_20230212T135411_S2023... \n", 791 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 S2B_OPER_MSI_L2A_DS_2BPS_20230202T122454_S2023... \n", 792 | "f59cd263-030f-4a51-b529-3f36d9e4c194 S2B_OPER_MSI_L2A_DS_2BPS_20230202T122454_S2023... \n", 793 | "62a7e0d4-7f5f-441a-95ec-637a954838bc S2B_OPER_MSI_L2A_DS_2BPS_20230103T124034_S2023... \n", 794 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a S2B_OPER_MSI_L2A_DS_2BPS_20230103T124034_S2023... \n", 795 | "\n", 796 | " granuleidentifier \\\n", 797 | "7da18c4b-4ce2-42e7-8ace-776f53420230 S2A_OPER_MSI_L2A_TL_2APS_20230408T170854_A0407... \n", 798 | "1391f05d-ecc4-40d6-8b42-0641479683a7 S2A_OPER_MSI_L2A_TL_2APS_20230217T170459_A0399... \n", 799 | "a3cece7a-6b25-4203-9897-48b974e5a414 S2A_OPER_MSI_L2A_TL_2APS_20230217T170459_A0399... \n", 800 | "967c8759-80c3-48a9-adef-cbce8611cab8 S2B_OPER_MSI_L2A_TL_2BPS_20230212T135411_A0310... \n", 801 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e S2B_OPER_MSI_L2A_TL_2BPS_20230212T135411_A0310... \n", 802 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 S2B_OPER_MSI_L2A_TL_2BPS_20230202T122454_A0308... \n", 803 | "f59cd263-030f-4a51-b529-3f36d9e4c194 S2B_OPER_MSI_L2A_TL_2BPS_20230202T122454_A0308... \n", 804 | "62a7e0d4-7f5f-441a-95ec-637a954838bc S2B_OPER_MSI_L2A_TL_2BPS_20230103T124034_A0304... \n", 805 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a S2B_OPER_MSI_L2A_TL_2BPS_20230103T124034_A0304... \n", 806 | "\n", 807 | " identifier \\\n", 808 | "7da18c4b-4ce2-42e7-8ace-776f53420230 S2A_MSIL2A_20230408T105621_N0509_R094_T30TXN_2... \n", 809 | "1391f05d-ecc4-40d6-8b42-0641479683a7 S2A_MSIL2A_20230217T110121_N0509_R094_T30TWN_2... \n", 810 | "a3cece7a-6b25-4203-9897-48b974e5a414 S2A_MSIL2A_20230217T110121_N0509_R094_T30TXN_2... \n", 811 | "967c8759-80c3-48a9-adef-cbce8611cab8 S2B_MSIL2A_20230212T110059_N0509_R094_T30TXN_2... \n", 812 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e S2B_MSIL2A_20230212T110059_N0509_R094_T30TWN_2... \n", 813 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 S2B_MSIL2A_20230202T110159_N0509_R094_T30TXN_2... \n", 814 | "f59cd263-030f-4a51-b529-3f36d9e4c194 S2B_MSIL2A_20230202T110159_N0509_R094_T30TWN_2... \n", 815 | "62a7e0d4-7f5f-441a-95ec-637a954838bc S2B_MSIL2A_20230103T110349_N0509_R094_T30TWN_2... \n", 816 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a S2B_MSIL2A_20230103T110349_N0509_R094_T30TXN_2... \n", 817 | "\n", 818 | " uuid \\\n", 819 | "7da18c4b-4ce2-42e7-8ace-776f53420230 7da18c4b-4ce2-42e7-8ace-776f53420230 \n", 820 | "1391f05d-ecc4-40d6-8b42-0641479683a7 1391f05d-ecc4-40d6-8b42-0641479683a7 \n", 821 | "a3cece7a-6b25-4203-9897-48b974e5a414 a3cece7a-6b25-4203-9897-48b974e5a414 \n", 822 | "967c8759-80c3-48a9-adef-cbce8611cab8 967c8759-80c3-48a9-adef-cbce8611cab8 \n", 823 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e 629f4e9b-0dda-4992-ac6e-c0262e28c10e \n", 824 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 b903ee03-c77d-4056-92dd-4a7e47cdbff2 \n", 825 | "f59cd263-030f-4a51-b529-3f36d9e4c194 f59cd263-030f-4a51-b529-3f36d9e4c194 \n", 826 | "62a7e0d4-7f5f-441a-95ec-637a954838bc 62a7e0d4-7f5f-441a-95ec-637a954838bc \n", 827 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a 5dcd99f6-2370-49d9-98b4-f24e2bf7215a \n", 828 | "\n", 829 | " geometry \n", 830 | "7da18c4b-4ce2-42e7-8ace-776f53420230 MULTIPOLYGON (((-0.45337 42.33578, -0.41248 43... \n", 831 | "1391f05d-ecc4-40d6-8b42-0641479683a7 MULTIPOLYGON (((-1.66699 42.35632, -1.64554 43... \n", 832 | "a3cece7a-6b25-4203-9897-48b974e5a414 MULTIPOLYGON (((-0.45337 42.33578, -0.41248 43... \n", 833 | "967c8759-80c3-48a9-adef-cbce8611cab8 MULTIPOLYGON (((-0.45337 42.33578, -0.41248 43... \n", 834 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e MULTIPOLYGON (((-1.66699 42.35632, -1.64554 43... \n", 835 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 MULTIPOLYGON (((-0.45337 42.33578, -0.41248 43... \n", 836 | "f59cd263-030f-4a51-b529-3f36d9e4c194 MULTIPOLYGON (((-1.66699 42.35632, -1.64554 43... \n", 837 | "62a7e0d4-7f5f-441a-95ec-637a954838bc MULTIPOLYGON (((-1.66699 42.35632, -1.64554 43... \n", 838 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a MULTIPOLYGON (((-0.45337 42.33578, -0.41248 43... \n", 839 | "\n", 840 | "[9 rows x 41 columns]" 841 | ] 842 | }, 843 | "execution_count": 34, 844 | "metadata": {}, 845 | "output_type": "execute_result" 846 | } 847 | ], 848 | "source": [ 849 | "gdf = api.to_geodataframe(products)\n", 850 | "gdf" 851 | ] 852 | }, 853 | { 854 | "cell_type": "code", 855 | "execution_count": 35, 856 | "id": "f1525858", 857 | "metadata": {}, 858 | "outputs": [], 859 | "source": [ 860 | "\n", 861 | "gdf_sorted = gdf.sort_values(['cloudcoverpercentage'])" 862 | ] 863 | }, 864 | { 865 | "cell_type": "code", 866 | "execution_count": 36, 867 | "id": "d165ca86", 868 | "metadata": {}, 869 | "outputs": [ 870 | { 871 | "data": { 872 | "text/html": [ 873 | "
\n", 874 | "\n", 887 | "\n", 888 | " \n", 889 | " \n", 890 | " \n", 891 | " \n", 892 | " \n", 893 | " \n", 894 | " \n", 895 | " \n", 896 | " \n", 897 | " \n", 898 | " \n", 899 | " \n", 900 | " \n", 901 | " \n", 902 | " \n", 903 | " \n", 904 | " \n", 905 | " \n", 906 | " \n", 907 | " \n", 908 | " \n", 909 | " \n", 910 | " \n", 911 | " \n", 912 | " \n", 913 | " \n", 914 | " \n", 915 | " \n", 916 | " \n", 917 | " \n", 918 | " \n", 919 | " \n", 920 | " \n", 921 | " \n", 922 | " \n", 923 | " \n", 924 | " \n", 925 | " \n", 926 | " \n", 927 | " \n", 928 | " \n", 929 | " \n", 930 | " \n", 931 | " \n", 932 | " \n", 933 | " \n", 934 | " \n", 935 | " \n", 936 | " \n", 937 | " \n", 938 | " \n", 939 | " \n", 940 | " \n", 941 | " \n", 942 | "
titlecloudcoverpercentage
967c8759-80c3-48a9-adef-cbce8611cab8S2B_MSIL2A_20230212T110059_N0509_R094_T30TXN_2...0.911268
629f4e9b-0dda-4992-ac6e-c0262e28c10eS2B_MSIL2A_20230212T110059_N0509_R094_T30TWN_2...1.273938
a3cece7a-6b25-4203-9897-48b974e5a414S2A_MSIL2A_20230217T110121_N0509_R094_T30TXN_2...2.496120
b903ee03-c77d-4056-92dd-4a7e47cdbff2S2B_MSIL2A_20230202T110159_N0509_R094_T30TXN_2...2.760731
f59cd263-030f-4a51-b529-3f36d9e4c194S2B_MSIL2A_20230202T110159_N0509_R094_T30TWN_2...5.290278
1391f05d-ecc4-40d6-8b42-0641479683a7S2A_MSIL2A_20230217T110121_N0509_R094_T30TWN_2...7.154439
62a7e0d4-7f5f-441a-95ec-637a954838bcS2B_MSIL2A_20230103T110349_N0509_R094_T30TWN_2...8.276797
5dcd99f6-2370-49d9-98b4-f24e2bf7215aS2B_MSIL2A_20230103T110349_N0509_R094_T30TXN_2...8.829433
7da18c4b-4ce2-42e7-8ace-776f53420230S2A_MSIL2A_20230408T105621_N0509_R094_T30TXN_2...9.601053
\n", 943 | "
" 944 | ], 945 | "text/plain": [ 946 | " title \\\n", 947 | "967c8759-80c3-48a9-adef-cbce8611cab8 S2B_MSIL2A_20230212T110059_N0509_R094_T30TXN_2... \n", 948 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e S2B_MSIL2A_20230212T110059_N0509_R094_T30TWN_2... \n", 949 | "a3cece7a-6b25-4203-9897-48b974e5a414 S2A_MSIL2A_20230217T110121_N0509_R094_T30TXN_2... \n", 950 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 S2B_MSIL2A_20230202T110159_N0509_R094_T30TXN_2... \n", 951 | "f59cd263-030f-4a51-b529-3f36d9e4c194 S2B_MSIL2A_20230202T110159_N0509_R094_T30TWN_2... \n", 952 | "1391f05d-ecc4-40d6-8b42-0641479683a7 S2A_MSIL2A_20230217T110121_N0509_R094_T30TWN_2... \n", 953 | "62a7e0d4-7f5f-441a-95ec-637a954838bc S2B_MSIL2A_20230103T110349_N0509_R094_T30TWN_2... \n", 954 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a S2B_MSIL2A_20230103T110349_N0509_R094_T30TXN_2... \n", 955 | "7da18c4b-4ce2-42e7-8ace-776f53420230 S2A_MSIL2A_20230408T105621_N0509_R094_T30TXN_2... \n", 956 | "\n", 957 | " cloudcoverpercentage \n", 958 | "967c8759-80c3-48a9-adef-cbce8611cab8 0.911268 \n", 959 | "629f4e9b-0dda-4992-ac6e-c0262e28c10e 1.273938 \n", 960 | "a3cece7a-6b25-4203-9897-48b974e5a414 2.496120 \n", 961 | "b903ee03-c77d-4056-92dd-4a7e47cdbff2 2.760731 \n", 962 | "f59cd263-030f-4a51-b529-3f36d9e4c194 5.290278 \n", 963 | "1391f05d-ecc4-40d6-8b42-0641479683a7 7.154439 \n", 964 | "62a7e0d4-7f5f-441a-95ec-637a954838bc 8.276797 \n", 965 | "5dcd99f6-2370-49d9-98b4-f24e2bf7215a 8.829433 \n", 966 | "7da18c4b-4ce2-42e7-8ace-776f53420230 9.601053 " 967 | ] 968 | }, 969 | "execution_count": 36, 970 | "metadata": {}, 971 | "output_type": "execute_result" 972 | } 973 | ], 974 | "source": [ 975 | "gdf_sorted[['title', 'cloudcoverpercentage']]" 976 | ] 977 | }, 978 | { 979 | "cell_type": "code", 980 | "execution_count": 22, 981 | "id": "1cf1dffb", 982 | "metadata": {}, 983 | "outputs": [ 984 | { 985 | "data": { 986 | "text/plain": [ 987 | "d6d1d704-40d2-4eec-b49c-4881a24cd740 1.970314\n", 988 | "26385414-265f-421a-8572-9223f16079fb 3.004637\n", 989 | "24e751ba-f3ed-473d-906a-4e8338e57dd6 5.275427\n", 990 | "6656eb77-79b7-4e70-89dc-d27c8c1322a2 8.020393\n", 991 | "f70c3d22-b083-4d13-b59e-7e6b3cdf12f5 14.050001\n", 992 | "Name: cloudcoverpercentage, dtype: float64" 993 | ] 994 | }, 995 | "execution_count": 22, 996 | "metadata": {}, 997 | "output_type": "execute_result" 998 | } 999 | ], 1000 | "source": [ 1001 | "gdf_sorted['cloudcoverpercentage']" 1002 | ] 1003 | }, 1004 | { 1005 | "cell_type": "code", 1006 | "execution_count": 37, 1007 | "id": "2596b353", 1008 | "metadata": {}, 1009 | "outputs": [ 1010 | { 1011 | "data": { 1012 | "text/plain": [ 1013 | "'967c8759-80c3-48a9-adef-cbce8611cab8'" 1014 | ] 1015 | }, 1016 | "execution_count": 37, 1017 | "metadata": {}, 1018 | "output_type": "execute_result" 1019 | } 1020 | ], 1021 | "source": [ 1022 | "uuid = gdf_sorted.iloc[0]['uuid']\n", 1023 | "uuid" 1024 | ] 1025 | }, 1026 | { 1027 | "cell_type": "code", 1028 | "execution_count": 24, 1029 | "id": "8beb2f38", 1030 | "metadata": {}, 1031 | "outputs": [ 1032 | { 1033 | "name": "stdout", 1034 | "output_type": "stream", 1035 | "text": [ 1036 | "Help on method download in module sentinelsat.sentinel:\n", 1037 | "\n", 1038 | "download(id, directory_path='.', checksum=True, nodefilter=None) method of sentinelsat.sentinel.SentinelAPI instance\n", 1039 | " Download a product.\n", 1040 | " \n", 1041 | " Uses the filename on the server for the downloaded file, e.g.\n", 1042 | " \"S1A_EW_GRDH_1SDH_20141003T003840_20141003T003920_002658_002F54_4DD1.zip\".\n", 1043 | " \n", 1044 | " Incomplete downloads are continued and complete files are skipped.\n", 1045 | " \n", 1046 | " Parameters\n", 1047 | " ----------\n", 1048 | " id : string\n", 1049 | " UUID of the product, e.g. 'a8dd0cfd-613e-45ce-868c-d79177b916ed'\n", 1050 | " directory_path : string, optional\n", 1051 | " Where the file will be downloaded\n", 1052 | " checksum : bool, default True\n", 1053 | " If True, verify the downloaded file's integrity by checking its checksum.\n", 1054 | " Throws InvalidChecksumError if the checksum does not match.\n", 1055 | " nodefilter : callable, optional\n", 1056 | " The callable is used to select which files of each product will be downloaded.\n", 1057 | " If None (the default), the full products will be downloaded.\n", 1058 | " See :mod:`sentinelsat.products` for sample node filters.\n", 1059 | " \n", 1060 | " Returns\n", 1061 | " -------\n", 1062 | " product_info : dict\n", 1063 | " Dictionary containing the product's info from get_product_odata() as well as\n", 1064 | " the path on disk.\n", 1065 | " \n", 1066 | " Raises\n", 1067 | " ------\n", 1068 | " InvalidChecksumError\n", 1069 | " If the MD5 checksum does not match the checksum on the server.\n", 1070 | " LTATriggered\n", 1071 | " If the product has been archived and its retrieval was successfully triggered.\n", 1072 | " LTAError\n", 1073 | " If the product has been archived and its retrieval failed.\n", 1074 | "\n" 1075 | ] 1076 | } 1077 | ], 1078 | "source": [ 1079 | "help(api.download)" 1080 | ] 1081 | }, 1082 | { 1083 | "cell_type": "markdown", 1084 | "id": "224117b5", 1085 | "metadata": {}, 1086 | "source": [ 1087 | "### Download products" 1088 | ] 1089 | }, 1090 | { 1091 | "cell_type": "code", 1092 | "execution_count": 38, 1093 | "id": "ec9da436", 1094 | "metadata": {}, 1095 | "outputs": [ 1096 | { 1097 | "data": { 1098 | "application/vnd.jupyter.widget-view+json": { 1099 | "model_id": "836e8e7568db4fceb7d370f6d16c727a", 1100 | "version_major": 2, 1101 | "version_minor": 0 1102 | }, 1103 | "text/plain": [ 1104 | "Downloading S2B_MSIL2A_20230212T110059_N0509_R094_T30TXN_20230212T135411.zip: 0%| | 0.00/1.25G [00:…" 1105 | ] 1106 | }, 1107 | "metadata": {}, 1108 | "output_type": "display_data" 1109 | }, 1110 | { 1111 | "data": { 1112 | "application/vnd.jupyter.widget-view+json": { 1113 | "model_id": "", 1114 | "version_major": 2, 1115 | "version_minor": 0 1116 | }, 1117 | "text/plain": [ 1118 | "MD5 checksumming: 0%| | 0.00/1.25G [00:00\n", 1304 | "\n", 1317 | "\n", 1318 | " \n", 1319 | " \n", 1320 | " \n", 1321 | " \n", 1322 | " \n", 1323 | " \n", 1324 | " \n", 1325 | " \n", 1326 | " \n", 1327 | " \n", 1328 | " \n", 1329 | " \n", 1330 | " \n", 1331 | " \n", 1332 | " \n", 1333 | " \n", 1334 | " \n", 1335 | " \n", 1336 | " \n", 1337 | " \n", 1338 | " \n", 1339 | " \n", 1340 | " \n", 1341 | " \n", 1342 | " \n", 1343 | " \n", 1344 | " \n", 1345 | " \n", 1346 | " \n", 1347 | " \n", 1348 | " \n", 1349 | " \n", 1350 | " \n", 1351 | " \n", 1352 | "
bandname
0B01Ultra Blue
1B02Blue
2B03Green
3B04Red
4B08NIR
\n", 1353 | "" 1354 | ], 1355 | "text/plain": [ 1356 | " band name\n", 1357 | "0 B01 Ultra Blue\n", 1358 | "1 B02 Blue\n", 1359 | "2 B03 Green\n", 1360 | "3 B04 Red\n", 1361 | "4 B08 NIR" 1362 | ] 1363 | }, 1364 | "execution_count": 52, 1365 | "metadata": {}, 1366 | "output_type": "execute_result" 1367 | } 1368 | ], 1369 | "source": [ 1370 | "band_names" 1371 | ] 1372 | }, 1373 | { 1374 | "cell_type": "code", 1375 | "execution_count": 53, 1376 | "id": "487fae0a", 1377 | "metadata": {}, 1378 | "outputs": [], 1379 | "source": [ 1380 | "blue_band = [l for l in bands.iterdir() if '_B02_' in l.name][0]\n", 1381 | "green_band = [l for l in bands.iterdir() if '_B03_' in l.name][0]\n", 1382 | "red_band = [l for l in bands.iterdir() if '_B04_' in l.name][0]\n", 1383 | "nir_band = [l for l in bands.iterdir() if '_B08_' in l.name][0]" 1384 | ] 1385 | }, 1386 | { 1387 | "cell_type": "code", 1388 | "execution_count": 58, 1389 | "id": "6a64a9b6", 1390 | "metadata": {}, 1391 | "outputs": [], 1392 | "source": [ 1393 | "blue = rasterio.open(blue_band, driver='JP2OpenJPEG') \n", 1394 | "green = rasterio.open(green_band, driver='JP2OpenJPEG') \n", 1395 | "red = rasterio.open(red_band, driver='JP2OpenJPEG') \n", 1396 | "nir = rasterio.open(nir_band, driver='JP2OpenJPEG')" 1397 | ] 1398 | }, 1399 | { 1400 | "cell_type": "code", 1401 | "execution_count": 59, 1402 | "id": "58196164", 1403 | "metadata": {}, 1404 | "outputs": [], 1405 | "source": [ 1406 | "with rasterio.open(f'{name}.tiff','w',\n", 1407 | " driver='Gtiff', \n", 1408 | " width=blue.width, \n", 1409 | " height=blue.height, \n", 1410 | " count=3, crs=blue.crs,\n", 1411 | " transform=blue.transform, \n", 1412 | " dtype=blue.dtypes[0]) as rgb:\n", 1413 | " rgb.write(blue.read(1),3) \n", 1414 | " rgb.write(green.read(1),2) \n", 1415 | " rgb.write(red.read(1),1) \n", 1416 | " rgb.close()" 1417 | ] 1418 | }, 1419 | { 1420 | "cell_type": "code", 1421 | "execution_count": 63, 1422 | "id": "61715c11", 1423 | "metadata": {}, 1424 | "outputs": [ 1425 | { 1426 | "data": { 1427 | "text/plain": [ 1428 | "CRS.from_epsg(32630)" 1429 | ] 1430 | }, 1431 | "execution_count": 63, 1432 | "metadata": {}, 1433 | "output_type": "execute_result" 1434 | } 1435 | ], 1436 | "source": [ 1437 | "check_crs = rasterio.open(f'{name}.tiff').crs\n", 1438 | "check_crs" 1439 | ] 1440 | }, 1441 | { 1442 | "cell_type": "code", 1443 | "execution_count": 65, 1444 | "id": "2384c61c", 1445 | "metadata": { 1446 | "scrolled": true 1447 | }, 1448 | "outputs": [], 1449 | "source": [ 1450 | "bound_crs = boundary.to_crs(check_crs)" 1451 | ] 1452 | }, 1453 | { 1454 | "cell_type": "code", 1455 | "execution_count": 67, 1456 | "id": "883d23cc", 1457 | "metadata": {}, 1458 | "outputs": [], 1459 | "source": [ 1460 | "with rasterio.open(f\"{name}.tiff\") as src:\n", 1461 | " out_image, out_transform = mask(src,\n", 1462 | " bound_crs.geometry,crop=True)\n", 1463 | " out_meta = src.meta.copy()\n", 1464 | " out_meta.update({\"driver\": \"GTiff\",\n", 1465 | " \"height\": out_image.shape[1],\n", 1466 | " \"width\": out_image.shape[2],\n", 1467 | " \"transform\": out_transform})" 1468 | ] 1469 | }, 1470 | { 1471 | "cell_type": "code", 1472 | "execution_count": 68, 1473 | "id": "1ddfaba0", 1474 | "metadata": {}, 1475 | "outputs": [], 1476 | "source": [ 1477 | "with rasterio.open(f\"{name}_masked.tif\", \"w\", **out_meta) as final:\n", 1478 | " final.write(out_image)" 1479 | ] 1480 | }, 1481 | { 1482 | "cell_type": "code", 1483 | "execution_count": null, 1484 | "id": "f1e324de", 1485 | "metadata": {}, 1486 | "outputs": [], 1487 | "source": [ 1488 | "src = rasterio.open(f'{name}_masked.tif')\n", 1489 | "plt.figure(figsize=(10,10))\n", 1490 | "plt.title('Final Image')\n", 1491 | "plot.show(src, adjust='linear')" 1492 | ] 1493 | }, 1494 | { 1495 | "cell_type": "markdown", 1496 | "id": "c2dce95b", 1497 | "metadata": {}, 1498 | "source": [ 1499 | "- https://github.com/sorabatake/article_9987_SentinelAPI" 1500 | ] 1501 | }, 1502 | { 1503 | "cell_type": "code", 1504 | "execution_count": 71, 1505 | "id": "0b4ccc26", 1506 | "metadata": {}, 1507 | "outputs": [], 1508 | "source": [ 1509 | "from osgeo import gdal" 1510 | ] 1511 | }, 1512 | { 1513 | "cell_type": "code", 1514 | "execution_count": 72, 1515 | "id": "2919d7c1", 1516 | "metadata": {}, 1517 | "outputs": [ 1518 | { 1519 | "data": { 1520 | "text/plain": [ 1521 | " >" 1522 | ] 1523 | }, 1524 | "execution_count": 72, 1525 | "metadata": {}, 1526 | "output_type": "execute_result" 1527 | } 1528 | ], 1529 | "source": [ 1530 | "scale = '-scale 0 250 0 30'\n", 1531 | "options_list = [\n", 1532 | " '-ot Byte',\n", 1533 | " '-of JPEG',\n", 1534 | " scale\n", 1535 | "] \n", 1536 | "options_string = \" \".join(options_list)\n", 1537 | "\n", 1538 | "gdal.Translate(f'{name}_masked.jpg',\n", 1539 | " f'{name}_masked.tif',\n", 1540 | " options=options_string)\n", 1541 | "\n" 1542 | ] 1543 | }, 1544 | { 1545 | "cell_type": "code", 1546 | "execution_count": null, 1547 | "id": "50cba376", 1548 | "metadata": {}, 1549 | "outputs": [], 1550 | "source": [ 1551 | "from PIL import Image\n", 1552 | "im = Image.open(f'{name}_masked.jpg')\n", 1553 | "im\n", 1554 | "\n" 1555 | ] 1556 | } 1557 | ], 1558 | "metadata": { 1559 | "interpreter": { 1560 | "hash": "a58eddd17ebc75d5380160d068b2973b20943a24de4dd937480440c19800b965" 1561 | }, 1562 | "kernelspec": { 1563 | "display_name": "siglibre", 1564 | "language": "python", 1565 | "name": "siglibre" 1566 | }, 1567 | "language_info": { 1568 | "codemirror_mode": { 1569 | "name": "ipython", 1570 | "version": 3 1571 | }, 1572 | "file_extension": ".py", 1573 | "mimetype": "text/x-python", 1574 | "name": "python", 1575 | "nbconvert_exporter": "python", 1576 | "pygments_lexer": "ipython3", 1577 | "version": "3.10.6" 1578 | }, 1579 | "toc": { 1580 | "base_numbering": 1, 1581 | "nav_menu": {}, 1582 | "number_sections": true, 1583 | "sideBar": true, 1584 | "skip_h1_title": false, 1585 | "title_cell": "Table of Contents", 1586 | "title_sidebar": "Contents", 1587 | "toc_cell": true, 1588 | "toc_position": {}, 1589 | "toc_section_display": true, 1590 | "toc_window_display": false 1591 | }, 1592 | "varInspector": { 1593 | "cols": { 1594 | "lenName": 16, 1595 | "lenType": 16, 1596 | "lenVar": 40 1597 | }, 1598 | "kernels_config": { 1599 | "python": { 1600 | "delete_cmd_postfix": "", 1601 | "delete_cmd_prefix": "del ", 1602 | "library": "var_list.py", 1603 | "varRefreshCmd": "print(var_dic_list())" 1604 | }, 1605 | "r": { 1606 | "delete_cmd_postfix": ") ", 1607 | "delete_cmd_prefix": "rm(", 1608 | "library": "var_list.r", 1609 | "varRefreshCmd": "cat(var_dic_list()) " 1610 | } 1611 | }, 1612 | "types_to_exclude": [ 1613 | "module", 1614 | "function", 1615 | "builtin_function_or_method", 1616 | "instance", 1617 | "_Feature" 1618 | ], 1619 | "window_display": false 1620 | } 1621 | }, 1622 | "nbformat": 4, 1623 | "nbformat_minor": 5 1624 | } 1625 | -------------------------------------------------------------------------------- /workshops/siglibre-2023/notebooks/ipyleaflet.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "id": "1b5df7d9", 7 | "metadata": {}, 8 | "outputs": [ 9 | { 10 | "data": { 11 | "application/vnd.jupyter.widget-view+json": { 12 | "model_id": "f38ccb8a3d1949389beeffb9a1d18c75", 13 | "version_major": 2, 14 | "version_minor": 0 15 | }, 16 | "text/plain": [ 17 | "Map(center=[52.204793, 360.121558], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title'…" 18 | ] 19 | }, 20 | "metadata": {}, 21 | "output_type": "display_data" 22 | } 23 | ], 24 | "source": [ 25 | "from ipyleaflet import Map, Marker\n", 26 | "\n", 27 | "center = (52.204793, 360.121558)\n", 28 | "\n", 29 | "m = Map(center=center, zoom=15)\n", 30 | "\n", 31 | "marker = Marker(location=center, draggable=True)\n", 32 | "m.add_layer(marker);\n", 33 | "\n", 34 | "display(m)\n", 35 | "\n" 36 | ] 37 | }, 38 | { 39 | "cell_type": "code", 40 | "execution_count": 3, 41 | "id": "4d89fef1", 42 | "metadata": {}, 43 | "outputs": [], 44 | "source": [ 45 | "# Now that the marker is on the Map, you can drag it with your mouse,\n", 46 | "# it will automatically update the `marker.location` attribute in Python\n", 47 | "\n", 48 | "# You can also update the marker location from Python, that will update the\n", 49 | "# marker location on the Map:\n", 50 | "marker.location = center" 51 | ] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "execution_count": null, 56 | "id": "4dbb9b48", 57 | "metadata": {}, 58 | "outputs": [], 59 | "source": [] 60 | } 61 | ], 62 | "metadata": { 63 | "kernelspec": { 64 | "display_name": "siglibre", 65 | "language": "python", 66 | "name": "siglibre" 67 | }, 68 | "language_info": { 69 | "codemirror_mode": { 70 | "name": "ipython", 71 | "version": 3 72 | }, 73 | "file_extension": ".py", 74 | "mimetype": "text/x-python", 75 | "name": "python", 76 | "nbconvert_exporter": "python", 77 | "pygments_lexer": "ipython3", 78 | "version": "3.10.6" 79 | } 80 | }, 81 | "nbformat": 4, 82 | "nbformat_minor": 5 83 | } 84 | -------------------------------------------------------------------------------- /workshops/siglibre-2023/requirements.in: -------------------------------------------------------------------------------- 1 | geopandas 2 | folium 3 | jupyter 4 | ipyleaflet 5 | pystac_client 6 | mapclassify 7 | seaborn 8 | stacmap 9 | sentinelsat 10 | rasterstats 11 | xarray-spatial 12 | planetary_computer 13 | spyndex 14 | segment-geospatial 15 | leafmap 16 | localtileserver 17 | gdal -------------------------------------------------------------------------------- /workshops/siglibre-2023/requirements.txt: -------------------------------------------------------------------------------- 1 | # 2 | # This file is autogenerated by pip-compile with Python 3.10 3 | # by the following command: 4 | # 5 | # pip-compile --resolver=backtracking 6 | # 7 | affine==2.4.0 8 | # via 9 | # rasterio 10 | # rasterstats 11 | anyio==3.7.0 12 | # via jupyter-server 13 | argon2-cffi==21.3.0 14 | # via 15 | # jupyter-server 16 | # nbclassic 17 | # notebook 18 | argon2-cffi-bindings==21.2.0 19 | # via argon2-cffi 20 | arrow==1.2.3 21 | # via isoduration 22 | asttokens==2.2.1 23 | # via stack-data 24 | attrs==23.1.0 25 | # via 26 | # fiona 27 | # jsonschema 28 | # rasterio 29 | backcall==0.2.0 30 | # via ipython 31 | beautifulsoup4==4.12.2 32 | # via 33 | # eemont 34 | # gdown 35 | # nbconvert 36 | bleach==6.0.0 37 | # via nbconvert 38 | branca==0.6.0 39 | # via 40 | # folium 41 | # ipyleaflet 42 | # stacmap 43 | cachetools==5.3.1 44 | # via google-auth 45 | certifi==2023.5.7 46 | # via 47 | # fiona 48 | # pyproj 49 | # rasterio 50 | # requests 51 | cffi==1.15.1 52 | # via argon2-cffi-bindings 53 | charset-normalizer==3.1.0 54 | # via requests 55 | click==8.1.3 56 | # via 57 | # click-plugins 58 | # cligj 59 | # dask 60 | # fiona 61 | # geomet 62 | # planetary-computer 63 | # rasterio 64 | # rasterstats 65 | # sentinelsat 66 | click-plugins==1.1.1 67 | # via 68 | # fiona 69 | # rasterio 70 | cligj==0.7.2 71 | # via 72 | # fiona 73 | # rasterio 74 | # rasterstats 75 | cloudpickle==2.2.1 76 | # via dask 77 | cmake==3.26.4 78 | # via triton 79 | colorcet==3.0.1 80 | # via datashader 81 | comm==0.1.3 82 | # via ipykernel 83 | contourpy==1.0.7 84 | # via matplotlib 85 | cycler==0.11.0 86 | # via matplotlib 87 | dask==2023.6.0 88 | # via 89 | # datashader 90 | # spyndex 91 | datashader==0.15.0 92 | # via xarray-spatial 93 | datashape==0.5.2 94 | # via datashader 95 | debugpy==1.6.7 96 | # via ipykernel 97 | decorator==5.1.1 98 | # via ipython 99 | defusedxml==0.7.1 100 | # via nbconvert 101 | earthengine-api==0.1.356 102 | # via 103 | # ee-extra 104 | # eemont 105 | # spyndex 106 | ee-extra==0.0.15 107 | # via eemont 108 | eemont==0.3.6 109 | # via spyndex 110 | exceptiongroup==1.1.1 111 | # via anyio 112 | executing==1.2.0 113 | # via stack-data 114 | fastjsonschema==2.17.1 115 | # via nbformat 116 | filelock==3.12.2 117 | # via 118 | # gdown 119 | # huggingface-hub 120 | # torch 121 | # triton 122 | fiona==1.9.4.post1 123 | # via 124 | # geopandas 125 | # rasterstats 126 | folium==0.14.0 127 | # via 128 | # -r requirements.in 129 | # stacmap 130 | fonttools==4.39.4 131 | # via matplotlib 132 | fqdn==1.5.1 133 | # via jsonschema 134 | fsspec==2023.6.0 135 | # via 136 | # dask 137 | # huggingface-hub 138 | gdown==4.7.1 139 | # via segment-geospatial 140 | geographiclib==2.0 141 | # via geopy 142 | geojson==3.0.1 143 | # via sentinelsat 144 | geomet==1.0.0 145 | # via sentinelsat 146 | geopandas==0.13.2 147 | # via 148 | # -r requirements.in 149 | # segment-geospatial 150 | geopy==2.3.0 151 | # via eemont 152 | google-api-core==2.11.0 153 | # via 154 | # google-api-python-client 155 | # google-cloud-core 156 | # google-cloud-storage 157 | google-api-python-client==2.89.0 158 | # via earthengine-api 159 | google-auth==2.17.3 160 | # via 161 | # earthengine-api 162 | # google-api-core 163 | # google-api-python-client 164 | # google-auth-httplib2 165 | # google-cloud-core 166 | # google-cloud-storage 167 | google-auth-httplib2==0.1.0 168 | # via 169 | # earthengine-api 170 | # google-api-python-client 171 | google-cloud-core==2.3.2 172 | # via google-cloud-storage 173 | google-cloud-storage==2.9.0 174 | # via earthengine-api 175 | google-crc32c==1.5.0 176 | # via google-resumable-media 177 | google-resumable-media==2.5.0 178 | # via google-cloud-storage 179 | googleapis-common-protos==1.59.1 180 | # via google-api-core 181 | html2text==2020.1.16 182 | # via sentinelsat 183 | httplib2==0.22.0 184 | # via 185 | # earthengine-api 186 | # google-api-python-client 187 | # google-auth-httplib2 188 | huggingface-hub==0.15.1 189 | # via segment-geospatial 190 | idna==3.4 191 | # via 192 | # anyio 193 | # jsonschema 194 | # requests 195 | importlib-metadata==6.6.0 196 | # via dask 197 | ipykernel==6.23.1 198 | # via 199 | # ipywidgets 200 | # jupyter 201 | # jupyter-console 202 | # nbclassic 203 | # notebook 204 | # qtconsole 205 | ipyleaflet==0.17.3 206 | # via -r requirements.in 207 | ipython==8.14.0 208 | # via 209 | # ipykernel 210 | # ipywidgets 211 | # jupyter-console 212 | ipython-genutils==0.2.0 213 | # via 214 | # nbclassic 215 | # notebook 216 | # qtconsole 217 | ipywidgets==8.0.6 218 | # via 219 | # ipyleaflet 220 | # jupyter 221 | isoduration==20.11.0 222 | # via jsonschema 223 | jedi==0.18.2 224 | # via ipython 225 | jinja2==3.1.2 226 | # via 227 | # branca 228 | # folium 229 | # jupyter-server 230 | # nbclassic 231 | # nbconvert 232 | # notebook 233 | # torch 234 | joblib==1.2.0 235 | # via scikit-learn 236 | jsonpointer==2.3 237 | # via jsonschema 238 | jsonschema[format-nongpl]==4.17.3 239 | # via 240 | # jupyter-events 241 | # nbformat 242 | jupyter==1.0.0 243 | # via -r requirements.in 244 | jupyter-client==8.2.0 245 | # via 246 | # ipykernel 247 | # jupyter-console 248 | # jupyter-server 249 | # nbclassic 250 | # nbclient 251 | # notebook 252 | # qtconsole 253 | jupyter-console==6.6.3 254 | # via jupyter 255 | jupyter-core==5.3.0 256 | # via 257 | # ipykernel 258 | # jupyter-client 259 | # jupyter-console 260 | # jupyter-server 261 | # nbclassic 262 | # nbclient 263 | # nbconvert 264 | # nbformat 265 | # notebook 266 | # qtconsole 267 | jupyter-events==0.6.3 268 | # via jupyter-server 269 | jupyter-server==2.6.0 270 | # via 271 | # nbclassic 272 | # notebook-shim 273 | jupyter-server-terminals==0.4.4 274 | # via jupyter-server 275 | jupyterlab-pygments==0.2.2 276 | # via nbconvert 277 | jupyterlab-widgets==3.0.7 278 | # via ipywidgets 279 | kiwisolver==1.4.4 280 | # via matplotlib 281 | lit==16.0.5.post0 282 | # via triton 283 | llvmlite==0.40.1rc1 284 | # via numba 285 | locket==1.0.0 286 | # via partd 287 | mapclassify==2.5.0 288 | # via -r requirements.in 289 | markupsafe==2.1.3 290 | # via 291 | # jinja2 292 | # nbconvert 293 | matplotlib==3.7.1 294 | # via 295 | # pycocotools 296 | # seaborn 297 | # segment-geospatial 298 | # spyndex 299 | matplotlib-inline==0.1.6 300 | # via 301 | # ipykernel 302 | # ipython 303 | mistune==2.0.5 304 | # via nbconvert 305 | mpmath==1.3.0 306 | # via sympy 307 | multipledispatch==0.6.0 308 | # via datashape 309 | nbclassic==1.0.0 310 | # via notebook 311 | nbclient==0.8.0 312 | # via nbconvert 313 | nbconvert==7.4.0 314 | # via 315 | # jupyter 316 | # jupyter-server 317 | # nbclassic 318 | # notebook 319 | nbformat==5.9.0 320 | # via 321 | # jupyter-server 322 | # nbclassic 323 | # nbclient 324 | # nbconvert 325 | # notebook 326 | nest-asyncio==1.5.6 327 | # via 328 | # ipykernel 329 | # nbclassic 330 | # notebook 331 | networkx==3.1 332 | # via 333 | # mapclassify 334 | # torch 335 | notebook==6.5.4 336 | # via jupyter 337 | notebook-shim==0.2.3 338 | # via nbclassic 339 | numba==0.57.0 340 | # via 341 | # datashader 342 | # xarray-spatial 343 | numpy==1.24.3 344 | # via 345 | # contourpy 346 | # datashader 347 | # datashape 348 | # eemont 349 | # folium 350 | # mapclassify 351 | # matplotlib 352 | # numba 353 | # opencv-python 354 | # pandas 355 | # pycocotools 356 | # rasterio 357 | # rasterstats 358 | # scikit-learn 359 | # scipy 360 | # seaborn 361 | # shapely 362 | # snuggs 363 | # spyndex 364 | # stacmap 365 | # torchvision 366 | # xarray 367 | nvidia-cublas-cu11==11.10.3.66 368 | # via 369 | # nvidia-cudnn-cu11 370 | # nvidia-cusolver-cu11 371 | # torch 372 | nvidia-cuda-cupti-cu11==11.7.101 373 | # via torch 374 | nvidia-cuda-nvrtc-cu11==11.7.99 375 | # via torch 376 | nvidia-cuda-runtime-cu11==11.7.99 377 | # via torch 378 | nvidia-cudnn-cu11==8.5.0.96 379 | # via torch 380 | nvidia-cufft-cu11==10.9.0.58 381 | # via torch 382 | nvidia-curand-cu11==10.2.10.91 383 | # via torch 384 | nvidia-cusolver-cu11==11.4.0.1 385 | # via torch 386 | nvidia-cusparse-cu11==11.7.4.91 387 | # via torch 388 | nvidia-nccl-cu11==2.14.3 389 | # via torch 390 | nvidia-nvtx-cu11==11.7.91 391 | # via torch 392 | opencv-python==4.7.0.72 393 | # via segment-geospatial 394 | overrides==7.3.1 395 | # via jupyter-server 396 | packaging==23.1 397 | # via 398 | # dask 399 | # geopandas 400 | # huggingface-hub 401 | # ipykernel 402 | # jupyter-server 403 | # matplotlib 404 | # nbconvert 405 | # qtconsole 406 | # qtpy 407 | # xarray 408 | pandas==2.0.2 409 | # via 410 | # datashader 411 | # eemont 412 | # geopandas 413 | # mapclassify 414 | # seaborn 415 | # spyndex 416 | # xarray 417 | pandocfilters==1.5.0 418 | # via nbconvert 419 | param==1.13.0 420 | # via 421 | # datashader 422 | # pyct 423 | parso==0.8.3 424 | # via jedi 425 | partd==1.4.0 426 | # via dask 427 | pexpect==4.8.0 428 | # via ipython 429 | pickleshare==0.7.5 430 | # via ipython 431 | pillow==9.5.0 432 | # via 433 | # datashader 434 | # matplotlib 435 | # torchvision 436 | planetary-computer==0.5.1 437 | # via -r requirements.in 438 | platformdirs==3.5.3 439 | # via jupyter-core 440 | prometheus-client==0.17.0 441 | # via 442 | # jupyter-server 443 | # nbclassic 444 | # notebook 445 | prompt-toolkit==3.0.38 446 | # via 447 | # ipython 448 | # jupyter-console 449 | protobuf==4.23.2 450 | # via 451 | # google-api-core 452 | # googleapis-common-protos 453 | psutil==5.9.5 454 | # via ipykernel 455 | ptyprocess==0.7.0 456 | # via 457 | # pexpect 458 | # terminado 459 | pure-eval==0.2.2 460 | # via stack-data 461 | pyasn1==0.5.0 462 | # via 463 | # pyasn1-modules 464 | # rsa 465 | pyasn1-modules==0.3.0 466 | # via google-auth 467 | pycocotools==2.0.6 468 | # via segment-geospatial 469 | pycparser==2.21 470 | # via cffi 471 | pyct==0.5.0 472 | # via 473 | # colorcet 474 | # datashader 475 | pydantic[dotenv]==1.10.9 476 | # via planetary-computer 477 | pygments==2.15.1 478 | # via 479 | # ipython 480 | # jupyter-console 481 | # nbconvert 482 | # qtconsole 483 | pyparsing==3.0.9 484 | # via 485 | # httplib2 486 | # matplotlib 487 | # snuggs 488 | pyproj==3.5.0 489 | # via 490 | # geopandas 491 | # segment-geospatial 492 | pyrsistent==0.19.3 493 | # via jsonschema 494 | pysocks==1.7.1 495 | # via requests 496 | pystac==1.7.3 497 | # via 498 | # planetary-computer 499 | # pystac-client 500 | # stacmap 501 | pystac-client==0.6.1 502 | # via 503 | # -r requirements.in 504 | # planetary-computer 505 | python-box==7.0.1 506 | # via 507 | # eemont 508 | # spyndex 509 | python-dateutil==2.8.2 510 | # via 511 | # arrow 512 | # datashape 513 | # jupyter-client 514 | # matplotlib 515 | # pandas 516 | # pystac 517 | # pystac-client 518 | python-dotenv==1.0.0 519 | # via pydantic 520 | python-json-logger==2.0.7 521 | # via jupyter-events 522 | pytz==2023.3 523 | # via 524 | # pandas 525 | # planetary-computer 526 | pyyaml==6.0 527 | # via 528 | # dask 529 | # huggingface-hub 530 | # jupyter-events 531 | pyzmq==25.1.0 532 | # via 533 | # ipykernel 534 | # jupyter-client 535 | # jupyter-console 536 | # jupyter-server 537 | # nbclassic 538 | # notebook 539 | # qtconsole 540 | qtconsole==5.4.3 541 | # via jupyter 542 | qtpy==2.3.1 543 | # via qtconsole 544 | rasterio==1.3.7 545 | # via 546 | # rasterstats 547 | # segment-geospatial 548 | rasterstats==0.19.0 549 | # via -r requirements.in 550 | requests[socks]==2.31.0 551 | # via 552 | # datashader 553 | # earthengine-api 554 | # eemont 555 | # folium 556 | # gdown 557 | # google-api-core 558 | # google-cloud-storage 559 | # huggingface-hub 560 | # planetary-computer 561 | # pystac-client 562 | # sentinelsat 563 | # spyndex 564 | # torchvision 565 | rfc3339-validator==0.1.4 566 | # via 567 | # jsonschema 568 | # jupyter-events 569 | rfc3986-validator==0.1.1 570 | # via 571 | # jsonschema 572 | # jupyter-events 573 | rsa==4.9 574 | # via google-auth 575 | scikit-learn==1.2.2 576 | # via mapclassify 577 | scipy==1.10.1 578 | # via 579 | # datashader 580 | # mapclassify 581 | # scikit-learn 582 | seaborn==0.12.2 583 | # via 584 | # -r requirements.in 585 | # spyndex 586 | segment-anything-py==1.0 587 | # via segment-geospatial 588 | segment-geospatial==0.8.1 589 | # via -r requirements.in 590 | send2trash==1.8.2 591 | # via 592 | # jupyter-server 593 | # nbclassic 594 | # notebook 595 | sentinelsat==1.2.1 596 | # via -r requirements.in 597 | shapely==2.0.1 598 | # via 599 | # geopandas 600 | # rasterstats 601 | simplejson==3.19.1 602 | # via rasterstats 603 | six==1.16.0 604 | # via 605 | # asttokens 606 | # bleach 607 | # fiona 608 | # gdown 609 | # geomet 610 | # google-auth 611 | # google-auth-httplib2 612 | # multipledispatch 613 | # python-dateutil 614 | # rfc3339-validator 615 | sniffio==1.3.0 616 | # via anyio 617 | snuggs==1.4.7 618 | # via rasterio 619 | soupsieve==2.4.1 620 | # via beautifulsoup4 621 | spyndex==0.4.0 622 | # via -r requirements.in 623 | stack-data==0.6.2 624 | # via ipython 625 | stacmap==0.0.4 626 | # via -r requirements.in 627 | sympy==1.12 628 | # via torch 629 | terminado==0.17.1 630 | # via 631 | # jupyter-server 632 | # jupyter-server-terminals 633 | # nbclassic 634 | # notebook 635 | threadpoolctl==3.1.0 636 | # via scikit-learn 637 | tinycss2==1.2.1 638 | # via nbconvert 639 | toolz==0.12.0 640 | # via 641 | # dask 642 | # datashader 643 | # partd 644 | torch==2.0.1 645 | # via 646 | # segment-anything-py 647 | # torchvision 648 | # triton 649 | torchvision==0.15.2 650 | # via segment-anything-py 651 | tornado==6.3.2 652 | # via 653 | # ipykernel 654 | # jupyter-client 655 | # jupyter-server 656 | # nbclassic 657 | # notebook 658 | # terminado 659 | tqdm==4.65.0 660 | # via 661 | # gdown 662 | # huggingface-hub 663 | # segment-geospatial 664 | # sentinelsat 665 | traitlets==5.9.0 666 | # via 667 | # comm 668 | # ipykernel 669 | # ipython 670 | # ipywidgets 671 | # jupyter-client 672 | # jupyter-console 673 | # jupyter-core 674 | # jupyter-events 675 | # jupyter-server 676 | # matplotlib-inline 677 | # nbclassic 678 | # nbclient 679 | # nbconvert 680 | # nbformat 681 | # notebook 682 | # qtconsole 683 | # traittypes 684 | traittypes==0.2.1 685 | # via ipyleaflet 686 | triton==2.0.0 687 | # via torch 688 | typing-extensions==4.6.3 689 | # via 690 | # huggingface-hub 691 | # pydantic 692 | # torch 693 | tzdata==2023.3 694 | # via pandas 695 | uri-template==1.2.0 696 | # via jsonschema 697 | uritemplate==4.1.1 698 | # via google-api-python-client 699 | urllib3==2.0.3 700 | # via requests 701 | wcwidth==0.2.6 702 | # via prompt-toolkit 703 | webcolors==1.13 704 | # via jsonschema 705 | webencodings==0.5.1 706 | # via 707 | # bleach 708 | # tinycss2 709 | websocket-client==1.5.3 710 | # via jupyter-server 711 | wheel==0.40.0 712 | # via 713 | # nvidia-cublas-cu11 714 | # nvidia-cuda-cupti-cu11 715 | # nvidia-cuda-runtime-cu11 716 | # nvidia-curand-cu11 717 | # nvidia-cusparse-cu11 718 | # nvidia-nvtx-cu11 719 | widgetsnbextension==4.0.7 720 | # via ipywidgets 721 | xarray==2023.5.0 722 | # via 723 | # datashader 724 | # spyndex 725 | # xarray-spatial 726 | xarray-spatial==0.3.5 727 | # via -r requirements.in 728 | xyzservices==2023.5.0 729 | # via 730 | # ipyleaflet 731 | # segment-geospatial 732 | zipp==3.15.0 733 | # via importlib-metadata 734 | 735 | # The following packages are considered to be unsafe in a requirements file: 736 | # setuptools 737 | --------------------------------------------------------------------------------