refactor: replace month dropdown with week dropdown and update related components
feat: add feedback functionality and modal for category feedback style: add feedback button styles in CSS docs: add explanation tab for dashboard usage instructions
This commit is contained in:
@ -7,6 +7,7 @@ class DataSchema:
|
||||
DATE = "date"
|
||||
MONTH = "month"
|
||||
YEAR = "year"
|
||||
WEEK = "week"
|
||||
|
||||
|
||||
def load_transaction_data(path: str) -> pd.DataFrame:
|
||||
@ -22,4 +23,8 @@ def load_transaction_data(path: str) -> pd.DataFrame:
|
||||
)
|
||||
data[DataSchema.YEAR] = data[DataSchema.DATE].dt.year.astype(str)
|
||||
data[DataSchema.MONTH] = data[DataSchema.DATE].dt.month.astype(str)
|
||||
return data
|
||||
data[DataSchema.WEEK] = (
|
||||
data[DataSchema.DATE].dt.isocalendar().year.astype(str)
|
||||
+ data[DataSchema.DATE].dt.isocalendar().week.astype(str).str.zfill(2)
|
||||
)
|
||||
return data
|
@ -6,6 +6,7 @@ class DataSchema:
|
||||
DATE = "date"
|
||||
MONTH = "month"
|
||||
YEAR = "year"
|
||||
WEEK = "week"
|
||||
|
||||
class SPC_Schema:
|
||||
FC = "FC"
|
||||
@ -30,4 +31,8 @@ def load_spc_data(path: str) -> pd.DataFrame:
|
||||
)
|
||||
data[DataSchema.YEAR] = data[DataSchema.DATE].dt.year.astype(str)
|
||||
data[DataSchema.MONTH] = data[DataSchema.DATE].dt.month.astype(str)
|
||||
return data
|
||||
data[DataSchema.WEEK] = (
|
||||
data[DataSchema.DATE].dt.isocalendar().year.astype(str)
|
||||
+ data[DataSchema.DATE].dt.isocalendar().week.astype(str).str.zfill(2)
|
||||
)
|
||||
return data
|
Reference in New Issue
Block a user