devtools::load_all(".")
library(tidyverse)
library(asbmisc)
library(rvest)
setwd("~")
df_awards <-
"Desktop/r_packages/govtrackRdata/data/sibr_awards.rda" %>%
read_rda_file()
library(furrr)
library(future)
setwd("Desktop/data/sbir/awards/")
.parse_sbir_award_url_safe <- possibly(.parse_sbir_award_url, tibble())
# plan(multicore)
complete <-
list.files() %>% str_remove_all(".rda") %>% as.integer()
sbirs <-
df_awards %>%
filter(!idSBIR %in% complete) %>%
pull(idSBIR)
sbirs %>%
future_walk(function(sbir) {
url <-
glue::glue("https://www.sbir.gov/sbirsearch/detail/{sbir}") %>% as.character()
file <- glue::glue("{sbir}.rda")
data <-
.parse_sbir_award_url_safe(url = url, return_message = F)
if (nrow(data) == 0) {
return(invisible())
}
data %>% save(file = file)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.