Skip to content

Instantly share code, notes, and snippets.

@qaisarmehmood
qaisarmehmood / .block
Created May 18, 2017 23:53
qaisar final
license: mit
@qaisarmehmood
qaisarmehmood / .block
Last active May 18, 2017 21:35
dragFinal
license: mit
@qaisarmehmood
qaisarmehmood / .block
Created May 18, 2017 20:55
displaying Percent
license: mit
@qaisarmehmood
qaisarmehmood / .block
Created May 14, 2017 11:48
trying to display Percent in colors
license: mit
@qaisarmehmood
qaisarmehmood / index.html
Created May 12, 2017 00:41
Trying to display "Percent" Pop under 5
<!DOCTYPE html>
<meta charset='utf-8'>
<title>US Counties</title>
<svg width="960" height="600" fill="none" stroke="#000" stroke-linejoin="round" stroke-linecap="round"></svg>
<div class="info" style="position: absolute; top: 20px; left: 20px"></div> <!-- NEW -->
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://unpkg.com/topojson-client@3"></script>
<script src="https://d3js.org/d3-scale-chromatic.v1.min.js"></script>
<script>
// This color scale works for values ranging from 2 to 10
@qaisarmehmood
qaisarmehmood / .block
Last active May 12, 2017 00:40
Trying to display "Percent" Pop under 5
license: mit
@qaisarmehmood
qaisarmehmood / .block
Last active May 11, 2017 23:52
latest block
license: mit
@qaisarmehmood
qaisarmehmood / index.html
Created May 11, 2017 23:31
editing to code of sir
<!DOCTYPE html>
<meta charset='utf-8'>
<title>US Counties</title>
<svg width="960" height="600" fill="none" stroke="#000" stroke-linejoin="round" stroke-linecap="round"></svg>
<div class="info" style="position: absolute; top: 20px; left: 20px"></div> <!-- NEW -->
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://unpkg.com/topojson-client@3"></script>
<script>
// This demo modified slightly from https://bl.ocks.org/mbostock/4108203
@qaisarmehmood
qaisarmehmood / .block
Last active May 11, 2017 23:30
editing to code of sir
license: mit
@qaisarmehmood
qaisarmehmood / index.html
Created May 11, 2017 19:05
var percent not defined error
<!DOCTYPE html>
<meta charset='utf-8'>
<title>US Counties</title>
<svg width="960" height="600" fill="none" stroke="#000" stroke-linejoin="round" stroke-linecap="round"></svg>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://unpkg.com/topojson-client@3"></script>
<script src="https://d3js.org/d3-scale-chromatic.v1.min.js"></script>
<script>
// This demo modified slightly from https://bl.ocks.org/mbostock/4108203
var svg = d3.select("svg").append("g")