Skip to content

Instantly share code, notes, and snippets.

@jwilber
Created September 22, 2019 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwilber/3c26b52e3e476fa01aa3464e7cbf8838 to your computer and use it in GitHub Desktop.
Save jwilber/3c26b52e3e476fa01aa3464e7cbf8838 to your computer and use it in GitHub Desktop.
fresh block
license: mit
<!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/iamjared@1.0.3"></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 roughViz.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 roughViz.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