| ̄ ̄ ̄ ̄ ̄  ̄| | DEATH | | IS | | INEVITABLE | | _______| (__/) || (•ㅅ•) || / づ
(・_・)っ
date,datatype,station,value,fl_m,fl_q,fl_so,fl_t | |
1950-01-01T00:00:00,TMAX,GHCND:USC00381770,117,,,0,0800 | |
1950-01-02T00:00:00,TMAX,GHCND:USC00381770,183,,,0,0800 | |
1950-01-03T00:00:00,TMAX,GHCND:USC00381770,194,,,0,0800 | |
1950-01-04T00:00:00,TMAX,GHCND:USC00381770,189,,,0,0800 | |
1950-01-05T00:00:00,TMAX,GHCND:USC00381770,217,,,0,0800 | |
1950-01-06T00:00:00,TMAX,GHCND:USC00381770,217,,,0,0800 | |
1950-01-07T00:00:00,TMAX,GHCND:USC00381770,183,,,0,0800 | |
1950-01-08T00:00:00,TMAX,GHCND:USC00381770,128,,,0,0800 | |
1950-01-09T00:00:00,TMAX,GHCND:USC00381770,133,,,0,0800 |
War | Date | Casualties | Support | |
---|---|---|---|---|
WWII | 1941-12-07 | 2400 | 86 | |
WWII | 1942-02-01 | 16247 | 87 | |
WWII | 1943-02-01 | 17899 | 92 | |
WWII | 1943-09-04 | 24127 | 89 | |
WWII | 1944-02-02 | 30736 | 77 | |
WWII | 1946-04-10 | 217000 | 77 | |
WWII | 1943-03-01 | 20737 | 85.5 | |
WWII | 1944-05-07 | 36274 | 81 | |
WWII | 1944-08-30 | 67806 | 82 |
library(rvest) | |
library(lubridate) | |
library(tidyverse) | |
Truman <- read_html("http://www.presidency.ucsb.edu/data/popularity.php?pres=33") | |
Truman %>% | |
html_table(fill=T) -> Truman | |
Truman[[11]] -> Truman |
library(tidyverse) | |
library(stevemisc) | |
# Load data | |
Non <- read_csv("~/Dropbox/data/cow/wars/Non-StateWarData_v4.0.csv") | |
Intra <- read_csv("~/Dropbox/data/cow/wars/Intra-StateWarData_v4.1.csv") | |
Inter <- read_csv("~/Dropbox/data/cow/wars/Inter-StateWarData_v4.0.csv") | |
Extra <- read_csv("~/Dropbox/data/cow/wars/Extra-StateWarData_v4.0.csv") |
| ̄ ̄ ̄ ̄ ̄  ̄| | DEATH | | IS | | INEVITABLE | | _______| (__/) || (•ㅅ•) || / づ
(・_・)っ
library(tidyverse) | |
library(lubridate) # just in case I need to manipulate a date | |
library(stringr) # just in case I need to manipulated a string | |
library(stevemisc) # for my personal theme | |
library(scales) # just in case I need to fudge a y-axis to be a scale | |
library(knitr) # just in case I need a markdown table | |
# I'm going to assume you have Fariss' data downloaded somewhere. Here's what mine looks like. | |
LHR <- read_csv("~/Dropbox/data/latent-human-rights/HumanRightsProtectionScores_v2.04.csv") |
library(rnoaa) | |
library(tidyverse) | |
library(stringr) | |
library(weathermetrics) | |
my_token <- "get your own here..." | |
theme_steve <- function() { | |
theme_bw() + | |
theme(panel.border = element_blank(), |
# You won't need all of these packages. I just copied it from another,related analysis: | |
# https://github.com/svmiller/etjc | |
library(car) | |
library(arm) | |
library(countrycode) | |
library(data.table) | |
library(tidyverse) | |
library(sqldf) | |
# library(pdftools) |
library(RCurl) | |
library(tidyverse) | |
library(maps) | |
# library(fiftystater) | |
theme_steve <- function() { | |
theme_bw() + | |
theme(panel.border = element_blank(), | |
plot.caption=element_text(hjust=1, size=9, | |
margin=margin(t=10), |
setwd("~/Dropbox/projects/blog-posts/nato-spending") | |
library(WDI) | |
library(countrycode) | |
library(tidyverse) | |
Milit <- WDI(country="all", indicator=c("MS.MIL.XPND.GD.ZS", "MS.MIL.XPND.ZS","MS.MIL.TOTL.P1", "SP.POP.TOTL"), | |
start=1988, end=2015) %>% | |
rename(milex = MS.MIL.XPND.GD.ZS, milgovexp = MS.MIL.XPND.ZS, | |
milper = MS.MIL.TOTL.P1, tpop = SP.POP.TOTL) %>% tbl_df() %>% |