Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xbowery committed Jan 24, 2024
1 parent 71b59c7 commit bd0e3f3
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,44 @@
# SDR-parser
# SDR Parser and Viewer

This repository contains the codebase to deploy a minimalistic [Streamlit web application](dtcc-sdr-viewer.streamlit.app) to quickly view through all the daily reports from the [Depository Trust & Clearing Corporation repository](pddata.dtcc.com/gtr/).

There are 2 separate versions of the SDR Viewer in this repository:

1. Proof-of-Concept for a deployed Streamlit web application (with only the past day's data available for space constraints) (found in the root directory)
2. Localhost viewing with a full set of data to view historical data (found in the `local_instance` directory)

## Steps to run the application locally

Do ensure you have Python 3.7+ and MongoDBCompass installed in your machine before running this application.

```bash
pip install requirements.txt

# To scrape the historical data locally
cd Scrapers

# Adjust the date you wish to start scraping from in line 7
python historical_scraper.py

cd ..

cd local_instance

# Save data to MongoDB instance
python database_saver.py

# View local application
python -m streamlit local_streamlit_viewer.py
```

You will be able to view the application running locally on your machine at this URL: `localhost:8501`.

## Web Application Overview

I created 2 GitHub Action workflows:

1. `scrape.yml`: This will automatically web scrape yesterday's DTCC cumulative reports and save the corresponding CSV file in this repository.
2. `update_db.yml`: This will automatically save the data to a Mongo Atlas cloud instance, and the data will be populated in the web application.


To see the deployed web application in action, view this [webpage](https://dtcc-sdr-viewer.streamlit.app/).

0 comments on commit bd0e3f3

Please sign in to comment.