Skip to content

Instantly share code, notes, and snippets.

View jdbcode's full-sized avatar

Justin Braaten jdbcode

View GitHub Profile
@jdbcode
jdbcode / get_lat_lon_exif_pil.py
Created September 19, 2017 18:33 — forked from erans/get_lat_lon_exif_pil.py
Get Latitude and Longitude from EXIF using PIL
from PIL import Image
from PIL.ExifTags import TAGS, GPSTAGS
def get_exif_data(image):
"""Returns a dictionary from the exif data of an PIL Image item. Also converts the GPS Tags"""
exif_data = {}
info = image._getexif()
if info:
for tag, value in info.items():
decoded = TAGS.get(tag, tag)

H3 Earth Engine Image Export to Drive

A quick reference and format template for exporting raster data from Google Earth Engine to Google Drive.

Basic

Export.image.toDrive({
  image:,
 region:,
# This script relies on the magick library, see this vignette for more information:
# https://cran.r-project.org/web/packages/magick/vignettes/intro.html
#
# If you have Windows or Mac OS, I believe ImageMagick STL is integrated with the CRAN distribution
# of the R magick library. If on Linux, see the "Build from source" section of the above URL
#
# This script will add year annotations from GIF animations generated and downloaded from the
# LT-GEE Time Series Animator open access Earth Engine App:
# https://emaprlab.users.earthengine.app/view/lt-gee-time-series-animator
#
@jdbcode
jdbcode / EE Annual NDVI Animation.R
Last active October 9, 2020 17:47
R script to add date annotations to a time series GIF created in Earth Engine.
# R script to add date annotations to a time series GIF created in Earth Engine.
library(magick)
gif = "C:/Users/braatenj/Downloads/africa.gif"
dates = c(
'Jan-08',
'Jan-24',
'Feb-09',
'Feb-25',
@jdbcode
jdbcode / q_347340_68792.ipynb
Last active January 15, 2020 00:07
Untitled12.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdbcode
jdbcode / q_347340_68792_alt01.ipynb
Last active January 15, 2020 23:27
q_347340_68792_alt01.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdbcode
jdbcode / q_350771_68792.ipynb
Created February 18, 2020 20:52
q_350771_68792.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdbcode
jdbcode / ee_landtrendr_fitted_rgb_thumbnails.py
Last active February 24, 2023 13:52
Earth Engine LandTrendr fitted RGB thumbnail time series
"""
Copyright 2020 Justin Braaten
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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@jdbcode
jdbcode / tropomi_explorer_earth_engine_app.js
Last active January 9, 2023 03:51
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
*
@jdbcode
jdbcode / earth_engine_animation_to_drive.ipynb
Created May 15, 2020 22:50
earth_engine_animation_to_drive.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.