Parse ATOM FPDS urls

parse_fpds_atom_urls(
  urls = NULL,
  use_future = F,
  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
)

Arguments

urls

vector of fpds URLS

clean_entity_column

if TRUE cleans entity columns

unformat

if TRUE unformats formattable columns

keep_key_columns

if TRUE returns only key columns

show_progress
return_message

if TRUE return a message

Value

tibble

Examples

# 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))