Skip to content

Commit

Permalink
Update pages to work with new location
Browse files Browse the repository at this point in the history
  • Loading branch information
jvivian committed Oct 28, 2024
1 parent dcb829e commit 6512b2c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dfmdash/streamlit/Dynamic_Factor_Model.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def file_uploader(self) -> "DataHandler":
st.warning("Please provide input file or check box in sidebar to see Covid-19 Example")
st.stop()
if load_covid_example:
self.df = pd.read_csv(Path(__file__).parent / "../data/processed/test_input_2state.csv", index_col=0)
self.df = pd.read_csv(Path(__file__).parent / "../../data/processed/test_input_2state.csv", index_col=0)
else:
self.df = self.load_data(file)
c1, _, c2 = st.columns([0.25, 0.05, 0.7])
Expand Down
2 changes: 1 addition & 1 deletion dfmdash/streamlit/pages/1_Factor_Analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
pio.templates.default = "plotly_white"

FILE = Path(__file__)
EX_PATH = FILE.parent / "../../data/example-data/pandemic-only"
EX_PATH = FILE.parent / "../../../data/example-data/pandemic-only"


def center_title(text):
Expand Down
2 changes: 1 addition & 1 deletion dfmdash/streamlit/pages/2_Comparative_Run_Analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def center_title(text):

# Parameter to runs
FILE_PATH = Path(__file__).parent
EXAMPLE_RESULT_DIR = FILE_PATH / "../../data/example-data"
EXAMPLE_RESULT_DIR = FILE_PATH / "../../../data/example-data"
run_dir = Path(st.text_input("Path directory of runs", value=EXAMPLE_RESULT_DIR))
df = parse_multiple_runs(run_dir).sort_values("Run")

Expand Down
12 changes: 2 additions & 10 deletions dfmdash/streamlit/pages/4_Synthetic_Control_Model.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
from pathlib import Path
import matplotlib.pyplot as plt

import seaborn as sns
import plotly.express as px
import anndata as ann
import numpy as np
import pandas as pd
import plotly.graph_objects as go
import plotly.io as pio
import streamlit as st
from SyntheticControlMethods import DiffSynth, Synth
from datetime import datetime

from dfmdash.constants import FACTORS_GROUPED
from dfmdash.covid19 import get_df, get_project_h5ad
from SyntheticControlMethods import Synth

st.set_page_config(layout="wide")
pio.templates.default = "plotly_dark"

EX_PATH = Path("./dfmdash/data/example-data/pandemic-only")
EX_PATH = Path(__file__).parent / "../../../data/example-data/pandemic-only"


def center_title(text):
Expand Down

0 comments on commit 6512b2c

Please sign in to comment.