Skip to content

Instantly share code, notes, and snippets.

@pablobarbera
pablobarbera / plotHashtag2.R
Created May 25, 2012 22:08 — forked from mjbommar/plotHashtag2.R
Plot a time series of a hashtag where height is tweet count and color is unique user count.
# @author: Bommarito Consulting, LLC; http://michaelbommarito.com/
# @date: May 21, 2012
# @email: michael@bommaritollc.com
# @packages: ggplot2, plyr
# Clear and import.
rm(list=ls())
library(ggplot2)
library(plyr)
@pablobarbera
pablobarbera / gist:1304808
Created October 21, 2011 20:03
Simulación Congreso de 300 escaños (gráfico)
## R-file: simulacion de distribucion de diputados en funcion del tamano
## del Congreso de Diputados
## Autor: Pablo Barbera (NYU)
library(ggplot2)
theme_L_border <- function(colour = "black", size = 1, linetype = 1) {
# From Rudolf Cardinal, March 2011, http://www.psychol.cam.ac.uk/statistics/R/
# use with e.g.: ggplot(...) + opts( panel.border=theme_L_border() ) + ...
structure(
@pablobarbera
pablobarbera / gist:1304807
Created October 21, 2011 20:03
Simulación Congreso de 300 escaños
*******************************************************************
** DO-FILE: simulacion de resultados elecciones 2008
** cambiando el numero de diputados
** Autor: Pablo Barbera
*******************************************************************
clear all
set more off
set mem 300m