Skip to content

Instantly share code, notes, and snippets.

@Finterly
Finterly / butterfly.vg.json
Created March 30, 2020 15:32
Butterfly-vega-code
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 600,
"height": 400,
"padding": 20,
"data": [
{
"name": "source",
"url": "https://raw.githubusercontent.com/Finterly/Datasets_to_play_with/master/butterfly.json",
"transform": [
@Finterly
Finterly / datasaurus.vg.json
Created March 30, 2020 18:14
Datasaurus vega code
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 400,
"height": 300,
"padding": 20,
"data": [
{
"name": "source",
"url": "https://raw.githubusercontent.com/Finterly/Datasets_to_play_with/master/datasaurus.json",
"transform": [
@Finterly
Finterly / map.top_state.html
Last active April 29, 2020 21:22
USHateCrime Top 6 States
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style>body{background-color:white;}</style>
<script>(function() {
// If window.HTMLWidgets is already defined, then use it; otherwise create a
// new object. This allows preceding code to set options that affect the
// initialization process (though none currently exist).
window.HTMLWidgets = window.HTMLWidgets || {};
@Finterly
Finterly / hatecrime-wordcloud.json
Last active April 29, 2020 21:20
UShatecrime Wordcloud
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "A word cloud visualization depicting Vega research paper abstracts.",
"width": 800,
"height": 400,
"padding": 0,
"data": [
{
"name": "table",
"url": "https://raw.githubusercontent.com/Finterly/Datasets_to_play_with/master/wordscloud",
@Finterly
Finterly / hatecrime_region_radar.json
Last active April 29, 2020 21:21
USHatecrime Region Radar Chart
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"padding": {
"left": 250,
"top": 200
},
"width": 660,
"height": 480,
"autosize": {
"type": "none"
@Finterly
Finterly / hatecrime_cartogram_2018.json
Last active April 29, 2020 21:21
UShatecrime Cartogram
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "A Dorling cartogram depicting U.S. state hate crime rates.",
"width": 900,
"height": 520,
"autosize": "none",
"config": {
"legend": {
"gradientDirection": "horizontal",
"gradientLength": 120,
@Finterly
Finterly / map_CA.html
Last active April 29, 2020 21:23
USHateCrime California
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style>body{background-color:white;}</style>
<script>(function() {
// If window.HTMLWidgets is already defined, then use it; otherwise create a
// new object. This allows preceding code to set options that affect the
// initialization process (though none currently exist).
window.HTMLWidgets = window.HTMLWidgets || {};
@Finterly
Finterly / hatecrime_topcities.json
Last active April 29, 2020 21:23
USHateCrime Top Cities
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"background": "white",
"padding": 5,
"height": 300,
"data": [
{
"name": "selector006_store"
},
{
@Finterly
Finterly / hatecrime_radial.json
Created April 29, 2020 21:46
USHateCrime Radial Plot
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "A basic radial plot that encodes two values as the angle and radius of an arc.",
"width": 200,
"height": 200,
"data": [
{
"name": "theft",
"values": [
12.1,
@Finterly
Finterly / redblue.json
Created May 6, 2020 17:53
Red and blue states
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "A choropleth map depicting U.S. unemployment rates by county in 2009.",
"width": 960,
"height": 500,
"autosize": "none",
"signals": [
{
"name": "Year",
"value": 1991,