-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More refactoring, added comments to main function, and updated for Py…
…thon 3.8
- Loading branch information
1 parent
307b009
commit bc2f5a0
Showing
9 changed files
with
136 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ Credits | |
Development Lead | ||
---------------- | ||
|
||
* Ryan S. McCoy <[email protected].github.com> | ||
* Ryan S. McCoy <github@ryansmccoy.com> | ||
|
||
Contributors | ||
------------ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Top-level package for Python SEC Edgar Data.""" | ||
|
||
__author__ = """Ryan S. McCoy""" | ||
__email__ = '[email protected]' | ||
__version__ = '0.1.0' | ||
import logging | ||
|
||
logging.getLogger(__name__).addHandler(logging.NullHandler()) | ||
|
||
import os | ||
import time | ||
from datetime import datetime, timedelta | ||
|
@@ -13,12 +21,6 @@ | |
pd.set_option('display.max_rows', 100) | ||
pd.set_option('display.width', 600) | ||
|
||
__author__ = """Ryan S. McCoy""" | ||
__email__ = '[email protected]' | ||
__version__ = '0.1.0' | ||
|
||
import logging | ||
logging.getLogger(__name__).addHandler(logging.NullHandler()) | ||
|
||
header_list = ["ACCESSION NUMBER", "CONFORMED SUBMISSION TYPE", "PUBLIC DOCUMENT COUNT", | ||
"CONFORMED PERIOD OF REPORT", "FILED AS OF DATE", "DATE AS OF CHANGE", "FILER", "COMPANY data", | ||
|
@@ -109,20 +111,22 @@ class Folders: | |
DAILY_INDEX_DIR = os.path.join(EDGAR_DIR, "daily-index") | ||
FILING_DIR = os.path.join(EDGAR_DIR, "filings") | ||
|
||
MERGED_IDX_FILE = os.path.join(REF_DIR, 'merged_idx_files.pq') | ||
TICKER_LIST = os.path.join(REF_DIR, "tickers.csv") | ||
TICKER_CIK = os.path.join(REF_DIR, "cik_tickers.csv") | ||
MERGED_IDX_FILEPATH = os.path.join(REF_DIR, 'merged_idx_files.pq') | ||
TICKER_LIST_FILEPATH = os.path.join(REF_DIR, "tickers.csv") | ||
TICKER_CIK_FILEPATH = os.path.join(REF_DIR, "cik_tickers.csv") | ||
|
||
# used as template | ||
TXT_FILING_DIR = os.path.join(EDGAR_DIR, "data", "CIK", "FOLDER") | ||
|
||
dirs_all = [SEC_DIR, DATA_DIR, EDGAR_DIR, | ||
MONTHLY_DIR, FULL_INDEX_DIR, DAILY_INDEX_DIR] | ||
|
||
print("Checking for Output Folders") | ||
|
||
for _ in dirs_all: | ||
if not os.path.exists(_): | ||
print("{} Doesn't Exists".format(_)) | ||
print("Creating Directory {}".format(SEC_DIR)) | ||
print(f"{_} Doesn't Exists") | ||
print(f"Creating Directory {SEC_DIR}") | ||
try: | ||
os.makedirs(_) | ||
except: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.