Skip to content

Instantly share code, notes, and snippets.

View dmasad's full-sized avatar

David Masad dmasad

View GitHub Profile
@dmasad
dmasad / Aleppo_points.R
Created August 12, 2013 17:20
GDELT geocoded points for violent events in Aleppo, 2011-2013.
library(ggmap)
# Load data:
Aleppo_points <- read.delim("Aleppo_points.csv")
Aleppo_points$LogCount = log(Aleppo_points$Count)
# Load map:
aleppo.map <- get_map(location="aleppo", zoom=12, source="google", maptype="terrain", color="bw")
aleppo.map <- ggmap(aleppo.map)
@dmasad
dmasad / DeviantArt.py
Created February 3, 2011 04:09
DeviantArt Scraper v0.1
# DeviantArt Friend Scraper
# Uses BeautifulSoup to scrape Friends pages recursively and writes edges to a CSV file.
from urllib2 import urlopen, URLError
from BeautifulSoup import BeautifulSoup
import csv
def get_friends(username):
#Return a list of the named user's friends.
friends_list = [] #The list of the friends.