Skip to content

Instantly share code, notes, and snippets.

View Zhenmao's full-sized avatar

Zhenmao Wan Zhenmao

View GitHub Profile
@Zhenmao
Zhenmao / 2008_rates_by_month.csv
Last active February 23, 2017 16:37
Best Months for Air Travel
Month Departure Delay Arrival Delay Cancellation
1 0.211456587951 0.245651366454 0.0285721360594
2 0.23651701579 0.274467883268 0.0361818296805
3 0.225470304663 0.255433459397 0.0262672661462
4 0.172331582309 0.204252950047 0.0173124057473
5 0.165937921104 0.198131926313 0.010273910469
6 0.233087166175 0.269869304133 0.0179589757913
7 0.204089302806 0.223034059475 0.0168776505699
8 0.180267492434 0.196774672984 0.0160629386277
9 0.113254009924 0.13153623167 0.018326591583
@Zhenmao
Zhenmao / 2008_rates_by_month.csv
Created September 11, 2017 03:09
Best Months for Air Travel
Month DepDelayed ArrDelayed Cancelled
1 0.20331811841225558 0.23635403167895142 0.028572136059362954
2 0.2278720952293952 0.2647127026400298 0.036181829680484015
3 0.21672969858299923 0.2459153695077018 0.02626726614617994
4 0.16516252428418093 0.19563269277710715 0.017312405747284015
5 0.15858833930129493 0.18948759098323747 0.01027391046903065
6 0.22487575267183096 0.2606934849219193 0.017958975791280918
7 0.19669040069689187 0.21524020951346565 0.016877650569887454
8 0.17315145546393065 0.18937445184303234 0.016062938627651773
9 0.10826979819118963 0.12540579913774616 0.018326591583041847
@Zhenmao
Zhenmao / index.html
Created November 11, 2017 08:38
World fastest lifts -- Remake of a Financial Time data visualization
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name='viewport' content='width=device-width,initial-scale=1'>
<title>World’s fastest lifts race to the top of the tallest buildings</title>
<style>
body {
font-family: sans-serif;
@Zhenmao
Zhenmao / countries.json
Last active November 11, 2017 16:38
World map pan and zoom, save as image.
{"arcs":[[[7080,7327],[-5,4],[-10,-10],[5,-6]],[[7070,7315],[-16,-12],[-9,5],[-28,-4],[-12,-6],[-1,-5],[-17,-18],[-11,-16],[6,-10],[6,-18],[-2,-15],[3,-8],[-18,-35],[4,-12],[-2,-18],[-7,-5],[-13,0],[-13,4],[3,-16],[6,-6],[-1,-9],[4,-9],[-12,-14],[-8,0],[-6,-18],[2,-7],[-6,-11],[2,-30],[-8,-17],[-6,-1],[-2,8],[-15,4],[-3,-8],[-14,-12],[6,-9],[-11,-7],[-13,6],[-7,-15],[-8,-7],[-3,-19],[2,-9],[-4,-35],[-32,-17],[-16,2],[-11,-11],[-14,6],[-30,-5],[-46,26]],[[6689,6902],[27,56],[1,10],[-4,21],[-24,7],[-1,9],[1,35],[-7,43],[0,9],[7,14],[1,9],[-10,5],[0,31],[11,8],[-5,13],[7,6],[5,26],[-1,11],[4,19]],[[6701,7234],[8,-10],[13,-1],[6,-7],[1,-9],[5,8],[5,-4],[13,13],[0,24],[9,0],[4,6],[20,11],[9,15],[0,16],[5,14],[-1,9],[9,8],[12,0],[4,16],[4,3],[15,-14],[5,2]],[[6847,7334],[14,2],[7,-12],[6,6],[8,-6]],[[6882,7324],[7,-15],[7,10],[15,9],[2,5],[10,-14],[5,7],[-2,13],[4,8],[21,2],[-3,18],[5,4],[12,26],[9,-2],[7,-9],[-1,-21],[6,3],[2,-8],[-3,-14],[-1,-35],[3,-12],[7,-4],[15,19],[9,1],[3,11],[14,14],[13,-2],[-1,-12],[14,8]
@Zhenmao
Zhenmao / test.json
Last active November 13, 2017 09:08
Topojson Testing
{"arcs": [[[-422,-502,513]],[[514,515]],[[516]],[[-504,-172,-443,-170,-388,517,-56,-287,518,519,-95,-426,-264,520,-271,-474,521]],[[522]],[[523]],[[524]],[[525]],[[526]],[[527]],[[528]],[[529]]], "type":"MultiPolygon","id":"RUS"}
@Zhenmao
Zhenmao / index.html
Last active December 17, 2017 03:11
Area chart with audio control
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script defer src="https://use.fontawesome.com/releases/v5.0.1/js/all.js"></script>
</head>
<body>
<div id="svg"></div>
<script>
@Zhenmao
Zhenmao / index.html
Last active December 27, 2017 11:44
Line donut chart with text in the center
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Line Donut Chart</title>
<!-- D3 -->
<script src="https://d3js.org/d3.v4.min.js"></script>
<!-- Google Font -->
@Zhenmao
Zhenmao / index.html
Created January 3, 2018 06:01
Bar, pie and line charts
<!DOCTYPE html>
<html>
<head>
<script src="https://d3js.org/d3.v4.min.js"></script>
</head>
<body>
<button id="bar-button">Bar</button>
<button id="pie-button">Pie</button>
<button id="line-button">Line</button>
<div id="chart"><svg></svg></div>
@Zhenmao
Zhenmao / README.MD
Created January 20, 2018 10:06
Donut Chart with Labels and Missing Values D3.js V4
@Zhenmao
Zhenmao / index.html
Last active June 11, 2020 05:43
Drilldown Bar Chart V4
<!DOCTYPE html>
<meta charset="utf-8">
<style>
text {
font: 10px sans-serif;
}
rect.background {