Skip to content

Instantly share code, notes, and snippets.

View robbibt's full-sized avatar
🛰️

Robbi Bishop-Taylor robbibt

🛰️
View GitHub Profile
"https://elevation-direct-downloads.s3-ap-southeast-2.amazonaws.com/5m-dem/national_utm_mosaics/cocosislandz47.zip" 

"https://elevation-direct-downloads.s3-ap-southeast-2.amazonaws.com/5m-dem/national_utm_mosaics/christmasislandz48.zip"

"https://elevation-direct-downloads.s3-ap-southeast-2.amazonaws.com/5m-dem/national_utm_mosaics/waz50.zip"

"https://elevation-direct-downloads.s3-ap-southeast-2.amazonaws.com/5m-dem/national_utm_mosaics/waz51.zip"

"https://elevation-direct-downloads.s3-ap-southeast-2.amazonaws.com/5m-dem/national_utm_mosaics/ntz52.zip"
@robbibt
robbibt / coastlines_test.yaml
Last active February 9, 2023 00:29
DEA Coastlines test Argo workflow
metadata:
generateName: dea-coastlines-
namespace: processing
labels:
workflows.argoproj.io/workflow-template: dea-coastlines
spec:
arguments:
parameters:
- name: image-tag
value: 1.2.3
@jscarto
jscarto / Blue Fluorite Palette
Last active September 24, 2020 06:03
Perceptually linear color palette based on a blue fluorite crystal (https://twitter.com/GeologyTime/status/1308406136283049984)
blue_fluorite = ['#291b32', '#2a1b34', '#2b1b34', '#2d1c36', '#2f1c38', '#301c39', '#301d3a', '#321d3b', '#331d3d', '#351d3f', '#351e40', '#371e41', '#381e43', '#3a1e45', '#3b1f45', '#3c1f46', '#3e1f48', '#3f1f4a', '#401f4c', '#42204d', '#43204e', '#44204f', '#462051', '#472052', '#482054', '#4a2056', '#4a2157', '#4c2158', '#4e215a', '#4f215b', '#50215d', '#52215e', '#532160', '#552162', '#552263', '#562264', '#582265', '#592267', '#5b2268', '#5c226b', '#5e226c', '#5f226e', '#60226f', '#622271', '#632272', '#642274', '#662276', '#672277', '#692278', '#6a227a', '#6c227b', '#6e227d', '#6e237e', '#6f247f', '#702480', '#712581', '#722681', '#732683', '#742783', '#752884', '#762985', '#772987', '#792a87', '#792b88', '#7a2c89', '#7b2c8a', '#7c2d8a', '#7d2d8c', '#7e2e8d', '#7f2f8d', '#80308e', '#813190', '#823191', '#833292', '#843292', '#863393', '#863494', '#873595', '#893596', '#8a3697', '#8b3798', '#8b3899', '#8c389a', '#8e399b', '#8e3a9c', '#8f3b9c', '#8f3d9d', '#8f3e9e', '#903f9e', '#90419e', '#90439f', '#9044
@KMarkert
KMarkert / gedi_to_csv.py
Created February 12, 2020 22:37
Python script to take GEDI level 2 data and convert variables to a CSV file. Usage `python gedi_to_csv.py <path> --variables [<var1>,<var2>,<var3>] --verbose`
import os
import fire
import h5py
import glob
import tqdm
import numpy as np
import pandas as pd
# requires h5py, tqdm, fire, numpy, and pandas to run
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mhweber
mhweber / Shapefile_Rasterize
Last active August 21, 2023 19:18
Rasterize a shapefile using geopandas and fiona
import geopandas as gpd
import rasterio
import fiona
from rasterio import features
import os
from datetime import datetime as dt
def Rasterize(shapefile, inras, outras, meta, field):
with rasterio.open(inras) as src:
kwargs = src.meta.copy()
import xarray as xr
import numpy as np
# create an example dataset
da = xr.DataArray(np.random.rand(10,30,40), dims=['time', 'lat', 'lon'])
# define a function to compute a linear trend of a timeseries
def linear_trend(x):
pf = np.polyfit(x.time, x, 1)
# we need to return a dataarray or else xarray's groupby won't be happy
@lukas-h
lukas-h / license-badges.md
Last active July 11, 2024 07:00
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@lizecillie
lizecillie / gist:6258921
Created August 17, 2013 22:08
Unsharp masking
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
from skimage import io, img_as_float
def median_filter(A, filter_size):
rows = np.shape(A)[0]
columns = np.shape(A)[1]
half_length = int((filter_size-1)/2)