| get_company | R Documentation |
Downloads company-level static data from Compustat including header SIC codes, NAICS codes, state of incorporation, and other identifying information.
get_company(
wrds,
region = c("na", "global"),
columns = NULL,
n = Inf,
lazy = FALSE
)
wrds |
A |
region |
One of |
columns |
Character vector of columns to return. Defaults to key identifiers and classification codes. |
n |
Maximum number of rows to return. Defaults to |
lazy |
If |
The sic column contains the "header" SIC code, which is the company's
most recent SIC classification stored as a character. For historical SIC
codes that change over time, use get_compustat() with fill_sic = TRUE,
which coalesces the historical sich (integer) with the header sic.
A tibble with company header data. Default columns vary by region:
North America (from comp.company):
gvkey, conm: Identifiers
sic, naics: Industry classifications (character)
state, fic, loc: Geographic information
Global (from comp.g_company):
gvkey, conm: Identifiers
sic, naics: Industry classifications
fic, loc: Geographic information
get_compustat() for fundamentals data with optional SIC filling
## Not run:
wrds <- wrds_connect()
# Get company header data
company <- get_company(wrds)
# Get global companies
g_company <- get_company(wrds, region = "global")
# Lazy query
get_company(wrds, lazy = TRUE) |>
dplyr::filter(sic == "7370") |>
dplyr::collect()
wrds_disconnect(wrds)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.