Skip to content

Instantly share code, notes, and snippets.

View daroczig's full-sized avatar

Gergely Daróczi daroczig

View GitHub Profile
@daroczig
daroczig / nemet.R
Created December 3, 2019 16:40
Hungarian - German words tester
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)
## 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)
@daroczig
daroczig / demo.R
Last active January 26, 2022 22:28
Read and render shapefiles in R
## 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('.')