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(googlesheets) | |
library(logger) | |
library(crayon) | |
suppressPackageStartupMessages(library(data.table)) | |
logpath <- '/tmp' | |
logpath <- getwd() | |
logfile <- file.path(logpath, paste0(as.integer(Sys.time()), '.log')) | |
log_appender(appender_file(logfile)) | |
log_threshold(TRACE) |
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
## load data | |
df <- read.csv('http://bit.ly/CEU-R-numbers') | |
## analyze the association between x and y | |
summary(df) | |
cor(df) | |
## .. | |
## visualize the association between x and y | |
plot(df) |
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
## Download some shapefiles | |
download.file( | |
'https://biogeo.ucdavis.edu/data/diva/adm/HUN_adm.zip', | |
'Hungary_shapefile.zip') | |
unzip('Hungary_shapefile.zip') | |
## Look around what we have | |
library(rgdal) | |
ogrInfo('.') |
OlderNewer