Skip to content

Instantly share code, notes, and snippets.

View GeorgeMcIntire's full-sized avatar

George McIntire GeorgeMcIntire

View GitHub Profile
@GeorgeMcIntire
GeorgeMcIntire / .block
Created October 4, 2018 21:34
Stacked Bar Chart w/ CSV- V4- Fully Commented
license: mit
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#Imports and setting up access to Twitter Api
import json
import pandas as pd
import tweepy
from tweepy import Stream, OAuthHandler
from tweepy.streaming import StreamListener
consumer_key = "consumer_key"
consumer_secret = "consumer_secret"
access_token = "access_token"
access_secret = "access_token_secret"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import re
import pandas as pd
import requests
# change this to your pandora screen name!
screen_name = 'sinan.u.ozdemir'
#####
set_list = set()
stations = requests.get('http://pandorasongs.oliverzheng.com/username/'+screen_name).json()
@GeorgeMcIntire
GeorgeMcIntire / guardian-articles-day-api.md
Created March 8, 2016 00:54 — forked from dannguyen/guardian-articles-day-api.md
How to use The Guardian's API to download article data for content analysis (in Python 3.x)

How to use The Guardian's API to download article data for content analysis (in Python 3.x)

The Guardian offers an API as deep and robust as the New York Times Article API when it comes to content analysis.

The Guardian's API offers more than "1.7 million pieces of content", with published items as far back as 1999. You can register as a developer here, which gets you 5,000 API hits a day and an API key that looks something like this:

zzzyyyyy-9a9z-999z-z999-9e8a83922516

The Guardian has a handy interactive explorer to interactively tweak the query parameters.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.