Skip to content

Instantly share code, notes, and snippets.

@cvitolo
cvitolo / trmm.R
Last active July 17, 2022 12:01
Download and convert TRMM data
#' Download and convert TRMM data
#'
#' @author Claudia Vitolo
#'
#' @description The TRMM dataset provide global historical rainfall estimation in a gridded format.
#'
#' @param fileLocation file path where to save the GeoTiff
#' @param url url where data is stored (e.g. "ftp://disc2.nascom.nasa.gov/data/TRMM/Gridded/3B43_V7/2012/")
#' @param product this is the code that identifies a product, default is "3B43"
#' @param version this is the version number, default is 7

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@cvitolo
cvitolo / thankyou_wordcloud.R
Created October 4, 2019 11:13
Thank you wordcloud
# devtools::install_github("lepennec/ggwordcloud")
library(ggwordcloud)
library(dplyr)
library(colorspace)
data("thankyou_words")
thankyou_words <- thankyou_words %>%
mutate(angle = 45 * sample(-2:2, n(), replace = TRUE,
prob = c(1, 1, 4, 1, 1)))
@cvitolo
cvitolo / rnrfa_BigDataApplication.Rmd
Last active December 23, 2016 13:16
Big data analytics experiment using the rnrfa package
---
title: "Big Data analytics using the rnrfa package"
author: "Claudia Vitolo"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE,
message = FALSE,
cache = FALSE,
@cvitolo
cvitolo / rnrfa_stationsEU-NUTS1regions.Rmd
Created September 1, 2016 15:38
Geoprocessing based on user-defined areas using the rnrfa package
---
title: "NRFA stations in EU-NUTS1 regions"
author: "Claudia Vitolo"
date: "13 March 2016"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE,
message = FALSE,
@cvitolo
cvitolo / rnrfa_DynamicReportingMapping.Rmd
Last active September 1, 2016 15:20
Dynamic Reporting and Mapping application using the rnrfa package
---
title: "RNRFA application for dynamic mapping and reporting"
author: "Claudia Vitolo"
runtime: shiny
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE,
message=FALSE,
@cvitolo
cvitolo / testRHydro.R
Created May 12, 2014 13:42
Run the FUSE modules within RHydro package
### testRHydro.R ###
# Load library
library(RHydro)
# Load data
data(modlist)
data(mopex)
# Calculate instantaneous runoff
Qinst <- fusesma.sim (fuse.DATA,mid=5,modlist,deltim=1,
@cvitolo
cvitolo / RHydro01.R
Last active March 22, 2016 13:34
FUSE-RHydro tutorial 1
# Step A: install RHydro
if(!require(RHydro)) install.packages("RHydro",repos="http://R-Forge.R-project.org")
# Step B: prepare your data
library(RHydro)
temp <- read.csv("dummyData.csv")
@cvitolo
cvitolo / FUSE_RHydro02.R
Last active March 22, 2016 13:33
FUSE-RHydro tutorial 2
if(!require(RHydro)) install.packages("RHydro",repos="http://R-Forge.R-project.org")
library(RHydro)
temp <- read.csv("dummyData.csv")
DATA <- zooreg(temp[,2:4], order.by=temp[,1])
myDELTIM <- 1
myMID <- 60
# Sample parameter space using the Latin Hypercube Sampling method
@cvitolo
cvitolo / FUSE_RHydro03.R
Created July 22, 2014 00:07
FUSE-RHydro tutorial 3
if(!require(RHydro)) install.packages("RHydro",repos="http://R-Forge.R-project.org")
library(RHydro)
temp <- read.csv("dummyData.csv")
DATA <- zooreg(temp[,2:4], order.by=temp[,1])
myDELTIM <- 1