Skip to content

Instantly share code, notes, and snippets.

Avatar

Guillaume Attard guiattard

View GitHub Profile
View pfg6-meteo-1.py
# Import precipitation.
pr = (
ee.ImageCollection("UCSB-CHG/CHIRPS/DAILY")
.select("precipitation")
.filterDate(i_date, f_date)
)
# Import potential evaporation PET and its quality indicator ET_QC.
pet = (
ee.ImageCollection("MODIS/006/MOD16A2")
View pfg5-build-kriging.py
# We build our kriging model:
ok = OrdinaryKriging(V, min_points=2, max_points=10, mode='exact')
# We calculate the hydraulic head on our regular grid,
# and we make the result in a good shape
hh_hat = ok.transform(xx.flatten(), yy.flatten()).reshape(xx.shape)
# We calculate the kriging error on our grid:
s2 = ok.sigma.reshape(xx.shape)
View pfg4-install-import.py
!apt install gdal-bin python-gdal python3-gdal
!pip install fiona shapely pyproj
!apt install python3-rtree
!pip install git+git://github.com/geopandas/geopandas.git
!pip install descartes
!pip install git+https://github.com/python-visualization/folium
import pandas as pd
import geopandas as gpd
import zipfile
View example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.