Skip to content

Instantly share code, notes, and snippets.

View Zhenmao's full-sized avatar

Zhenmao Wan Zhenmao

View GitHub Profile
@Zhenmao
Zhenmao / index.html
Created March 9, 2018 10:52
Datacenter simulation
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link href="https://fonts.googleapis.com/css?family=Orbitron" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="styles.css">
<script src="https://d3js.org/d3.v4.min.js"></script>
</head>
<body>
@Zhenmao
Zhenmao / data.json
Last active February 26, 2018 10:25
Interactive Dendrogram
This file has been truncated, but you can view the full file.
[{"whichdim":"ga:medium","dim":"\/site-optimus-metadata-source\/?account=420308&property=UA-420308-1&propertyname=https:\/\/www.flatworldsolutions.com&days=7&profileId=665380&goalID=1&startDate=2018-02-12&goalcompletes=105&sessions=21426&endDate=2018-02-19&filter=ga:medium==(none)||(none)","den":"2669","num":"13","opps":"13.00","id":"https:\/\/www.googleapis.com\/analytics\/v3\/data\/ga?ids=ga:665380&dimensions=ga:medium&metrics=ga:sessions,ga:goal1Completions&start-date=2018-02-12&end-date=2018-02-19","opplevel":"Low","quer":"\/site-optimus-metadata-source\/?account=420308&property=UA-420308-1&propertyname=https:\/\/www.flatworldsolutions.com&days=7&profileId=665380&goalID=1&startDate=2018-02-12&goalcompletes=105&sessions=21426&endDate=2018-02-19&filter=ga:medium==(none)||drill down"},{"whichdim":"ga:medium","dim":"\/site-optimus-metadata-source\/?account=420308&property=UA-420308-1&propertyname=https:\/\/www.flatworldsolutions.com&days=7&profileId=665380&goalID=1&startDate=2018-02-12&goalcompletes=105&sessi
@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 {
@Zhenmao
Zhenmao / README.MD
Created January 20, 2018 10:06
Donut Chart with Labels and Missing Values D3.js V4
@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 / 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
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 / 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 / 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 / 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;