d3.unconf example gist. Fork it here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'csv' | |
require 'json' | |
if ARGV.size != 2 | |
puts 'Usage: csv_to_json input_file.csv output_file.json' | |
puts 'This script uses the first line of the csv file as the keys for the JSON properties of the objects' | |
exit(1) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP/1.1 200 OK | |
Cache-Control: max-age=25200, private | |
Content-Type: application/json; charset=utf-8 | |
Expires: Sun, 02 Jun 2013 09:28:30 GMT | |
Last-Modified: Wed, 29 May 2013 14:17:34 GMT | |
Server: Microsoft-IIS/7.5 | |
X-AspNet-Version: 4.0.30319 | |
X-Powered-By: ASP.NET | |
X-ServerName: WEB3 | |
Date: Sun, 02 Jun 2013 02:28:30 GMT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></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 { | |
background:#000; | |
color:#fff; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ip2coordinates: | |
http://www.datasciencetoolkit.org/ip2coordinates/%2267.169.73.113%22?callback=jQuery191041297997487708926_1393966710310&_=1393966710311 | |
returns: | |
jQuery191041297997487708926_1393966710310( | |
{ | |
67.169.73.113: { | |
dma_code: 807, |
d3.unconf example gist. Fork it here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
cheerio = require('cheerio'); | |
util = require('util'); | |
http = require('http'); | |
cronJob = require('cron').CronJob; | |
var data = new Array(); | |
new cronJob('*/15 * * * * *', function(){ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"title":"Collective Intelligence","links":{"http://www.amazon.com/Programming-Collective-Intelligence-Building-Applications/dp/0596529325"}}] | |
[{"tite":"Python for Data Analysis","links":{"http://www.amazon.com/books/dp/1449319793"}}] | |
[{"title":"NLTK Books","links":{"http://nltk.org/book/","http://www.amazon.com/Python-Text-Processing-NLTK-Cookbook/dp/1849513600","http://nltk.org/book/"}}] | |
[{"title":"Think Stats","links":{"http://www.greenteapress.com/thinkstats/"}}] | |
[{"title":"Data Points","links":{"http://www.amazon.com/Bandit-Algorithms-Website-Optimization-Myles/dp/1449341330/"}}] | |
[{"title":"Data Points: Visualization That Means Something","links":{"http://www.amazon.com/Data-Points-Visualization-Means-Something/dp/111846219X/"}}] | |
[{"title":"The Good Citizen: A History of American CIVIC Life","links":{"http://www.amazon.com/The-Good-Citizen-History-American/dp/1451631626/ref=sr_1_1?ie=UTF8&qid=1377021012&sr=8-1&keywords=The+Good+Citizen","http://www.pewcenter.org/batten/schudson.html"}}] | |
[{"title":"","li |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "San Mateo County Human Services Agency." | |
}, | |
{ | |
"organization": "Children and Family Services." | |
}, | |
{ | |
"address": "400 Harbor Blvd., Bldg. B" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- note: in PGAdmin you must use the tab key instead of \t | |
COPY eo_ca TO '/path/to/eo_ca.csv' CSV DELIMITER \t'; |