refactor: restructure repo into core/app modules with per-study folders
Reorganize Palladium codebase into a modular architecture with `core/` shared logic and `app/` Streamlit UI, separating per-study assets into `studies/YYYYMM_<Vendor>/` folders containing notebooks, seed data, and configuration. Update README to reflect new structure, add `.gitignore` entries for `.env` and study exports, and refresh component documentation.
This commit is contained in:
32
app/components/charts.py
Normal file
32
app/components/charts.py
Normal file
@@ -0,0 +1,32 @@
|
||||
"""Streamlit-friendly chart wrappers (delegate to core.notebook_helpers.charts)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import streamlit as st
|
||||
|
||||
from core.notebook_helpers import charts as core_charts
|
||||
|
||||
|
||||
def cashflow(yearly_breakdown, *, initial_cost: float = 0.0) -> None:
|
||||
fig = core_charts.cashflow_chart(yearly_breakdown, initial_cost=initial_cost)
|
||||
st.plotly_chart(fig, use_container_width=True)
|
||||
|
||||
|
||||
def benefits_bar(items) -> None:
|
||||
fig = core_charts.benefits_bar(items)
|
||||
st.plotly_chart(fig, use_container_width=True)
|
||||
|
||||
|
||||
def cost_pie(items) -> None:
|
||||
fig = core_charts.cost_breakdown_pie(items)
|
||||
st.plotly_chart(fig, use_container_width=True)
|
||||
|
||||
|
||||
def scenario_bars(scenarios) -> None:
|
||||
fig = core_charts.scenario_comparison(scenarios)
|
||||
st.plotly_chart(fig, use_container_width=True)
|
||||
|
||||
|
||||
def waterfall(values) -> None:
|
||||
fig = core_charts.waterfall(values)
|
||||
st.plotly_chart(fig, use_container_width=True)
|
||||
Reference in New Issue
Block a user