Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Con suerte, aprenderemos un poco de todo
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Introducción Curso y entorno Jupyter
Intro to Python
Teledetección &
Rasters
Teledetección
&
Rasters
Teledetección
& Rasters
Análisis Vectorial
Análisis Vectorial
Análisis Vectorial
¿Geemap?
¿Geemap?
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Javier Bustamante Díaz
Responsable científico
(Investigador Científico)
Ricardo Díaz-Delgado Hernández
Dr. Biología
Isabel Afán Asencio
Dra. Biología
David Aragonés Borrego
Responsable Técnico. Ingeniero Forestal
Diego García Díaz
Geógrafo
Pedro Gómez Giráldez
Dr. Ingeniería de Montes
Gabriela P. Romero Olivos
Geógrafa
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Estación Biológica de Doñana
Otros centros CSIC
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Python es un lenguaje interpretado, lo que significa que ejecuta directamente el código línea por línea. Si existen errores en el código del programa, su ejecución se detiene. Así, los programadores pueden encontrar errores en el código con rapidez.
Python utiliza palabras similares a las del inglés. A diferencia de otros lenguajes de programación, Python no utiliza llaves. En su lugar, utiliza sangría.
Los programadores no tienen que anunciar tipos de variables cuando escriben código porque Python los determina en el tiempo de ejecución. Debido a esto, es posible escribir programas de Python con mayor rapidez.
Python es más cercano a los idiomas humanos que otros lenguajes de programación. Por lo tanto, los programadores no deben preocuparse sobre sus funcionalidades subyacentes, como la arquitectura y la administración de la memoria.
Python considera todo como un objeto, pero también admite otros tipos de programación, como la programación estructurada y la funcional.
https://aws.amazon.com/es/what-is/python/
Guido V. Rossum. 0.9.0
v 1.0
v 2.0
v 3.0
1991
1994
2000
2008
v 3.12.6
v 3.0
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
https://geoawesomeness.com/python-future-web-gis/
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 12-16 de junio de 2023.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Espectral
Espacial
Temporal
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Satellite image = Data!
2 | 5 | 8 | 6 | 7 |
---|---|---|---|---|
8 | 7 | 5 | 6 | 3 |
0 | 0 | 0 | 0 | 1 |
2 | 2 | 3 | 0 | 0 |
4 | 4 | 8 | 2 | 5 |
1. Earth Explorer (USGS)
https://earthexplorer.usgs.gov/
2.. SciHub (ESA)
https://scihub.copernicus.eu/
3. EO Browser (ESA)
http://apps.sentinel-hub.com/eo-browser/
4. Land Viewer (EOS)
https://lv.eosda.com/
2 | 5 | 8 | 6 | 0 |
---|---|---|---|---|
8 | 7 | 5 | 6 | 3 |
0 | 0 | 0 | 0 | 1 |
2 | 2 | 3 | 0 | 0 |
3 | 4 | 8 | 2 | 5 |
0.2 | 0.5 | -0.1 | 0.2 | 0.3 |
---|---|---|---|---|
-0.3 | -0.1 | 0 | 0.2 | 0.4 |
0 | 0 | 0 | 0 | 1 |
0.2 | 0.3 | 0.4 | 0.1 | 0 |
-0.2 | -0.5 | -0.4 | 0.1 | 0.3 |
Images download
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Principales librerías de Python para trabajar con datos Geográficos
GDAL –> Fundamental package for processing raster data formats (many modules below depend on this)
Geopandas –> Working with geospatial data in Python made easier, combines the capabilities of pandas and shapely.
Shapely –> Python package for manipulation and analysis of planar geometric objects (based on widely deployed GEOS).
Fiona –> Reading and writing spatial data (alternative for geopandas).
Pyproj –> Performs cartographic transformations and geodetic computations (based on PROJ.4).
Pysal –> Library of spatial analysis functions written in Python.
Geopy –> Geocoding library: coordinates to address <-> address to coordinates.
Contextily –> Add background basemaps for your (static) map visualizations
Streamlit->Streamlit turns data scripts into shareable web apps in minutes. All in pure Python. No front‑end experience required.
GeoViews –> Interactive Maps for the web.
OSMnx –> Python for street networks. Retrieve, construct, analyze, and visualize street networks from OpenStreetMap
Networkx –> Network analysis and routing in Python (e.g. Dijkstra and A* -algorithms), see this post.
Cartopy –> Make drawing maps for data analysis and visualisation as easy as possible.
Scipy.spatial –> Spatial algorithms and data structures.
Rasterio –> Clean and fast and geospatial raster I/O for Python.
RSGISLib –> Remote Sensing and GIS Software Library for Python.
Geemap -> Python API for Google Earth Engine. The power of GEE and Python combine with ipyleaflet maps
Fuente: Modificado de Automating GIS Processing Course. https://autogis-site.readthedocs.io/
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Inciso Environments
Crear un environment definiendo la versión de python y las librerías a usar (también sus versiones)
Crear un environment en base a los requirements definidos en un archivo
creación del archivo requirements: conda list --explicit -> requirements.txt
Crear un environment en base a los requirements definidos en un archivo
creación del archivo yml: conda env export > environment.yml
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Inciso Environments
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Inciso Environments
¡pixi install gdal!
curl -LsSf https://astral.sh/uv/install.sh | sh (instalamos el paquete UV de astral)
mkdir "~/geo" (creaamos el directorio para el env)
uv venv (creamos entorno virtual)
source .venv/bin/activate (activamos el env)
uv pip install geospatial (instalamos geospatial)
uv pip install --find-links https://girder.github.io/large_image_wheels gdal pyproj (solucionariamos gdal)
deactivate
En principio terminaremos de ver el notebook del otro día (aspect=1) y veremos como trabajar con shapefiles desde fiona (que nos servirá para entender mejor rasterio), y trataremos de analizar/entender los scripts para calcular las líneas máximas contenidas dentro de polígonos y desplazar y rotar puntos de forma aleatoria dentro de un polígono.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
https://drive.google.com/drive/folders/14Bap4Q4Qc_oTl-ye5I5AG5Xhq47kkCI9?usp=sharing
Raster Data
Intro Numpy
Intro Rasterio
Clase Landsat
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Geopandas tiene una documentación muy buena
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Python package based in Google Earth Engine python API and Map application Leaflet
https://www.youtube.com/c/Qiushengwu
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Python packaged built upon Geemap to work with seasonal vegetation indexes by getting pixel statistics for periods of time
https://freelearning.anaconda.cloud/get-started-with-anaconda
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.
Curso Análisis Espacial con Python. Gabinete de Formación del CSIC.
Lugar: Sevilla, 23-27 de septiembre de 2024.
Profesor: Diego García Díaz.