This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Polynomial dataset | |
| -5 -192.239 | |
| -4.5 71.537 | |
| -4 0.537 | |
| -3.5 -35.671 | |
| -3 -48.052 | |
| -2.5 -42.445 | |
| -2 -29.914 | |
| -1.5 -13.828 | |
| -1 -0.084 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Linear dataset | |
| -5 -4.291 | |
| -4 -2.86 | |
| -3 -2.918 | |
| -2 -1.954 | |
| -1 -1.426 | |
| 0 1.988 | |
| 1 0.157 | |
| 2 0.593 | |
| 3 2.044 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Plots, Colors, FileIO, ImageIO | |
| using PyCall | |
| using EarthEngine | |
| Initialize() | |
| ee_extra = pyimport("ee_extra") | |
| landsat_module = "users/sofiaermida/landsat_smw_lst:modules/Landsat_LST.js" | |
| ee_extra.install(landsat_module) | |
| lsmodule = ee_extra.require(landsat_module) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'Wray Buntine' | |
| _VERSION = '0.1' | |
| import numpy; | |
| import random; | |
| ########## | |
| # globals | |
| # | |
| # WARNING: need to recode to remove dependence of beta on x-range!!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(jsonlite) | |
| scribble_creator <- function(folder) { | |
| points <- list.files(folder, full.names = TRUE) | |
| message(sprintf("%s fueron detectados", length(points))) | |
| Sys.sleep(2) | |
| for (index in seq_along(points)) { | |
| in_files <- list.files(points[index]) | |
| jsonf <- in_files[grepl("cloud_segmentation", in_files)] | |
| js_list <- jsonlite::read_json(sprintf("%s/%s", points[index], jsonf)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(rgee) | |
| library(rgeeExtra) | |
| # Roy account | |
| ee_Initialize("roy1") | |
| # Load Planet, Sentinel-2, and Landsat-8 | |
| # ee_utils_dataset_display(planet) | |
| planet <- ee$ImageCollection('projects/planet-nicfi/assets/basemaps/americas') | |
| s2 <- ee$ImageCollection$Dataset$COPERNICUS_S2_SR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(jsonlite) | |
| library(reticulate) | |
| library(raster) | |
| np <- import("numpy") | |
| save_manual_labeling_scribble <- function(point, output) { | |
| points_x <- list.files( | |
| path = sprintf("%s/%s.iris/segmentation", point, basename(point)), | |
| pattern = "2_final\\.npy", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(jsonlite) | |
| library(reticulate) | |
| library(raster) | |
| np <- import("numpy") | |
| save_manual_labeling_scribble <- function(point, output) { | |
| points_x <- list.files( | |
| path = sprintf("%s/%s.iris/segmentation", point, basename(point)), | |
| pattern = "2_final\\.npy", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(jsonlite) | |
| scribble_ano <- function(file) { | |
| segmentation_point <- jsonlite::read_json(file) | |
| segmentation_point$classes <- list( | |
| list( | |
| name = "Clear", | |
| description = "All clear pixels, i.e. without cloud contamination or cloud shadows.", | |
| colour = c(255, 255, 255, 0), | |
| user_colour = c(0, 255, 255, 85) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| viz_patches <- function(pid) { | |
| metadata_list <- read.csv("https://storage.googleapis.com/flood_dataset/flood-training-metadata.csv") | |
| date <- metadata_list[metadata_list$chip_id %in% pid, 6][1] | |
| url <- sprintf("https://storage.googleapis.com/flood_dataset/%s.tif", pid) | |
| local_tif <- tempfile(fileext = ".tif") | |
| download.file(url, local_tif) | |
| # BOX | |
| ee_extent <- local_tif %>% |