Skip to content

Instantly share code, notes, and snippets.

View ThierryO's full-sized avatar

Thierry Onkelinx ThierryO

View GitHub Profile
@ThierryO
ThierryO / abuff.R
Last active August 29, 2015 14:01 — forked from barryrowlingson/abuff.R
abuff <- function(spgeom, ratio = 1.1, precision = 0.00001, maxsteps = 20){
require(rgeos)
spgeom.area <- gArea(spgeom)
spgeom.perimeter <- gLength(spgeom)
buffer.width <- (ratio - 1) * spgeom.area / spgeom.perimeter
buffered.spgeom <- gBuffer(spgeom, width = buffer.width)
achieved.precision <- gArea(buffered.spgeom) / spgeom.area - ratio
steps <- 1
@ThierryO
ThierryO / jasja.R
Created January 13, 2015 22:45
create lines from consecutive coordinates
library(sp)
library(plyr)
library(reshape2)
library(rgdal)
n <- 1e4
dataset <- data.frame(
ID = seq_len(n),
X = runif(n),
Y = runif(n),
@ThierryO
ThierryO / lmm
Created January 26, 2015 08:14
Simulate a linear mixed model with random slope
library(ggplot2)
library(lme4)
library(mvtnorm)
fixed.intercept <- 1
n.subject <- 10
n.replicate <- 10
mean.subject <- c(1, 2, 3, 3, 2, 1)
sd.subject <- 0.1 * diag(length(mean.subject))
sd.noise <- 0.5
@ThierryO
ThierryO / sint-rochus.Rmd
Last active March 24, 2017 10:52
Verslag infoavond mobiliteitsplan Sint-Rochus
---
title: "Infoavond mobiliteit Sint-Rochus, verslag groep 7"
author: "Thierry Onkelinx"
date: "23 maart 2017"
output: word_document
---
# Globale verkeersstromen
- In het huidige plan is er vooral een focus op de verkeersstromen tussen Halle centrum en Essenbeek. Er is weinig aandacht voor de verkeersstromen richting Buizingen. Hierbij denken we zeker aan de verkeersstroom Welkomstlaan - Buizingen en Zuidbrug - Buizingen.
@ThierryO
ThierryO / test.tsv
Last active February 1, 2019 12:59
git2rdata test
x y z
test, nog iets 2023-06-19T04:39:25Z 20230619T043925Z
NA 2034-10-01T04:45:17Z 20341001T044517Z
NA 2028-07-02T17:54:27Z 20280702T175427Z
docker pull inbobmk/rn2k:latest
docker run --rm --env-file ./env.list inbobmk/rn2k:latest ./analysis.sh -g inbo/n2khelper@v0.4.2 -g inbo/n2kanalysis@inla_poisson -b n2kmonitoring -p abv -m 005ae317c931561a05b53fcfa860d7ac61dfec85.manifest
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
---
title: "Compare datahash among OS"
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(osmdata)
library(leaflet)
opq(bbox = "Terschelling") %>%
add_osm_feature(key = "power", value = "generator") %>%
add_osm_feature(key = "generator:source", value = "wind") %>%
osmdata_sp() -> mm
leaflet() %>%
addTiles() %>%
addMarkers(data = mm$osm_points)
@ThierryO
ThierryO / locale.R
Last active January 19, 2021 08:14
test locale
x <- c(
"a", "A", "0", "9", "z", "Z", "\U20AC UTF-8",
"\U00E9", "&", "\U00E0", "\U00B5", "\U00E7", "€ plain", "|", "#", "@", "$"
)
message("raw input")
print(x)
x <- enc2utf8(x)
message("input encoded as UTF-8")
print(x)
Sys.setlocale(locale = "C")