Description Usage Arguments Value Examples
Parse ATOM FPDS urls
1 2 3 4 5 6 7 8 9 10 11 12 | parse_fpds_atom_urls(
urls = NULL,
use_future = T,
clean_entity_column = F,
unformat = T,
keep_key_columns = F,
exclude_bloat = T,
clean_address = T,
snake_names = F,
show_progress = T,
return_message = T
)
|
urls |
vector of fpds URLS |
clean_entity_column |
if |
unformat |
if |
keep_key_columns |
if |
show_progress |
|
return_message |
if |
tibble
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | library(govtrackR)
library(tidyverse)
library(future)
library(asbviz)
c(
"https://www.fpds.gov/ezsearch/FEEDS/ATOM?FEEDNAME=PUBLIC&q=GLOBAL_VENDOR_NAME:PALANTIR%20TECHNOLOGIES%20SIGNED_DATE:[2019/01/01,2019/04/08]&sortBy=SIGNED_DATE&desc=Y&start=0&sortBy=SIGNED_DATE",
"https://www.fpds.gov/ezsearch/FEEDS/ATOM?FEEDNAME=PUBLIC&q=GLOBAL_VENDOR_NAME:PALANTIR%20TECHNOLOGIES%20SIGNED_DATE:[2019/01/01,2019/04/08]&sortBy=SIGNED_DATE&desc=Y&start=10&sortBy=SIGNED_DATE"
) -> urls
parse_fpds_atom_urls(
urls,
use_future = T
)
parse_fpds_atom_urls(
c(
"https://www.fpds.gov/ezsearch/FEEDS/ATOM?FEEDNAME=PUBLIC&q=GLOBAL_VENDOR_NAME:PALANTIR%20TECHNOLOGIES%20SIGNED_DATE:[2019/01/01,2019/04/08]&sortBy=SIGNED_DATE&desc=Y&start=0&sortBy=SIGNED_DATE",
"https://www.fpds.gov/ezsearch/FEEDS/ATOM?FEEDNAME=PUBLIC&q=GLOBAL_VENDOR_NAME:PALANTIR%20TECHNOLOGIES%20SIGNED_DATE:[2019/01/01,2019/04/08]&sortBy=SIGNED_DATE&desc=Y&start=10&sortBy=SIGNED_DATE"
),
use_future = F,
return_message = T
)
tictoc::tic()
plan(multisession, gc = T)
df_ccp_viris <-
fpds_atom(national_interest_code = "P20C") %>%
pull(urlFPDSAtom) %>%
parse_fpds_atom_urls(use_future = T,
return_message = T)
tictoc::toc()
df_ccp_viris %>%
group_by(codeNationalInterestAction) %>%
summarise(amount = sum(amountObligation)) %>%
munge_data(snake_names = T)
df_by_day <- df_ccp_viris %>%
group_by(dateObligation) %>%
summarise(amount = sum(amountObligation)) %>%
ungroup() %>%
mutate(amount_cumulative = cumsum(amount)) %>%
munge_data(snake_names = T)
df_ccp_viris %>% save(file = "Desktop/ccp_virus.rda")
df_by_day %>%
hc_xy(
x = "date_obligation",
y = "amount_cumulative",
type = "area",
opacity = .5
)
df_ccp_viris %>%
select(descriptionObligation, amountObligation) %>%
sheldon::tbl_unnest_tokens(text_column = "descriptionObligation") %>%
group_by(word) %>%
summarise(count = n(), amount = sum(amountObligation)) %>%
hc_xy(
x = "count",
y = "amount",
name = "word",
point_size = .5,
point_width = .5,
transformations = c("log_x", "log_y"),
label_parameters = list(
enabled = T,
useHTML = T,
format = "{point.name}"
),
)
df_ccp_viris %>%
group_by(nameVendor, nameVendorLegal, nameVendorParent) %>%
summarise(amount = sum(amountBaseAllOption),
count = n(),
departments = n_distinct(idDepartmentAward)) %>%
ungroup() %>%
munge_data() %>%
filter(is.na(nameVendor))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.