Skip to content

Instantly share code, notes, and snippets.

@ienwhang
ienwhang / index.html
Created May 6, 2018 10:06
Lyrical Notes Viz2
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<head>
<title>Viz Project Scatterplot</title>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://rawgit.com/susielu/d3-annotation/master/d3-annotation.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,400i,600" rel="stylesheet">
<style>
@ienwhang
ienwhang / index.html
Last active May 6, 2018 07:31
Lyrical Notes Viz3
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<head>
<title>Viz Project Area Chart</title>
<script src="https://d3js.org/d3.v4.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Noto+Sans" rel="stylesheet">
<script src="https://rawgit.com/susielu/d3-annotation/master/d3-annotation.min.js"></script>
@ienwhang
ienwhang / index.html
Last active May 6, 2018 07:28
Lyrical Notes Viz1
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<head>
<title>Viz Project Line Graph</title>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://rawgit.com/susielu/d3-annotation/master/d3-annotation.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,400i,600" rel="stylesheet">
<style>
@ienwhang
ienwhang / .block
Last active April 14, 2018 04:20
Multi-Series Line Chart
license: mit
@ienwhang
ienwhang / data.tsv
Created April 4, 2018 21:03
Bar Chart with Removal Slider
letter frequency
A .08167
B .01492
C .02780
D .04253
E .12702
F .02288
G .02022
H .06094
I .06973
@ienwhang
ienwhang / featuresdf.csv
Last active April 4, 2018 05:44
Spotify Radial Line Map
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 16 columns, instead of 9 in line 7.
id,name,artists,danceability,energy,key,loudness,mode,speechiness,acousticness,instrumentalness,liveness,valence,tempo,duration_ms,time_signature
7qiZfU4dY1lWllzX7mPBI,Shape of You,Ed Sheeran,0.825,0.652,1.0,-3.183,0.0,0.0802,0.581,0.0,0.0931,0.931,95.977,233713.0,4.0
5CtI0qwDJkDQGwXD1H1cL,Despacito - Remix,Luis Fonsi,0.694,0.815,2.0,-4.328,1.0,0.12,0.229,0.0,0.0924,0.813,88.931,228827.0,4.0
4aWmUDTfIPGksMNLV2rQP,Despacito (Featuring Daddy Yankee),Luis Fonsi,0.66,0.786,2.0,-4.757,1.0,0.17,0.209,0.0,0.112,0.846,177.833,228200.0,4.0
6RUKPb4LETWmmr3iAEQkt,Something Just Like This,The Chainsmokers,0.617,0.635,11.0,-6.769,0.0,0.0317,0.0498,1.44e-05,0.164,0.446,103.019,247160.0,4.0
3DXncPQOG4VBw3QHh3S81,I'm the One,DJ Khaled,0.609,0.668,7.0,-4.284,1.0,0.0367,0.0552,0.0,0.167,0.811,80.924,288600.0,4.0
7KXjTSCq5nL1LoYtL7XAw,HUMBLE.,Kendrick Lamar,0.904,0.611,1.0,-6.842,0.0,0.0888,0.000259,2.03e-05,0.0976,0.4,150.02,177000.0,4.0
3eR23VReFzcdmS7TYCrhC,It Ain't Me (with Selena Gomez),Kygo,0.64,0.533,0.0,-6.596,1.0,0.070
@ienwhang
ienwhang / calData.csv
Created March 30, 2018 01:00
AS4 SPLOM
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 1.
"","Coal","CommercialGeothermal","CommercialHydropower","CommercialSolar","CommercialWind","CommercialWood","ConsumptionCommercialCoal","ConsumptionCommercialDistillateFuelOil","ConsumptionCommercialKerosene","ConsumptionCommercialLiquefiedPetroleumGases","ConsumptionCommercialNaturalGas","ConsumptionElectricPowerCoal","ConsumptionElectricPowerDistillateFuelOil","ConsumptionElectricPowerNaturalGas","ConsumptionIndustrialCoal","ConsumptionIndustrialDistillateFuelOil","ConsumptionIndustrialKerosene","ConsumptionIndustrialLiquefiedPetroleumGases","ConsumptionIndustrialNaturalGas","ConsumptionIndustrialOtherPetroleumProducts","ConsumptionResidentialCoal","ConsumptionResidentialDistillateFuelOil","ConsumptionResidentialKerosene","ConsumptionResidentialLiquefiedPetroleumGases","ConsumptionResidentialNaturalGas","ConsumptionResidentialWood","ConsumptionTransportationCoal","ConsumptionTransportationDistillateFuelOil","ConsumptionTransportationLiquefiedPetroleumGases","ConsumptionTransportationNaturalGas","ElectricPow
@ienwhang
ienwhang / calData.csv
Created March 29, 2018 21:52
AS4 Trellis Plot D3
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 1.
"","Coal","CommercialGeothermal","CommercialHydropower","CommercialSolar","CommercialWind","CommercialWood","ConsumptionCommercialCoal","ConsumptionCommercialDistillateFuelOil","ConsumptionCommercialKerosene","ConsumptionCommercialLiquefiedPetroleumGases","ConsumptionCommercialNaturalGas","ConsumptionElectricPowerCoal","ConsumptionElectricPowerDistillateFuelOil","ConsumptionElectricPowerNaturalGas","ConsumptionIndustrialCoal","ConsumptionIndustrialDistillateFuelOil","ConsumptionIndustrialKerosene","ConsumptionIndustrialLiquefiedPetroleumGases","ConsumptionIndustrialNaturalGas","ConsumptionIndustrialOtherPetroleumProducts","ConsumptionResidentialCoal","ConsumptionResidentialDistillateFuelOil","ConsumptionResidentialKerosene","ConsumptionResidentialLiquefiedPetroleumGases","ConsumptionResidentialNaturalGas","ConsumptionResidentialWood","ConsumptionTransportationCoal","ConsumptionTransportationDistillateFuelOil","ConsumptionTransportationLiquefiedPetroleumGases","ConsumptionTransportationNaturalGas","ElectricPow
@ienwhang
ienwhang / getTriData.R
Created March 29, 2018 15:28
AS4 Trivariate Scatterplot D3
library(stringr)
# read data
energy <- read.csv("Desktop/energy.csv", header = T)
# create subset by state
cal.indices <- which(energy$State == "California")
cal.data <- energy[cal.indices,]
mic.indices <- which(energy$State == "Michigan")
mic.data <- energy[mic.indices,]
@ienwhang
ienwhang / calData.csv
Last active March 29, 2018 08:33
AS4 Bivariate Scatterplot D3
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 1.
"","Coal","CommercialGeothermal","CommercialHydropower","CommercialSolar","CommercialWind","CommercialWood","ConsumptionCommercialCoal","ConsumptionCommercialDistillateFuelOil","ConsumptionCommercialKerosene","ConsumptionCommercialLiquefiedPetroleumGases","ConsumptionCommercialNaturalGas","ConsumptionElectricPowerCoal","ConsumptionElectricPowerDistillateFuelOil","ConsumptionElectricPowerNaturalGas","ConsumptionIndustrialCoal","ConsumptionIndustrialDistillateFuelOil","ConsumptionIndustrialKerosene","ConsumptionIndustrialLiquefiedPetroleumGases","ConsumptionIndustrialNaturalGas","ConsumptionIndustrialOtherPetroleumProducts","ConsumptionResidentialCoal","ConsumptionResidentialDistillateFuelOil","ConsumptionResidentialKerosene","ConsumptionResidentialLiquefiedPetroleumGases","ConsumptionResidentialNaturalGas","ConsumptionResidentialWood","ConsumptionTransportationCoal","ConsumptionTransportationDistillateFuelOil","ConsumptionTransportationLiquefiedPetroleumGases","ConsumptionTransportationNaturalGas","ElectricPow