A template for an animated d3 page with space for controls and visuals.
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(patchwork) | |
set.seed(8) | |
data = expand.grid( | |
x = 1:2, | |
subject = 1:20 | |
) %>% mutate(y = runif(40)) |
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(synthpop) | |
# make the built-in anscombe dataset tidy | |
anscombe_tidy = anscombe %>% | |
rowid_to_column("pointNumber") %>% | |
# pivot long | |
gather(setNumber, value, -pointNumber) %>% | |
# get the dimention and set number | |
mutate(dimention = substring(setNumber, 1, 1), setNumber = substring(setNumber, 2)) %>% |
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) | |
data = tribble( | |
~Site, ~Participants, ~Victims, ~Percent_Victims, | |
"Bordeaux", 137, 12, 8.8, | |
"Lille", 131, 9, 6.9, | |
"Lorraine", 268, 37, 13.8, | |
"Paris", 239, 23, 9.6, | |
"Rennes", 324, 33, 10.2, | |
"Rhone-Alpes", 219, 13, 5.9, |
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
<body width="100%" height="100%"> | |
<div class="core-page-loader"> | |
<div class="plane-spinner"> | |
<div class="spinner-plane"></div> | |
</div> | |
</div> | |
</body> | |
<style media="screen" type="text/css"> | |
.core-page-loader { |
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
license: gpl-3.0 |
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
<body> | |
<div id="chartDiv"></div> | |
<script src="https://vega.github.io/vega/vega.min.js"></script> | |
<script type="text/javascript"> | |
var chartSpec1 = { | |
"$schema": "https://vega.github.io/schema/vega/v3.json", | |
"width": 400, | |
"height": 400, |
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
license: gpl-3.0 |
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
license: gpl-3.0 | |
height: 1030 | |
scrolling: yes |