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
#=============================================================================== | |
# 2020-06-19 -- twitter | |
# improve plot | |
# Ilya Kashnitsky, [email protected] | |
#=============================================================================== | |
# the challenge | |
# https://community.storytellingwithdata.com/exercises/one-little-changeand-a-redesign | |
library(tidyverse) |
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
# Some test data for proportions with mean 0.4 | |
p <- rbeta(20, 4, 6) | |
# JAGS model | |
modelTxt <- "model { | |
for(i in 1:length(p)) { | |
p[i] ~ dbeta(alpha, beta) | |
} | |
alpha <- mu * phi | |
beta <- (1-mu) * phi |
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(ggplot2) | |
library(mgcv) | |
# Toy data set | |
dat <- data.frame( | |
x = seq(0, 2*pi, length.out = 100), | |
y = sin(3*x) / sin(x/2) | |
) | |
# Randomly thin the data |

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
import scala.language.experimental.macros | |
import scala.reflect.macros.blackbox.Context | |
trait Mappable[T] { | |
def toMap(t: T): Map[String, Any] | |
def fromMap(map: Map[String, Any]): T | |
} | |
object Mappable { | |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.geotools</groupId> | |
<artifactId>gt-uber</artifactId> | |
<!-- The version of the GeoTools jars to combine --> | |
<version>10.2</version> |