mirror of
https://github.com/PR0M3TH3AN/python_charts.git
synced 2026-10-28 17:30:41 +00:00
Update README aliases
This commit is contained in:
1 parent
b01ee5c675
commit
0a045dbe48
1 file changed
+20
-16
@@ -26,8 +26,12 @@ This initial chart is a self‐contained toolkit that:
|
|||||||
git clone https://github.com/your-org/python_charts.git
|
git clone https://github.com/your-org/python_charts.git
|
||||||
cd python_charts
|
cd python_charts
|
||||||
|
|
||||||
# One‐command: install deps, download data, and plot
|
# Activate your virtual environment
|
||||||
./startup.sh --offset 12 --end 2025-05-31 --extend-years 5
|
source venv/bin/activate
|
||||||
|
# Install dependencies
|
||||||
|
pip install -r requirements.txt
|
||||||
|
# Plot the lagged UNRATE vs. Oil chart
|
||||||
|
./startup.sh lagged_oil_unrate --offset 12 --end 2025-05-31 --extend-years 5
|
||||||
````
|
````
|
||||||
|
|
||||||
This will:
|
This will:
|
||||||
@@ -80,8 +84,8 @@ python_charts/
|
|||||||
To refresh (or initially populate) the SQLite database with FRED series, run:
|
To refresh (or initially populate) the SQLite database with FRED series, run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Either let startup.sh detect the script path:
|
# Either let startup.sh dispatch via alias:
|
||||||
./startup.sh scripts/refresh_data.py --series UNRATE CPIAUCSL --start 1960-01-01 --output outputs/chart.png
|
./startup.sh refresh_data --series UNRATE CPIAUCSL --start 1960-01-01 --output outputs/chart.png
|
||||||
|
|
||||||
# Or invoke it directly as a module (dependencies must already be installed):
|
# Or invoke it directly as a module (dependencies must already be installed):
|
||||||
python -m scripts.refresh_data --series UNRATE CPIAUCSL --start 1960-01-01 --output outputs/chart.png
|
python -m scripts.refresh_data --series UNRATE CPIAUCSL --start 1960-01-01 --output outputs/chart.png
|
||||||
@@ -106,7 +110,7 @@ This command:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Populate fred.db with four series (UNRATE, WTI, Bitcoin, and Global M2)
|
# Populate fred.db with four series (UNRATE, WTI, Bitcoin, and Global M2)
|
||||||
./startup.sh scripts/refresh_data.py --series UNRATE DCOILWTICO CBBTCUSD GLOBAL_M2 --start 1973-01-01
|
./startup.sh refresh_data --series UNRATE DCOILWTICO CBBTCUSD GLOBAL_M2 --start 1973-01-01
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -117,7 +121,7 @@ Once data is present, generate the dual‐axis plot of UNRATE vs. lagged WTI oil
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Default: 18‐month lag, default date range (1973‐01‐01 to today), and 3‐year extension
|
# Default: 18‐month lag, default date range (1973‐01‐01 to today), and 3‐year extension
|
||||||
./startup.sh --offset 18
|
./startup.sh lagged_oil_unrate --offset 18
|
||||||
```
|
```
|
||||||
|
|
||||||
What happens under the hood:
|
What happens under the hood:
|
||||||
@@ -143,7 +147,7 @@ What happens under the hood:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 6‐month lag, start in 1980, end in 2025‐05‐31, extend by 2 years
|
# 6‐month lag, start in 1980, end in 2025‐05‐31, extend by 2 years
|
||||||
./startup.sh --offset 6 --start 1980-01-01 --end 2025-05-31 --extend-years 2
|
./startup.sh lagged_oil_unrate --offset 6 --start 1980-01-01 --end 2025-05-31 --extend-years 2
|
||||||
```
|
```
|
||||||
|
|
||||||
| Option | Description |
|
| Option | Description |
|
||||||
@@ -164,8 +168,8 @@ What happens under the hood:
|
|||||||
You can plot any combination of FRED series stored in `data/fred.db` using `scripts/custom_chart.py`. Each column in the DataFrame is plotted on a shared axis.
|
You can plot any combination of FRED series stored in `data/fred.db` using `scripts/custom_chart.py`. Each column in the DataFrame is plotted on a shared axis.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Either let startup.sh detect the script path:
|
# Either let startup.sh dispatch via alias:
|
||||||
./startup.sh scripts/custom_chart.py --series UNRATE DCOILWTICO --start 2000-01-01 --end 2020-12-31
|
./startup.sh custom_chart --series UNRATE DCOILWTICO --start 2000-01-01 --end 2020-12-31
|
||||||
|
|
||||||
# Or invoke it directly as a module (dependencies must already be installed):
|
# Or invoke it directly as a module (dependencies must already be installed):
|
||||||
python -m scripts.custom_chart --series UNRATE DCOILWTICO --start 2000-01-01 --end 2020-12-31
|
python -m scripts.custom_chart --series UNRATE DCOILWTICO --start 2000-01-01 --end 2020-12-31
|
||||||
@@ -193,8 +197,8 @@ Before running `bitcoin_m2_chart.py`, make sure the Bitcoin price
|
|||||||
(`CBBTCUSD`) and global M2 (`GLOBAL_M2`) series exist in `data/fred.db`. If the database is missing these tables, fetch them with `refresh_data.py`:
|
(`CBBTCUSD`) and global M2 (`GLOBAL_M2`) series exist in `data/fred.db`. If the database is missing these tables, fetch them with `refresh_data.py`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Either let startup.sh detect the script path:
|
# Either let startup.sh dispatch via alias:
|
||||||
./startup.sh scripts/refresh_data.py --series CBBTCUSD GLOBAL_M2 --start 2010-01-01
|
./startup.sh refresh_data --series CBBTCUSD GLOBAL_M2 --start 2010-01-01
|
||||||
|
|
||||||
# Or invoke it directly as a module (dependencies must already be installed):
|
# Or invoke it directly as a module (dependencies must already be installed):
|
||||||
python -m scripts.refresh_data --series CBBTCUSD GLOBAL_M2 --start 2010-01-01
|
python -m scripts.refresh_data --series CBBTCUSD GLOBAL_M2 --start 2010-01-01
|
||||||
@@ -203,8 +207,8 @@ python -m scripts.refresh_data --series CBBTCUSD GLOBAL_M2 --start 2010-01-01
|
|||||||
Once the data is present, generate the Bitcoin‐Global M2 overlay chart:
|
Once the data is present, generate the Bitcoin‐Global M2 overlay chart:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Either let startup.sh detect the script path:
|
# Either let startup.sh dispatch via alias:
|
||||||
./startup.sh scripts/bitcoin_m2_chart.py --btc-series CBBTCUSD --m2-series GLOBAL_M2 --output outputs/chart.png
|
./startup.sh bitcoin_m2 --btc-series CBBTCUSD --m2-series GLOBAL_M2 --output outputs/chart.png
|
||||||
|
|
||||||
# Or invoke it directly as a module (dependencies must already be installed):
|
# Or invoke it directly as a module (dependencies must already be installed):
|
||||||
python -m scripts.bitcoin_m2_chart --btc-series CBBTCUSD --m2-series GLOBAL_M2 --output outputs/chart.png
|
python -m scripts.bitcoin_m2_chart --btc-series CBBTCUSD --m2-series GLOBAL_M2 --output outputs/chart.png
|
||||||
@@ -303,7 +307,7 @@ python-dateutil>=2.8.1
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Run the default lagged-oil chart via startup.sh
|
# Run the default lagged-oil chart via startup.sh
|
||||||
./startup.sh --offset 18
|
./startup.sh lagged_oil_unrate --offset 18
|
||||||
```
|
```
|
||||||
|
|
||||||
or, if you prefer the module form:
|
or, if you prefer the module form:
|
||||||
@@ -325,8 +329,8 @@ python-dateutil>=2.8.1
|
|||||||
* If `data/fred.db` does not exist (e.g., fresh clone), run:
|
* If `data/fred.db` does not exist (e.g., fresh clone), run:
|
||||||
|
|
||||||
````bash
|
````bash
|
||||||
# Using startup.sh to detect the script path
|
# Using startup.sh to run via alias
|
||||||
./startup.sh scripts/refresh_data.py --series UNRATE DCOILWTICO
|
./startup.sh refresh_data --series UNRATE DCOILWTICO
|
||||||
|
|
||||||
# Or run it as a module directly
|
# Or run it as a module directly
|
||||||
python -m scripts.refresh_data --series UNRATE DCOILWTICO
|
python -m scripts.refresh_data --series UNRATE DCOILWTICO
|
||||||
|
|||||||
Reference in new issue
Block a user