Skip to content

Instantly share code, notes, and snippets.

View jdbcode's full-sized avatar

Justin Braaten jdbcode

View GitHub Profile
@jdbcode
jdbcode / ee_pdsi_explorer_global.md
Last active May 27, 2023 13:18
An Earth Engine App script that displays a global PDSI map and time series chart

Earth Engine App
Earth Engine Code Editor script

/**
 * @license
 * Copyright 2021 The Google Earth Engine Community Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@jdbcode
jdbcode / ee_pdsi_explorer_conus.md
Last active June 2, 2023 15:49
An Earth Engine App script that displays a PDSI map and time series chart for CONUS

Earth Engine App
Earth Engine Code Editor script

/**
 * @license
 * Copyright 2021 The Google Earth Engine Community Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@jdbcode
jdbcode / landsat_5_8_rgb_time_series_explorer.js
Last active June 22, 2021 21:48
Landsat 5 and 8 RGB time series explorer
/**
* @license
* Copyright 2021 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@jdbcode
jdbcode / goes_storm_ana_gif.ipynb
Last active June 1, 2021 23:20
goes_storm_ana_gif.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 / medium_rstudio_cloud_rgee_nightlights.R
Last active May 22, 2021 18:20
[Medium] RStudio Cloud and rgee nightlights
library(rgee)
ee_Initialize()
createTimeBand <- function(img) {
year <- (ee$Date(img$get("system:time_start"))
$get("year")$subtract(1991L))
ee$Image(year)$byte()$addBands(img)
}
@jdbcode
jdbcode / medium_rstudio_cloud_rgee_precip.R
Last active May 21, 2021 22:59
[Medium] RStudio Cloud and rgee precip
library(rgee)
library(tidyverse)
library(sf)
ee_Initialize()
nc <- st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
terraclimate <- (ee$ImageCollection("IDAHO_EPSCOR/TERRACLIMATE")
$filterDate("2001-01-01", "2002-01-01")
@jdbcode
jdbcode / medium_rstudio_cloud_rgee_eemont_ndwi.R
Last active May 12, 2021 16:40
[Medium] RStudio Cloud and rgee eemont NDWI
library(rgee)
library(RColorBrewer)
library(reticulate)
ee_Initialize()
eemont <- reticulate::import("eemont")
point <- ee$Geometry$Point(c(-76.9, 7.2))
L8 <- (ee$ImageCollection('LANDSAT/LC08/C01/T1_SR')
@jdbcode
jdbcode / medium_rstudio_cloud_rgee_ndvi.R
Last active May 22, 2021 18:19
[Medium] RStudio Cloud and rgee NDVI animation
library(rgee)
library(sf)
library(magick)
ee_Initialize()
mask <- system.file("shp/arequipa.shp", package = "rgee") %>%
st_read(quiet = TRUE) %>%
sf_as_ee()
@jdbcode
jdbcode / ee_pdsi_chart_altair_ggplot2.ipynb
Last active April 27, 2021 21:20
Earth Engine PDSI data reduction plotted with Altair and ggplot2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdbcode
jdbcode / naip_in_earth_engine.ipynb
Created April 21, 2021 22:08
naip_in_earth_engine.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.