(batch-extract! filing-seq
output-dir
&
{:keys [items remove-tables? skip-existing?]
:or {remove-tables? false skip-existing? true}})Extract item sections from a seq of filings and write {accession-no}.edn to output-dir. Options: :items - set of item ids to extract (default: all) :remove-tables? - strip numeric tables (default: false) :skip-existing? - skip if output file already exists (default: true)
Extract item sections from a seq of filings and write {accession-no}.edn to output-dir.
Options:
:items - set of item ids to extract (default: all)
:remove-tables? - strip numeric tables (default: false)
:skip-existing? - skip if output file already exists (default: true)(extract-item filing item-id)Extract a single item section from a filing. Returns {:title "..." :text "..." :method ...} or nil.
Extract a single item section from a filing.
Returns {:title "..." :text "..." :method ...} or nil.(extract-items filing
&
{:keys [items remove-tables?] :or {remove-tables? false}})Extract item sections from a filing. Returns a map of item-id -> {:title "..." :text "..." :method ...}.
filing : filing metadata map (from edgar.filings/get-filings) Options: :items - set of item ids to extract e.g. #{"7" "1A"} (default: all) :remove-tables? - strip <table> elements before text extraction (default: false)
10-Q item ids carry their part: "I-1" ... "I-4", "II-1" ... "II-6" ("I-2" is MD&A, "II-1A" Risk Factors). User-supplied ids are normalized, so "i 2" and "ii-1a" work too.
Example: (extract-items f :items #{"7" "1A"} :remove-tables? true) ;=> {"7" {:title "Management's Discussion..." :text "...20k chars..." ; :method :html-heading-boundaries} ; "1A" {:title "Risk Factors" :text "..." :method :html-heading-boundaries}}
Extract item sections from a filing.
Returns a map of item-id -> {:title "..." :text "..." :method ...}.
filing : filing metadata map (from edgar.filings/get-filings)
Options:
:items - set of item ids to extract e.g. #{"7" "1A"} (default: all)
:remove-tables? - strip <table> elements before text extraction (default: false)
10-Q item ids carry their part: "I-1" ... "I-4", "II-1" ... "II-6"
("I-2" is MD&A, "II-1A" Risk Factors). User-supplied ids are
normalized, so "i 2" and "ii-1a" work too.
Example:
(extract-items f :items #{"7" "1A"} :remove-tables? true)
;=> {"7" {:title "Management's Discussion..." :text "...20k chars..."
; :method :html-heading-boundaries}
; "1A" {:title "Risk Factors" :text "..." :method :html-heading-boundaries}}Matches an item heading at the start of a text. Group 1 is the item id ("1", "1C", "9A", "5.07", "II-1A"), group 2 the title. A letter suffix is only taken when it is not followed by a lower-case letter, so "Item 1Business" (adjacent spans) reads as item 1, not 1B.
Matches an item heading at the start of a text. Group 1 is the item id
("1", "1C", "9A", "5.07", "II-1A"), group 2 the title. A letter
suffix is only taken when it is not followed by a lower-case letter, so
"Item 1Business" (adjacent spans) reads as item 1, not 1B.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |