finreportr
finreportr: Financial Data from U.S. Securities and Exchange Commission - Published in JOSS (2016)
Science Score: 93.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 5 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Repository
R package - Financial Data from U.S. Securities and Exchange Commission
Basic Info
Statistics
- Stars: 133
- Watchers: 18
- Forks: 48
- Open Issues: 15
- Releases: 1
Topics
Metadata Files
README.md
finreportr - Financial Data from U.S. Securities and Exchange Commission
- Author/Maintainer: Seward Lee
- License: MIT
Introduction
A financial analyst's time is valuable – it shouldn't be wasted performing manual data entry. finreportr is a web scraper written in R that allows analysts to query data from the U.S. Securities and Exchange Commission directly from the R console. It aims to eliminate time wasters from a financial analyst's workflow, such as navigating the SEC EDGAR database, flipping through financial reports, and parsing XBRL-encoded data.
finreportr allows you to fetch data from the SEC and load it into your workspace using the following commands:
* CompanyInfo(): returns basic information about a company
* AnnualReports(): returns a listing of annual reports filed by a company
* GetIncome(): returns the income statement for a given company
* GetBalanceSheet(): returns the balance sheet for a given company
* GetCashFlow(): returns the cash flow statement for a given company
To install CRAN release version of finreportr:
install.packages("finreportr")
To install bleeding-edge version from GitHub:
devtools::install_github("sewardlee337/finreportr")
CompanyInfo()
CompanyInfo() returns the following information about a given company based on its stock ticker symbol:
* Company Name
* Central Index Key ("CIK")
* Standard Industrial Classification ("SIC")
* State Location
* State of Incorporation
* Fiscal Year End (ddmm)
* Street Address
* City, State, ZIP
Arguments:
CompanyInfo(symbol)
where
symbolis a character string that represents the relevant stock ticker symbol.
Examples:
```
CompanyInfo("GOOG")
company CIK SIC state state.inc FY.end street.address city.state
1 GOOGLE INC. 0001288776 7370 CA DE 1231 1600 AMPHITHEATRE PARKWAY MOUNTAIN VIEW CA 94043
CompanyInfo("FB")
company CIK SIC state state.inc FY.end street.address city.state
1 Facebook Inc 0001326801 7370 CA DE 1231 1601 WILLOW ROAD MENLO PARK CA 94025 ```
AnnualReports()
AnnualReports() returns a dataframe that summarizes a given company's annual reports based on its stock ticker symbol. Information returned include:
* Filing Name
* Filing Date
* Accession Number
AnnualReports() will return data relating to a company's Form 10-Ks if the company is domestic, and Form 20-Fs if the company is foreign.
Arguments:
AnnualReports(symbol, foreign = FALSE)
where
symbolis a character string that represents the relevant stock ticker symbol.foreignis a logical indicating whether the company in question is domestic or foreign.foreignis set toFALSEby default.
Examples:
```
AnnualReports("GOOG")
filing.name filing.date accession.no 1 10-K 2015-02-09 0001288776-15-000008 2 10-K 2014-02-12 0001288776-14-000020 3 10-K 2013-01-29 0001193125-13-028362 4 10-K/A 2012-04-23 0001193125-12-174477 5 10-K 2012-01-26 0001193125-12-025336 6 10-K 2011-02-11 0001193125-11-032930 7 10-K 2010-02-12 0001193125-10-030774 8 10-K 2009-02-13 0001193125-09-029448 9 10-K 2008-02-15 0001193125-08-032690 10 10-K 2007-03-01 0001193125-07-044494 11 10-K 2006-03-16 0001193125-06-056598 12 10-K 2005-03-30 0001193125-05-065298
AnnualReports("HTHIY", foreign = TRUE)
filing.name filing.date accession.no 1 20-F/A 2011-07-21 0001193125-11-192990 2 20-F 2011-06-24 0001193125-11-172867 3 20-F/A 2010-07-29 0001193125-10-169851 4 20-F 2010-06-29 0001193125-10-149406 5 20-F 2009-07-27 0001193125-09-155317 6 20-F 2008-06-20 0001193125-08-137042 7 20-F/A 2008-04-28 0001193125-08-091853 8 20-F/A 2007-11-30 0001193125-07-256746 9 20-F 2007-06-26 0001193125-07-142357 10 20-F 2006-08-07 0001193125-06-163031 11 20-F 2005-08-26 0001193125-05-174960 12 20-F 2004-08-20 0001193125-04-144223 13 20-F 2003-09-30 0001193125-03-056135 14 20-F 2002-09-26 0001145549-02-000252 ```
GetIncome()
GetIncome() returns a company's income statement from the annual report of a given filing year as a dataframe. This functionality is only available for queries of income statements that belong to domestic companies. Note that all data returned by this function comes from the company's 10-K, not 10-K/A.
Arguments:
GetIncome(symbol, year)
where
symbolis a character string that represents the relevant stock ticker symbol.yearis the year during which the annual report was filed. (Note: This is not necessarily identical to the fiscal year for which the annual report was filed)
Example:
```
Fetch first 20 lines of Google's income statement in the Form 10-K published in 2016.
head(GetIncome("GOOG", 2016), 20)
Metric Units Amount startDate endDate
1 Revenues usd 55519000000 2013-01-01 2013-12-31 2 Revenues usd 66001000000 2014-01-01 2014-12-31 3 Revenues usd 74989000000 2015-01-01 2015-12-31 4 Cost of Revenue usd 21993000000 2013-01-01 2013-12-31 5 Cost of Revenue usd 25691000000 2014-01-01 2014-12-31 6 Cost of Revenue usd 28164000000 2015-01-01 2015-12-31 7 Research and Development Expense usd 7137000000 2013-01-01 2013-12-31 8 Research and Development Expense usd 9832000000 2014-01-01 2014-12-31 9 Research and Development Expense usd 12282000000 2015-01-01 2015-12-31 10 Selling and Marketing Expense usd 6554000000 2013-01-01 2013-12-31 11 Selling and Marketing Expense usd 8131000000 2014-01-01 2014-12-31 12 Selling and Marketing Expense usd 9047000000 2015-01-01 2015-12-31 13 General and Administrative Expense usd 4432000000 2013-01-01 2013-12-31 14 General and Administrative Expense usd 5851000000 2014-01-01 2014-12-31 15 General and Administrative Expense usd 6136000000 2015-01-01 2015-12-31 16 Costs and Expenses usd 40116000000 2013-01-01 2013-12-31 17 Costs and Expenses usd 49505000000 2014-01-01 2014-12-31 18 Costs and Expenses usd 55629000000 2015-01-01 2015-12-31 19 Operating Income (Loss) usd 15403000000 2013-01-01 2013-12-31 20 Operating Income (Loss) usd 16496000000 2014-01-01 2014-12-31 ```
GetBalanceSheet()
GetBalanceSheet() returns a company's balance sheet from the annual report of a given filing year as a dataframe. This functionality is only available for queries of balance sheets that belong to domestic companies. Note that all data returned by this function comes from the company's 10-K, not 10-K/A.
Arguments:
GetBalanceSheet(symbol, year)
where
symbolis a character string that represents the relevant stock ticker symbol.yearis the year during which the annual report was filed. (Note: This is not necessarily identical to the fiscal year for which the annual report was filed)
Example:
```
Fetch first 20 lines of Google's balance sheet in the Form 10-K published in 2016.
head(GetBalanceSheet("GOOG", 2016), 20)
Metric Units Amount startDate endDate
1 Cash and Cash Equivalents, at Carrying Value usd 14778000000
GetCashFlow()
GetCashFlow() returns a company's statement of cash flow from the annual report of a given filing year as a dataframe. This functionality is only available for queries of cash flow statements that belong to domestic companies. Note that all data returned by this function comes from the company's 10-K, not 10-K/A.
Arguments:
GetCashFlow(symbol, year)
where
symbolis a character string that represents the relevant stock ticker symbol.yearis the year during which the annual report was filed. (Note: This is not necessarily identical to the fiscal year for which the annual report was filed)
Example:
```
Fetch first 20 lines of Google's cash flow statement in the Form 10-K published in 2016.
head(GetCashFlow("GOOG", 2016), 20)
Metric Units Amount startDate endDate
1 Net Income (Loss) Attributable to Parent usd 12733000000 2013-01-01 2013-12-31 2 Net Income (Loss) Attributable to Parent usd 14136000000 2014-01-01 2014-12-31 3 Net Income (Loss) Attributable to Parent usd 16348000000 2015-01-01 2015-12-31 4 Depreciation and Impairment on Disposition of Property and Equipment usd 2781000000 2013-01-01 2013-12-31 5 Depreciation and Impairment on Disposition of Property and Equipment usd 3523000000 2014-01-01 2014-12-31 6 Depreciation and Impairment on Disposition of Property and Equipment usd 4132000000 2015-01-01 2015-12-31 7 Amortization and Impairment of Intangible and Other Assets usd 1158000000 2013-01-01 2013-12-31 8 Amortization and Impairment of Intangible and Other Assets usd 1456000000 2014-01-01 2014-12-31 9 Amortization and Impairment of Intangible and Other Assets usd 931000000 2015-01-01 2015-12-31 10 Share-based Compensation usd 3343000000 2013-01-01 2013-12-31 11 Share-based Compensation usd 4279000000 2014-01-01 2014-12-31 12 Share-based Compensation usd 5203000000 2015-01-01 2015-12-31 13 Excess Tax Benefit from Share-based Compensation, Operating Activities usd 481000000 2013-01-01 2013-12-31 14 Excess Tax Benefit from Share-based Compensation, Operating Activities usd 648000000 2014-01-01 2014-12-31 15 Excess Tax Benefit from Share-based Compensation, Operating Activities usd 548000000 2015-01-01 2015-12-31 16 Deferred Income Taxes and Tax Credits usd -437000000 2013-01-01 2013-12-31 17 Deferred Income Taxes and Tax Credits usd -104000000 2014-01-01 2014-12-31 18 Deferred Income Taxes and Tax Credits usd -179000000 2015-01-01 2015-12-31 19 Gain (Loss) on Sale of Business, Including Discontinued Operations usd 700000000 2013-01-01 2013-12-31 20 Gain (Loss) on Sale of Business, Including Discontinued Operations usd 740000000 2014-01-01 2014-12-31 ```
Bug Reports and Feedback
Please use the GitHub issue tracker for bug reports, feature request, or general discussions.
Owner
- Name: Seward Lee
- Login: sewardlee337
- Kind: user
- Location: San Francisco Bay Area
- Website: https://sewardlee.com
- Repositories: 2
- Profile: https://github.com/sewardlee337
Data scientist and open source enthusiast.
JOSS Publication
finreportr: Financial Data from U.S. Securities and Exchange Commission
Tags
finance accountingGitHub Events
Total
- Issues event: 1
- Watch event: 6
- Issue comment event: 1
- Fork event: 1
Last Year
- Issues event: 1
- Watch event: 6
- Issue comment event: 1
- Fork event: 1
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| sewardlee337 | s****7@g****m | 68 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 20
- Total pull requests: 3
- Average time to close issues: about 2 months
- Average time to close pull requests: less than a minute
- Total issue authors: 18
- Total pull request authors: 1
- Average comments per issue: 4.6
- Average comments per pull request: 1.67
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- vsoler (2)
- joeymizrahi (2)
- pacov (1)
- wwni60 (1)
- andresmorago (1)
- jibanes (1)
- dmaupin12 (1)
- msmith01 (1)
- Mossharbor (1)
- robdoumar (1)
- ChiTownTimmy23 (1)
- georgeaj (1)
- brettboles (1)
- jsta (1)
- rrik (1)
Pull Request Authors
- ZeccaLehn (3)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 401 last-month
- Total docker downloads: 43,390
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 5
- Total maintainers: 1
cran.r-project.org: finreportr
Financial Data from U.S. Securities and Exchange Commission
- Homepage: https://github.com/sewardlee337/finreportr
- Documentation: http://cran.r-project.org/web/packages/finreportr/finreportr.pdf
- License: MIT + file LICENSE
- Status: removed
-
Latest release: 1.0.4
published about 4 years ago
Rankings
Maintainers (1)
Dependencies
- R >= 2.10 depends
- XBRL * imports
- curl * imports
- dplyr * imports
- httr * imports
- rvest * imports
- xml2 * imports
- knitr * suggests
- rmarkdown * suggests
- testthat * suggests
