Skip to content

Instantly share code, notes, and snippets.

View jdbcode's full-sized avatar

Justin Braaten jdbcode

View GitHub Profile
@jdbcode
jdbcode / irrigated-fields-sentinel-2.ipynb
Last active January 10, 2023 00:54
Irrigated fields Sentinel-2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdbcode
jdbcode / pydeck_earthengine_layers_landsat_olym.ipynb
Last active November 11, 2020 14:34
Earth Engine visualization with pydeck / deck.gl
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdbcode
jdbcode / o-c-lands-from-the-perspective-of-sentinel-2.ipynb
Last active November 10, 2020 18:28
O&C Lands from the perspective of Sentinel-2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdbcode
jdbcode / ee-thumbnail-displayed-by-plt-imshow.ipynb
Created November 4, 2020 22:41
ee-thumbnail-displayed-by-plt-imshow.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdbcode
jdbcode / ee-thumbnail-as-np-array.ipynb
Created October 21, 2020 21:11
ee-thumbnail-as-np-array.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdbcode
jdbcode / landsatlinkr-asset-manager.ipynb
Created October 1, 2020 16:07
LandsatLinkr Asset Manager
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdbcode
jdbcode / get-hex-colors.py
Last active April 11, 2024 20:09
Get a list of n hex colors for a given matplotlib palette
# Source: https://stackoverflow.com/a/33597599/5391200
from pylab import *
cmap = cm.get_cmap('seismic', 5) # matplotlib color palette name, n colors
for i in range(cmap.N):
rgb = cmap(i)[:3] # will return rgba, we take only first 3 so we get rgb
print(matplotlib.colors.rgb2hex(rgb))
cmap = cm.get_cmap('plasma', 101)
@jdbcode
jdbcode / earth_engine_zonal_stats_by_lon.js
Created May 25, 2020 23:02
Calculate zonal statistics by longitude bin and chart the result in Earth Engine
// Load VIIRS NDVI - to be summarized by longitude bins.
var viirsNdvi = ee.ImageCollection("NOAA/VIIRS/001/VNP13A1")
.select('NDVI').first();
// Load lat/lon image - select the longitude band.
var latLon = ee.Image.pixelLonLat().select('longitude');
// Make a list of longitude bin start values.
var step = 5; // longitude step
var lonStarts = ee.List.sequence(-90, 90-step, step);
@jdbcode
jdbcode / earth_engine_animation_to_drive.ipynb
Created May 15, 2020 22:50
earth_engine_animation_to_drive.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdbcode
jdbcode / tropomi_explorer_earth_engine_app.js
Last active September 5, 2025 03:32
TROPOMI Explorer Earth Engine App
/**
* @license
* Copyright 2020 Google
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*