Skip to content

Instantly share code, notes, and snippets.

Avatar

Randall Pruim rpruim

View GitHub Profile
@rpruim
rpruim / gapminder.css
Last active Jan 22, 2020
Play - Pause Button
View gapminder.css
circle {
stroke: black;
fill-opacity: 50%;
}
body,
h1 {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
color: #797379;
/*fill: #00c4ff;*/
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title></title>
<script src="https://d3js.org/d3.v5.min.js"></script>
</head>
<body>
@rpruim
rpruim / index.html
Last active Jan 20, 2020
Choropleth Map
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title></title>
<script src="https://d3js.org/d3.v5.min.js"></script>
<script src="https://d3js.org/d3-geo-projection.v2.min.js"></script>
<link rel="stylesheet" href="map.css" />
@rpruim
rpruim / index.html
Created Jan 17, 2020
Random Verse Generator
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Random Verse</title>
<script src="https://d3js.org/d3.v5.min.js"></script>
</head>
<body>
@rpruim
rpruim / .block
Created Jan 17, 2020
D3 Interactions: Heatmap example showing mouse interactions
View .block
license: Creative Commons Attribution-ShareAlike (CC BY-SA)
height: 700
scrolling: yes
border: yes
@rpruim
rpruim / .block
Last active Jan 17, 2020
D3 Interaction: Drop down menus
View .block
license: Creative Commons Attribution-ShareAlike (CC BY-SA)
height: 700
scrolling: yes
border: yes
@rpruim
rpruim / gapminder.css
Last active Dec 11, 2019
1952 Gapminder
View gapminder.css
circle {
stroke: black;
fill-opacity: 50%
}
body,
h1 {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #797379;
@rpruim
rpruim / server.R
Created Nov 21, 2012
Shiny Sampling Distributions
View server.R
library(shiny)
library(mosaic)
require(lattice)
require(datasets)
# Define server logic required to generate and plot a random distribution
shinyServer(
function(input, output) {
popDist <- reactive( function() input$popDist )