File size: 563 Bytes
5dcecd4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from pathlib import Path

from modules.get_rules_in_window import main, METADATA


if __name__ == "__main__":

    main_path = Path(__file__).parent
    data_path = main_path.joinpath("data")
    if not data_path.exists():
        data_path.mkdir(parents=True, exist_ok=True)
    
    start = input("Enter beginning of CRA window [yyyy-mm-dd]: ")
    df, agency, ym = main(start, path=data_path, metadata=METADATA, significant=True)
    print(f"Rules in CRA window: {len(df)}")
    print("\nRules by agency\n", agency.head(10))
    print("\nRules by month\n", ym)