Built with blockbuilder.org
Created
September 20, 2019 03:42
-
-
Save jwilber/efb112f175d6473437bca433dcd3d3ba to your computer and use it in GitHub Desktop.
fresh block
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: mit |
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
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.core.js"></script> | |
<script src="https://unpkg.com/jaredwilber@1.2.7"></script> | |
<style> | |
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; } | |
</style> | |
</head> | |
<body> | |
<div id="vis1"></div> | |
<div id="vis0"></div> | |
<script> | |
new jaredwilber.Bar( | |
{ | |
element: '#vis1', | |
data: 'https://gist.githubusercontent.com/mbostock/3310560/raw/98311dc46685ed02588afdcb69e5fa296febc1eb/letter-frequency.tsv', | |
labels: 'letter', | |
values: 'frequency', | |
height:window.innerHeight * 0.7, | |
width: window.innerWidth * 0.8, | |
roughness: 15, | |
color: 'pink', | |
fillWeight: 1, | |
strokeWidth: 0.5, | |
fillStyle: 'cross-hatch', | |
stroke: 'black', | |
} | |
); | |
new jaredwilber.Scatter( | |
{ | |
element: '#vis0', | |
data: 'https://raw.githubusercontent.com/plotly/datasets/master/gapminder2007.csv', | |
title: 'Hans Rosling (Gapminder 2007)', | |
x: 'gdpPercap', | |
y: 'lifeExp', | |
radius: 'pop', | |
colorVar: 'continent', | |
highlightLabel: 'country', | |
highlight: 'red', | |
fillWeight: 2, | |
roughness: 3.5, | |
width: window.innerWidth / 2, | |
height: 500, | |
} | |
); | |
</script> | |
</body> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment