Skip to content

Instantly share code, notes, and snippets.

@rdhyee
rdhyee / dimple_test.ipynb
Created March 12, 2014 04:45
Attempt to embed dimplejs into the IPython Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / MutationObserver.js
Created March 12, 2014 14:33
code bit to observe changes in DOM. Based on http://stackoverflow.com/a/18970264
var whatToObserve = {childList: true, attributes: true, subtree: true, attributeOldValue: true, attributeFilter: ['class', 'style']};
var mutationObserver = new MutationObserver(function(mutationRecords) {
$.each(mutationRecords, function(index, mutationRecord) {
if (mutationRecord.type === 'childList') {
if (mutationRecord.addedNodes.length > 0) {
//DOM node added, do something
console.log("DOM node added");
}
else if (mutationRecord.removedNodes.length > 0) {
//DOM node removed, do something
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / datatables1.html
Created March 22, 2014 22:38
A working example of using datables derived from http://live.datatables.net/. I have it running on http://mashupguide.net/wwod14/datatable.html
<!DOCTYPE html>
<html>
<head>
<link href="//datatables.net/download/build/nightly/jquery.dataTables.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="//datatables.net/download/build/nightly/jquery.dataTables.js"></script>
<meta charset=utf-8 />
<title>DataTables - JS Bin</title>
</head>
@rdhyee
rdhyee / programmableweb_api.ipynb
Created April 4, 2014 22:50
a start on using Python with the programmableweb API
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / tl06001_bg.geo_30ps.json
Created April 7, 2014 17:02
Alameda County Block groups geojson (reduced to 30.8% by http://www.mapshaper.org/)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / tl06001_bg.geo_30ps.topo.json
Created April 7, 2014 17:36
simplified topjson Census block groups for Alameda County
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / tl_2010_06001_tract10_4ps.geo.json
Created April 7, 2014 23:01
Alameda County census tracts for 2010 (simplified to 4% of original file)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.