actor_fetcher: change in code to keep original actorid lists in output

query_gen_actors: added code for junior ministers in BE and NL
master
Erik de Vries 5 years ago
parent bf3d11ffe0
commit 853c117daf

@ -100,7 +100,7 @@ actor_fetcher <- function(out, sent_dict = NULL, cores = 1, localhost = NULL, va
out_row <- select(out_row, -`_source.ud`) %>% out_row <- select(out_row, -`_source.ud`) %>%
unnest(`_source.computerCodes.actorsDetail`, .preserve = colnames(.)) %>% unnest(`_source.computerCodes.actorsDetail`, .preserve = colnames(.)) %>%
unnest(ids, .preserve = colnames(.)) %>% unnest(ids, .preserve = colnames(.)) %>%
select(-ids) %>% rename(ids_list = ids) %>%
rename(ids = ids1) %>% rename(ids = ids1) %>%
mutate( mutate(
pids = str_sub(ids, start = 1, end = -3) pids = str_sub(ids, start = 1, end = -3)

@ -114,6 +114,10 @@ query_gen_actors <- function(actor, country, pre_tags, post_tags) {
"Premier", "Premier",
"premier") "premier")
} }
if(actor$`_source.function` == "JunMin") {
minister <- c("Staatssecretaris",
"staatssecretaris")
}
} }
grid <- crossing(first = last_list, last = minister, prox = 5) grid <- crossing(first = last_list, last = minister, prox = 5)
ministername <- lapply(1:nrow(grid), prox_gen, grid = grid) ministername <- lapply(1:nrow(grid), prox_gen, grid = grid)

Loading…
Cancel
Save