Data Loading Functions
get_processed_root(root=None)
Return the root path to the Phase 1 processed data.
If root is None, we assume the following project layout:
GitHub/
├─ final-project/
│ └─ phase1_data_pipeline/...
└─ p2p-analytics/
└─ phase2_package/...
└─ src/p2p_analytics/...
If root is provided, it is used directly.
Otherwise, a ValueError is raised to force the user to be explicit.
Source code in src\p2p_analytics\io.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | |
load_bcb_latest(root=None)
Load the most recent BCB official rates (e.g. today's table). This function reads from: <processed_root>/bcb/bcb_today.parquet
Source code in src\p2p_analytics\io.py
95 96 97 98 99 100 101 | |
load_bcb_master(root=None)
Load the full BCB official-rate history.It reads from: <processed_root>/bcb/bcb_master.parquet
Source code in src\p2p_analytics\io.py
86 87 88 89 90 91 92 | |
load_binance_currency(currency, root=None)
Load historical Binance P2P data for a single fiat currency. It reads from: <processed_root>/binance/historical_fiat/<CURRENCY>.parquet
Source code in src\p2p_analytics\io.py
40 41 42 43 44 45 46 47 48 49 | |
load_binance_daily(date, root=None)
Load one daily snapshot of Binance P2P data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date
|
str or datetime.date Date of interest; if string, should be 'YYYY-MM-DD'. This function reads from: `<processed_root>/binance/daily_snapshots/daily_snapshot_<YYYY-MM-DD>.parquet`
|
|
required |
Source code in src\p2p_analytics\io.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
load_binance_master(root=None)
Load the full Binance P2P history (all fiats, all time). It reads from: <processed_root>/binance/p2p_master.parquet
Source code in src\p2p_analytics\io.py
52 53 54 55 56 57 58 | |