Skip to content

Instantly share code, notes, and snippets.

View pecard's full-sized avatar

Paulo E. Cardoso pecard

  • www.bioinsight.pt
  • Lisbon
View GitHub Profile
@pecard
pecard / Forest Loss with rgee
Last active December 11, 2020 14:23
Forest Loss with rgee
# packages
pacman::p_load('ps', "rgee", "tidyverse", "sf", "ggplot2", "patchwork",
'reticulate')
ee_Initialize(email = '...@gmail.com')
# Hansen Global Forest Change
forestloss <- ee$Image("UMD/hansen/global_forest_change_2019_v1_7")
flossyear <- forestloss$select('lossyear')
@pecard
pecard / Land Cover change with Corine CLC
Created December 16, 2020 16:38
Land Cover Change with rgee
# packages
pacman::p_load('ps', "rgee", "tidyverse", "sf", "ggplot2", "patchwork",
'reticulate', 'googledrive', 'stars', 'plotKML', 'readxl',
'networkD3', 'OpenLand', 'ggtern')
ee_Initialize(email = 'pauloeducardoso@gmail.com')
# CORINE
clc18 = ee$Image('COPERNICUS/CORINE/V20/100m/2018')$select('landcover');
clc12 = ee$Image('COPERNICUS/CORINE/V20/100m/2012')$select('landcover');
@pecard
pecard / .md
Last active February 20, 2021 11:14
Wind trajectory with ECMWF ERA-5 hourly wind data

GEE Code script

/**
 * @license
 * Copyright 2020 Google LLC.
 * SPDX-License-Identifier: Apache-2.0
 * 
 * Generates wind trajectory maps and animations from ECMWF ERA-5 hourly wind
 * data. A set of random points are drawn within an area of interest; a path is
@pecard
pecard / imp_berlin.R
Created November 8, 2022 00:18 — forked from z3tt/imp_berlin.R
Imperviousness levels in and around Berlin, Germany
library(tidyverse)
library(sf)
library(terra)
library(stars)
library(ggspatial)
library(systemfonts)
library(patchwork)
register_variant(
name = "Input Mono Light",