Skip to content

Commit

Permalink
Merge pull request #344 from vincentarelbundock/update-cow-scraper
Browse files Browse the repository at this point in the history
update COW scraper
  • Loading branch information
cjyetman authored Sep 27, 2024
2 parents 5101980 + 6bbc262 commit 7115c1d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dictionary/get_cow.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ get_file <- function(web) {
return(out)
}

codes <- get_file('http://www.correlatesofwar.org/data-sets/cow-country-codes/cow-country-codes')
panel <- get_file('http://www.correlatesofwar.org/data-sets/state-system-membership/system2016')
codes <- get_file('https://correlatesofwar.org/wp-content/uploads/COW-country-codes.csv')
panel <- get_file('https://correlatesofwar.org/wp-content/uploads/system2016.csv')

out <- full_join(codes, panel, by = c('ccode', 'stateabb')) %>%
out <- full_join(codes, panel, by = c('ccode', 'stateabb'), relationship = "many-to-many") %>%
mutate(country = statenme) %>%
select(country, cowc = stateabb, cown = ccode, cow.name = statenme, year) %>%
# overlapping years; pick one arbitrarily
Expand Down

0 comments on commit 7115c1d

Please sign in to comment.