Skip to content

Instantly share code, notes, and snippets.

@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
},
{
@mpmckenna8
mpmckenna8 / data_vsvzs.csv
Last active August 29, 2015 13:56
Column chart w/ bar labels - Centenarians per 100,000 people by country
country number_per_100_000_of_the_population the_geom cartodb_id created_at updated_at
Japan 1197 1 2013-09-27 14:54:45.614155 2013-09-27 14:54:45.862011
Sweden 995 2 2013-09-27 14:54:45.614155 2013-09-27 14:54:45.862011
Italy 908 3 2013-09-27 14:54:45.614155 2013-09-27 14:54:45.862011
France 887 4 2013-09-27 14:54:45.614155 2013-09-27 14:54:45.862011
Norway 813 6 2013-09-27 14:54:45.614155 2013-09-27 14:54:45.862011
Spain 778 7 2013-09-27 14:54:45.614155 2013-09-27 14:54:45.862011
Denmark 720 8 2013-09-27 14:54:45.614155 2013-09-27 14:54:45.862011
Finland 710 9 2013-09-27 14:54:45.614155 2013-09-27 14:54:45.862011
United States 666 10 2013-09-27 14:54:45.614155 2013-09-27 14:54:45.862011
@mpmckenna8
mpmckenna8 / _.md
Created February 25, 2014 06:35
Tributary inlet
@mpmckenna8
mpmckenna8 / index.html
Created February 25, 2014 18:57 — forked from ilyabo/index.html
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="jquery.tipsy.js"></script>
<link href="tipsy.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="chart"></div>
@mpmckenna8
mpmckenna8 / index.html
Last active August 29, 2015 13:57
SF Board of Sups Stuff
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<style type="text/css">
/* No style rules here yet */
</style>
</head>
@mpmckenna8
mpmckenna8 / index.html
Last active November 11, 2020 08:47
Multiple Pop-ups using leaflet.js
<!DOCTYPE html>
<html>
<head>
<title>Multiple concurrent popups w/ leaflet</title>
<script type="text/javascript" src="./maptimes4leaflet.json" ></script>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/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>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.