library(raster)
This file contains 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
# Generate tiles from image, then create a layered/stacked 3D perspective. | |
# Modified from: https://stackoverflow.com/questions/56279466/how-do-i-create-a-figure-displaying-a-stack-of-images-at-an-angle | |
# Modules | |
import cv2 | |
import numpy as np | |
# Load source image | |
im = cv2.imread('yearly_forest_loss_patches_1_ha_per_100_sq_km.jpg') | |
im |
This file contains 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: "A Multi-page HTML Document" | |
author: "Yihui Xie and Romain Lesur" | |
date: "`r Sys.Date()`" | |
output: | |
pagedreport::paged_grid | |
# pagedown::html_paged: | |
# toc: true | |
# # change to true for a self-contained document, but it'll be a litte slower for Pandoc to render | |
# self_contained: false |
This file contains 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
# Gobal forest/non-forest map from TanDEM-X interferometric SAR data. | |
# Percentages of classes (forest, non-forest, urban) in the Dominican Republic | |
# Author: José Ramón Martínez Batlle, Universidad Autónoma de Santo Domingo (UASD) | |
# Related article paper: https://www.sciencedirect.com/science/article/pii/S0034425717305795 | |
# Source data via web: https://download.geoservice.dlr.de/FNF50/ | |
wd <- tempdir() | |
setwd(wd) | |
getwd() | |
#Download and merge tiles |
This file contains 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
#Packages | |
library(sf) | |
# If GDAL is installed locally... | |
# listsrs <- read.csv('/usr/share/gdal/2.2/pcs.csv') | |
# If not: | |
# Source: https://trac.osgeo.org/gdal/browser/trunk/gdal/data/pcs.csv | |
# Revision 41888, trunk: | |
listsrs <- read.csv( | |
'https://trac.osgeo.org/gdal/export/41888/trunk/gdal/data/pcs.csv' |
This file contains 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
setwd(tempdir()) | |
getwd() | |
urldatos <- 'http://www.geografiafisica.org/sem201901/geo112/datos_campo_201901/' | |
clastosatrana <- read.csv( | |
paste0( | |
urldatos, | |
'clastosatr_ana.csv' | |
), | |
encoding = "UTF-8", |
This file contains 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
setwd(tempdir()) | |
getwd() | |
urldatos <- 'http://www.geografiafisica.org/sem201901/geo112/datos_campo_201901/' | |
clastosatr <- read.csv( | |
paste0( | |
urldatos, | |
'clastosatr_carolaine.csv' |
This file contains 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
wd <- tempdir() | |
setwd(wd) | |
urldatos <- 'http://www.geografiafisica.org/sem201901/geo112/datos_campo_201901/' | |
clastosall <- read.csv( | |
paste0( | |
urldatos, | |
'joined_csv_files.csv' | |
), | |
check.names = F, | |
encoding = 'UTF-8') |
This file contains 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
#Working directory | |
wd <- '/home/jr/Documentos/clases_UASD/sem201901/datos_campo/' | |
alumnas <- list.dirs(wd, full.names = F, recursive = F) | |
csvfiles <- sapply( | |
alumnas, | |
function(x){ | |
fuente <- list.files( | |
paste0( | |
wd, | |
x |
This file contains 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
#Convert Excel files of river particle axes length to CSV format using R | |
#Packages | |
library(dplyr) | |
library(readxl) | |
#Working directory | |
wd <- '/home/jr/Documentos/clases_UASD/sem201901/datos_campo/' | |
alumnas <- list.dirs(wd, full.names = F, recursive = F) | |
i <- NULL |
NewerOlder