Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accession number missing from company_filings #15

Open
Sbirch556 opened this issue Jul 7, 2020 · 1 comment
Open

accession number missing from company_filings #15

Sbirch556 opened this issue Jul 7, 2020 · 1 comment

Comments

@Sbirch556
Copy link

I noticed the company search page was down Friday night 7/3/2020. Appears and update has been done to the RSS feeds.

aapl <- company_filings(
  x = "AAPL"
)

Returning the attached screenshot for me.

webedgarR_git

@Sbirch556
Copy link
Author

Looks like they finally updated accession nunber to accession number. Small update to the company filings function is able to fix this issue.

company_filings <- function(x,
                         ownership = FALSE,
                         type = "",
                         before="",
                         count = 40,
                         page = 1) {
  doc <- if (is(x, "xml_node")) {
           x
         } else {
           browse_edgar(x,
                        ownership = ownership,
                        type = type,
                        before = before,
                        count = count,
                        page = page)
         }

  entries_xpath <- "entry"

  info_pieces <- list(
    "accession_number" = "./content/accession-number", # update made, nunber -> number
                                                       # number was previously misspelled until 7/3/2020
    "act" = "./content/act",
    "file_number" = "./content/file-number",
    "filing_date" = "./content/filing-date",
    "accepted_date" = "./updated",           # By inspection, updated = accepted
    "href" = "./content/filing-href",
    "type" = "./content/filing-type",
    "film_number" = "./content/film-number",
    "form_name" = "./content/form-name",
    "description" = "./content/items-desc",
    "size" = "./content/size"
    )

  res <- map_xml(doc, entries_xpath, info_pieces)

  return(res)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant