MyNixOS website logo
Description

Tidy Fundamental Financial Data from 'SEC's 'EDGAR' 'API'.

Streamline the process of accessing fundamental financial data from the United States Securities and Exchange Commission's ('SEC') Electronic Data Gathering, Analysis, and Retrieval system ('EDGAR') 'API' <https://www.sec.gov/edgar/sec-api-documentation>, transforming it into a tidy, analysis-ready format.

tidyedgar: Streamlined Access to EDGAR's Financial Data

tidyedgar is an R package designed to simplify acquiring and transforming fundamental financial data from the EDGAR database. Leveraging the official S.E.C. API, TidyEDGAR outputs data in a clean, 'tidy' format ideal for financial analysis and stock screening based on fundamental data.

Features

  • Ease of Use: Automates the retrieval and preprocessing of financial data.
  • Tidy Format: Structures data in a convenient format for analysis.
  • Comprehensive Coverage: Access data across all U.S. public companies.
  • Versatile Analysis: Suitable for fundamental analysis and stock screening.

Installation

Install TidyEDGAR using:

install.packages("tidyedgar")

Or to get the development version:

devtools::install_github("gerardgimenezadsuar/tidyedgar")

Usage

Call the following function to get a comprehensive fundamental analysis dataframe:

df <- yearly_data(years = 2015:2023)

This will get you the following financials for ALL companies in EDGAR:

And easily you can create plots like this:

The previous example showcased the main wrapper function. However, there are many options to customize the data retrieval and processing.

Fetching the latest (2020-2023) yearly financial data, of certain account names:

net_income <- get_ydata(account = "NetIncomeLoss")
revenue <- get_ydata(account = "Revenues")
op_income <- get_ydata(account = "OperatingIncomeLoss")

Transforming and analyze the data with additional metrics such as net margin and year-over-year changes:

yearly <- prepare_data(revenue, net_income, op_income, quarterly = F)

Do you need quarterly data? You can use:

get_qdata()

In combination with:

prepare_data(df, quarterly = TRUE)

For suggestions/bug reporting, feel free to reach out at [email protected].

Metadata

Version

1.0.1

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows