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
| # Description: This script is used to download HLS data from NASA's Earthdata | |
| # STAC API and build a cloud-free composite image. | |
| # ----- Functions ----- | |
| # band mapping for HLS SL data | |
| #' @return a named character vector of band mappings for HLS SL data | |
| hlssl_band_mapping <- function() { | |
| c( | |
| B01 = "A", B02 = "B", B03 = "G", B04 = "R", |
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("shiny") | |
| library("tidyverse") | |
| library("rnaturalearthdata") | |
| library("sf") | |
| # Using Africa instead of whole world as countries110 contains | |
| # 3 invalid geometries. Also, too many examples use the USA everytime | |
| africa_sf <- countries110 %>% | |
| st_as_sf() %>% | |
| st_transform(4326) %>% |
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(googledrive) | |
| # authenticate yourself | |
| drive_auth() | |
| gdoc_to_rmd <- function(drive_id, output, verbose = TRUE, overwrite = FALSE) { | |
| # get the doc | |
| doc <- drive_get(as_id(drive_id)) | |
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
| --- | |
| title: "Tweet thread" | |
| author: "Elio Campitelli" | |
| output: github_document | |
| --- | |
| ```{r} | |
| knitr::opts_chunk$set(dev = "png", | |
| tweet_this = TRUE) |
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
| import cdstoolbox as ct | |
| @ct.application(title='PV Power Potential', | |
| description = 'Computation of PV Power potential for a specific day using the dimensionless described in Mavromatakis et al. https://doi.org/10.1016/j.renene.2009.11.010', | |
| abstract = 'Lorem Ipsum') | |
| @ct.input.dropdown('show_year', values=range(2010, 2017)) | |
| @ct.input.dropdown('region', values=['Europe', 'China']) | |
| @ct.input.text('month', type = int, label='Month', default=7) | |
| @ct.input.text('day', type = int, label='Day', default=1) |
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
| # This example demonstrates running furrr code distributed on 2 AWS instances ("nodes"). | |
| # The instances have already been created. | |
| library(future) | |
| library(furrr) | |
| # Two t2.micro AWS instances | |
| # Created from http://www.louisaslett.com/RStudio_AMI/ | |
| public_ip <- c("34.205.155.182", "34.201.26.217") |
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
| a = read.delim("~/Accuracy_as_a_function_of_sketch_size_and_set_size.txt") | |
| head(a) | |
| a$rel_error = sqrt(a$Mean.squared.error) / a$Exact.size | |
| a$p = factor(a$Sketch.size..log2.) | |
| library(cowplot) | |
| library(ggplot2) | |
| plot1 = ggplot(a, aes(x=Exact.size, sqrt(Mean.squared.error) / Exact.size, |
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
| --- | |
| title: "albatross_breeding_cycle" | |
| author: "Jaimie Cleeland jaimie.cleeland@utas.edu.au" | |
| date: "12/12/2016" | |
| output: html_document | |
| --- | |
| Load libraries | |
| ```{r} | |
| library(dplyr) |
NewerOlder
