This file contains 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
## Top incomes data by Piketty and Saez, Sep 2013 update. | |
## 2014-10-16 | |
## source | |
# T. Piketty and E. Saez, "Income Inequality in the United States, 1913-1998" | |
# Quarterly Journal of Economics, 118(1), 2003, 1-39 [ fig. 1, enhanced ] | |
## packages |
This file contains 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
NA. | P90.100 | P95.100 | P99.100 | P99.5.100 | P99.9.100 | P99.99.100 | |
---|---|---|---|---|---|---|---|
1913 | NA | NA | 17.9600418618677 | 14.7264569314871 | 8.61660817145581 | 2.75501620545077 | |
1914 | NA | NA | 18.1579410592163 | 15.0802622430197 | 8.60334089140613 | 2.72920847365446 | |
1915 | NA | NA | 17.577725 | 14.57755 | 9.21885 | 4.36035 | |
1916 | NA | NA | 18.5730667754062 | 15.6036449461324 | 9.86653043001581 | 4.40493410443468 | |
1917 | 40.2870418752226 | 30.3345483573205 | 17.5994874581952 | 14.2341917768497 | 8.35788084805983 | 3.33076913805183 | |
1918 | 39.9037275120226 | 29.2979482993876 | 15.8832204355484 | 12.3854950735275 | 6.74116426024008 | 2.44816293043196 | |
1919 | 39.4813240153393 | 29.307649555521 | 15.8674148545227 | 12.2339651877482 | 6.45397884830736 | 2.22020659211262 | |
1920 | 38.1003874377692 | 27.4694503319667 | 14.4590420554394 | 10.9532629518181 | 5.37143303444607 | 1.67163862642264 | |
1921 | 42.8597266399737 | 30.457060858318 | 15.4729299864716 | 11.5988330223682 | 5.60216500839064 | 1.68921038823408 |
This file contains 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
library(XML) | |
library(stringr) | |
# demo page | |
h = htmlParse("http://www2.assemblee-nationale.fr/scrutins/detail/(legislature)/14/(num)/947") | |
g = c("SRC", "UMP", "UDI", "ECOLO", "RAD", "GDR") | |
k = c("socialiste", "mouvement populaire", "démocrates", "écologiste", "radical", "gauche") | |
for(i in k) { |
This file contains 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
## IDA Exercise 5 | |
## -------------- | |
# This exercise replicates PCA plots using World Values Survey data on | |
# aggregate confidence in public institutions. | |
# The data is taken from the Quality of Government dataset. The functions | |
# contain a mix of base functions and custom packages. |
This file contains 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> | |
This file contains 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
m = sum(n %e% "raw") / network.dyadcount(n) | |
init.sum = log(m) | |
npar = length(summary(f, response = "raw")) | |
M = ergm(f, response = "raw", | |
reference = ~Poisson, | |
control = control.ergm(seed = 9042, | |
parallel = parallel::detectCores(), | |
# |
Replication archive for François Briatte, "Les réseaux de cosignatures législatives de quinze parlements européens", 2015.
Get the paper and its appendix at http://f.briatte.org/research/ferney-paper.pdf.
The data.csv
file contains information on the networks produced by the parlnet
repository available at https://github.com/briatte/parlnet.
Observations are cosponsorship networks from 19 parliamentary chambers in 15 countries over 96 legislatures. Variables are:
This file contains 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
# | |
# download 338 Charlie Hebdo covers with keywords | |
# | |
library(dplyr) | |
library(XML) | |
library(lubridate) | |
library(stringr) | |
library(ggplot2) |
This file contains 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
data = "revues-soc.csv" | |
if(!file.exists(data)) { | |
dir.create("rev", showWarnings = FALSE) | |
dir.create("num", showWarnings = FALSE) | |
r = "http://www.cairn.info/" | |
download.file(paste0(r, "discipline.php?POS=11&TITRE=ALL"), |