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
#! Mapa distribuição de variáveis sobre maps do pack map - GGPLOT | |
library(ggplot2) | |
#extract reference data | |
mapcounties <- map_data("county") | |
mapstates <- map_data("state") | |
#merge data with ggplot county coordinates | |
mapcounties$county <- with(mapcounties , paste(region, subregion, sep = ",")) | |
mergedata <- merge(mapcounties, unemp_data, by.x = "county", by.y = "counties") |
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
#! Simulações de mortalidade de aves | |
#! Maria Dias e Paulo Eduardo Cardoso | |
setwd("C:/...") | |
visf<-read.table("visf.csv", sep=";", header=T) #tabela inicial, que tem os dias do ano em que foram feitas as prospecções, segundo cada um dos esquemas a analisar (MAp,MAs,MAm,Maq1 e Maq2); esta tabela tem também os valores de taxa de permanencia (r) associada a cada visita | |
load("txperm.fun") | |
######## 1. SIMULAÇÃO DE CENÁRIOS DE MORTALIDADE | |
### 1.1. criação de tabelas com diferentes cenários de mortalidade real; nrep: número de simulações para cada valor de mortalidade real |
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
#! Cartografia de dados distribuição aves - LOOP GGPLOT | |
#! Paulo E. Cardoso | |
#! Código Cores Hexadecimais - Normas Strix | |
#! Verde claro (#7FC31C), Verde escuro (#292F19), Laranja (#FF7F00), Azul claro (#80CECF) | |
#! OBJECTOS IMPORTANTES | |
#! tabAtlasT - Sumario Abundancias totais das especies por Quadricula/Epoca/Area | |
#!== Packages necessários: |
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
#! Modelying forest diversity using GAM | |
#! Paulo Eduardo Cardoso | |
require(RColorBrewer) | |
require(graphics) | |
require(mgcv) | |
library(maptools) | |
.trPaths <- paste(paste(Sys.getenv('APPDATA'), '\\Tinn-R\\tmp\\', sep=''), | |
c('', 'search.txt', 'objects.txt', 'file.r', 'selection.r', 'block.r', | |
'lines.r'), sep='') |
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
#! Compositional Analysis | |
#! Paulo Eduardo Cardoso | |
library(adehabitat) | |
#! Análise Compana para matrizes lidas a partir do clipboard. | |
usado <- read.delim("clipboard", sep = "\t", dec = ".", header = T) | |
#! Remove linhas sem dados - NA | |
usado <- usado[!is.na(usado[1]),] | |
#! Constroi a matriz de disponiveis alterando os valores em dispo | |
dispo <- as.data.frame(cbind(rep(27.3,nrow(usado)),rep(19.8,nrow(usado)),rep(80.2,nrow(usado)))) |
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
#! Gráfico de Barras GGPLOT | |
#! Paulo Eduardo Cardoso | |
library(chron) | |
library(ggplot2) | |
horas <- read.table("clipboard",header=T) | |
horas <- strptime(as.character(horas[,1]),"%H:%M:%S") | |
horaH <- data.frame("Hora"=hours(horas)) | |
horasdia <- data.frame("Hora"=c(0:23)) | |
postsH <- as.data.frame(table(horaH)) | |
postsDia <- merge(horasdia,postsH,by.x="Hora",by.y="horaH",all.x=T) |
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
# Unsupervided Classification of Landsat images | |
# !UTIL http://bioinf.wehi.edu.au/marray/ibc2004/lab4/lab4.html | |
# !UTIL http://www.digital-geography.com/unsupervised-classification-of-a-landsat-image-in-r-the-whole-story-or-part-two/ | |
# !UTIL http://www.jstatsoft.org/v15/i09/paper | |
# !UTIL http://cran.r-project.org/web/packages/e1071/e1071.pdf | |
# Packages | |
kpacks <- c('raster', 'sp', 'rgdal', 'cluster') | |
new.packs <- kpacks[!(kpacks %in% installed.packages()[,"Package"])] | |
if(length(new.packs)) install.packages(new.packs) |
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
# Paulo E. Cardoso 2020-05-15 | |
# Read EXIF Metadata from Photos obtained with SmarthPhone | |
# Initial instructions ---------------------------------- | |
# Download ExifTool executable from https://exiftool.org/ and | |
# unzip the exiftool(-k).exe to Rstudio Project root folder | |
# Download your fotos to (this case) data-raw folder | |
# Assuming .jpg image files | |
# Install packages ---------------------------------------- |
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
library(tidyverse) | |
library(lubridate) | |
library(forcats) | |
library(janitor) | |
library(ggplot2) | |
library(ggthemr) | |
ggthemr('grape') | |
# Read Tables ---- | |
refs <- read_csv('path to reference wdpa csv file') %>% |
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(bioRad) | |
library(rhdf5) | |
library(tidyverse) | |
library(lubridate) | |
library(zoo) | |
library(RColorBrewer) | |
library(patchwork) |
OlderNewer