Welcome to the SEC Data Analysis project! This repository houses R scripts designed for retrieving and analyzing company data from U.S. Securities and Exchange Commission (SEC) filings. The primary objective is to offer a framework for accessing information about publicly traded companies and conducting educational data analysis based on their SEC filings.
Note: the project is under development. WIP indicates Work In Progress
The main purpose of this project is to retrieve and analyze company data from SEC filings for educational and research purposes. It's crucial to note that the scripts provided here are intended for educational use only and should not be used for making investment decisions. Use these scripts at your own risk.
This project comprises two main components:
-
R Scripts for Data Retrieval and Analysis:
main_script.R
: Orchestrates data retrieval and analysis.code/Functions/data_retrieval.R
: Retrieves company data from SEC filings.code/Functions/data_analysis.R
: Processes and analyzes SEC data.code/Functions/data_visualization.R
: Processes, analyzes, and visualizes SEC data.code/Functions/utils.R
: Utility functions for processing, analyzing, and visualizing SEC data.
-
Quarto Website Development:
- The
/quarto
directory contains Quarto (.qmd) files, forming a website that serves as a guide to SEC data analysis with R. index.qmd
: Introduction and overview of the project.01_data_retrieval.qmd
: Explains the process of retrieving financial data from SEC filings.02_data_exploration.qmd
: Delves into the structure of the SEC data obtained from the API.03_data_analysis.qmd
,04_data_visualization.qmd
,06_advanced_topics.qmd
: Currently placeholders for future content.11_AAPL.qmd
: Placeholder for specific analysis on Apple Inc.A1_main_script.qmd
,A2_Functions.qmd
: Placeholder for detailed explanations of the main script and functions.
- The
-
Clone the repository to your local machine:
git clone https://github.com/gp1981/SEC_Data_Analysis.git
-
Install the required R libraries by running the following command:
install.packages(c("httr", "jsonlite", "tidyverse", "dplyr"))
Run the main_script.R
script to retrieve and analyze SEC data.
The Quarto website is part of this project. You can access the book at the following link:
Unlocking Financial Insights: A Guide to SEC Data Analysis with R - Link to the page created
To render the Quarto website on your local machine:
-
Install Quarto:
npm install -g quarto
-
Render the Quarto website: Navigate to the
/quarto
directory and use the Quarto CLI to render the book:cd quarto quarto render
Alternatively, in the quarto directory, you can open the
index.qmd
file and click "Render."The rendered website will be available in the docs directory.
Contributions are welcome! If you have any ideas for improvements or new features, please open an issue or submit a pull request. For major changes, please discuss the changes first by opening an issue.
This project is licensed under the MIT License. See the LICENSE file for details.
This script is intended for educational purposes only and should not be used for investment decisions. Use at your own risk.
For questions or feedback, feel free to contact gp1981.
Enjoy analyzing SEC data!