Skip to content

Instantly share code, notes, and snippets.

View betolink's full-sized avatar

Luis López betolink

View GitHub Profile
@betolink
betolink / performance.html
Last active April 15, 2024 00:26
earthaccess + Dask on a 4 node raspberry pi 4 (4gb) cluster.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Dask Performance Report</title>
<link rel="shortcut icon" href="https://docs.dask.org/en/latest/_static/images/favicon.ico" />
<style>
html, body {
box-sizing: border-box;
display: flow-root;
@betolink
betolink / Dask-earthaccess.ipynb
Created March 23, 2024 19:17
Dask distributed EDL auth
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@betolink
betolink / cloud-optimized-hdf5.ipynb
Created January 30, 2024 20:33
cloud optimized HDF5
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@betolink
betolink / mur-access-patterns.ipynb
Created December 21, 2023 22:38
Benchmarking different access patterns to MUR
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@betolink
betolink / read_atl10.py
Created September 22, 2023 02:01
earthaccess-h5coro-coiled
#!/usr/bin/env python
import coiled
import geopandas as gpd
import numpy as np
import pandas as pd
from rich import print as rprint
from itertools import product
from pqdm.threads import pqdm
@betolink
betolink / earthaccess-kerchunk.ipynb
Last active August 28, 2023 20:57
earthaccess-kerchunk-store
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from collections import namedtuple
from functools import partial
from shapely.affinity import translate
from shapely.geometry.multipolygon import MultiPolygon
from shapely.geometry.point import Point
from shapely.geometry.polygon import Polygon
from shapely.ops import transform
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@betolink
betolink / ITS_LIVE_URL_TRANSLATE_V1.py
Last active May 8, 2023 19:01
translates ITS_LIVE URLs from AWS to their NSIDC location.
def build_nsidc_url(aws_url):
"""
This function is a hack to translate v1 URLS from ITS_LIVE hosted in AWS to URLs hosted at NSIDC
It will translate
https://its-live-data.s3.us-west-2.amazonaws.com/velocity_image_pair/landsatOLI/v01/32627/LE07_L1TP_230006_20020604_20170129_01_T1_X_LE07_L1TP_230006_20010703_20170204_01_T1_G0240V01_P053.nc
into
https://n5eil01u.ecs.nsidc.org/DP4/MEASURES/NSIDC-0775.001/2001.07.03/LE07L1TP2300062002060401T1_LE07L1TP2300062001070301T1_32627_G0240V01_P053.nc