Skip to content

Instantly share code, notes, and snippets.

@mpmckenna8
mpmckenna8 / index.html
Last active August 29, 2015 13:56
Start of Olympic D3 map hack
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
background: #fcfcfa;
}
.stroke {
fill: none;
@mpmckenna8
mpmckenna8 / index.html
Last active August 29, 2015 13:56
S'Mile Map Demo
<!DOCTYPE html>
<meta charset="utf-8">
<style>
/*//Uncomment if you want to add those lat/long lines
svg{
Background:black;
}
*/
<!DOCTYPE html>
<html>
<head>
<title>Foo</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<style type='text/css'>
body {
font-family: 'Helvetica';
letter-spacing:-5px;
@mpmckenna8
mpmckenna8 / index.html
Last active August 29, 2015 13:56
Grideroo Visually
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Code Challenge Vis</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
<script type="text/javascript">
@mpmckenna8
mpmckenna8 / README.md
Created February 13, 2014 03:29 — forked from mbostock/.block

A demo of TopoJSON on a U.S. counties shapefile from the U.S. census bureau. The same TopoJSON file can also be used to show states and counties.

@mpmckenna8
mpmckenna8 / index.html
Last active August 29, 2015 13:56
Leaflet.js Layer Control w/ Stamen base maps
<!DOCTYPE html>
<html>
<head>
<title>Stamen simple basemap</title>
<script type="text/javascript" src="http://leaflet.cloudmade.com/dist/leaflet.js"></script>
<link rel="stylesheet" href="http://leaflet.cloudmade.com/dist/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="http://leaflet.cloudmade.com/dist/leaflet.ie.css" /><![endif]-->
<script type="text/javascript" src="http://maps.stamen.com/js/tile.stamen.js?v1.2.3"></script>
@mpmckenna8
mpmckenna8 / index.html
Last active August 29, 2015 13:56
Gimmicky Text in a Canvas
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="http://s3.amazonaws.com/codecademy-content/courses/hour-of-code/js/alphabet.js"></script>
</head>
<body>
<canvas id="myCanvas"></canvas>
<script type="text/javascript" src="http://s3.amazonaws.com/codecademy-content/courses/hour-of-code/js/bubbles.js"></script>
<script type="text/javascript" src="main.js"></script>
@mpmckenna8
mpmckenna8 / UNhcrPOC50.js
Last active August 29, 2015 13:56
UNHCR Persons of Concern Top 50 Places of Origin
top50POCunhcr = [
{
"_id" : "Colombia",
"totrefs" : 4356236
},
{
"_id" : "Afghanistan",
"totrefs" : 4023752
},
{
@mpmckenna8
mpmckenna8 / README.md
Created February 20, 2014 15:32 — forked from mbostock/.block

This example demonstrates the use of a Voronoi tessellation as a simple heuristic for labeling scatterplots. The area of the Voronoi cell associated with each point in the scatterplot is used to determine which points are labeled: points with large cells likely have enough room to accommodate labels. Then, the vector between the point and the associated cell’s centroid (shown in orange) is used to choose between four label orientations: top, right, bottom and left.

@mpmckenna8
mpmckenna8 / UNhcrPOC50.js
Last active August 29, 2015 13:56
Using console.table() to check out objects
top50POCunhcr = [
{
"_id" : "Colombia",
"totrefs" : 4356236
},
{
"_id" : "Afghanistan",
"totrefs" : 4023752
},
{