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
'''Tweet Streaming API consumer''' | |
import twitter | |
import csv | |
# == OAuth Authentication from your homepage on the twitter developer web site == | |
CONSUMER_KEY = "" | |
CONSUMER_SECRET = "" | |
ACCESS_TOKEN = "" | |
ACCESS_TOKEN_SECRET = "" |
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>Centred column example</title> | |
<style> | |
.container { | |
max-width:600px; | |
margin: 0 auto; | |
font-family: Helvetica; | |
line-height: 1.4em; |
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
import scraperwiki | |
import simplejson | |
import urllib2 | |
import csv | |
from lxml import etree | |
# the borough key from mapitmysociety URL for the borough page | |
TYP = 'LBW' | |
KEY = '2506' | |
# typs are: |
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
'''Tweet Streaming API consumer''' | |
import twitter | |
import csv | |
# == OAuth Authentication == | |
consumer_key="" | |
consumer_secret="" | |
access_token="" | |
access_token_secret="" |
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>Test page</title> | |
</head> | |
<body> | |
<p> | |
Use the force Luke...(or the console 'View->Developer Tools->JavaScript Console') |
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> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>C3 demo chart</title> | |
<meta name="keywords" content="adult obesity, overweight, public health"> | |
<meta name="description" content="Adult obesity has increased in the UK from 1 in 5 to 1 in 4 since 2001"> | |
<!-- Load c3.css --> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.6.9/c3.min.css" rel="stylesheet" type="text/css"> | |
<!-- Load d3.js and c3.js --> |
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 customMapType = new google.maps.StyledMapType([ | |
{ | |
stylers: [ | |
{hue: '#890000'}, | |
{visibility: 'simplified'}, | |
{gamma: 0.5}, | |
{weight: 0.5} | |
] | |
}, | |
{ |
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
import twitter | |
# http://mike.verdone.ca/twitter/ and Russel, MTSW, second edition, 2013 | |
import json, csv, time, sys | |
consumer_key="" | |
consumer_secret="" | |
access_token="" | |
access_token_secret="" |
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
import twitter, json, sys, csv | |
# == OAuth Authentication == | |
consumer_key="" | |
consumer_secret="" | |
access_token="" | |
access_token_secret="" | |
auth = twitter.oauth.OAuth(access_token, access_token_secret, consumer_key, consumer_secret) |