Skip to content

Instantly share code, notes, and snippets.

View kristw's full-sized avatar

Krist Wongsuphasawat kristw

View GitHub Profile
@kristw
kristw / index.html
Last active August 19, 2016 00:39
Reusable Bubble Chart
<!DOCTYPE html>
<html>
<head>
<title>Reusable Bubble Chart</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="chart"></div>
@kristw
kristw / index.html
Last active August 19, 2016 00:29
Bubble Chart
<!DOCTYPE html>
<html>
<head>
<title>Bubble Chart</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="chart"></div>
@kristw
kristw / README.md
Last active August 19, 2016 01:11 — forked from mbostock/.block
Bar Chart

This example is a slight modification from Mike Bostock's bar chart example. d3Kit was used to construct the <svg> and setup all the margins.

This simple bar chart is constructed from a TSV file storing the frequency of letters in the English language. The chart employs conventional margins and a number of D3 features:

@kristw
kristw / bubbleChart.js
Last active April 15, 2018 15:24
angular + d3Kit Bubble chart
// Define bubble chart
var BubbleChart = d3Kit.factory.createChart(
// First argument is the default options for this chart
{
margin: {top: 60, right: 60, bottom: 60, left: 60},
initialWidth: 800,
initialHeight: 460
},
// The second argument is an Array that contains
// names of custom events from this chart.
@kristw
kristw / .gitignore
Last active August 29, 2015 14:24 — forked from kogakure/.gitignore
.gitignore for latex
*.acn
*.acr
*.alg
*.aux
*.blg
*.dvi
*.fdb_latexmk
*.glg
*.glo
*.gls
'Tweet is coming.',
'When you play the game of tweets, you tweet or you die.',
'I demand a trial by tweeting.',
'Valar Morghutweet. All men must tweet.',
'A Lannister always favorite his tweet.',
'Hear me tweet.',
'The Lannisters tweet their regards.',
'You tweet nothing, Jon Snow.',
'I\'m going to tweet him an offer he can\'t refuse.',
'Toto, I\'ve got to tweet that we\'re not in Kansas anymore.',
@kristw
kristw / thailand-square-gridmap-raw.csv
Last active January 10, 2016 22:38
Data for Thailand Square Tile Grid Map
CRI
PYO
MSN CMI NAN
LPN LPG PRE NKI
UTT
STI PLK LEI NBP UDN SNK NPM
TAK KSN MDH
KPT PCT PNB CPM KKN MKM RET YST ACR
UTI NSN
@kristw
kristw / index.html
Last active January 12, 2016 01:14
Thailand Grid Map
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body{
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12px;
}
svg{
@kristw
kristw / index.html
Created January 12, 2016 04:13
US Grid Map
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body{
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12px;
}
svg{
# Yay! High voltage and arrows!
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}(%{$fg[yellow]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[red]%}) "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}⚡%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
PROMPT='%{$fg[green]%}%1~ $(git_prompt_info)%{$fg[green]%}>>%{$reset_color%} '