How chzou123/buckhack works
Project type and purpose
• This is a data‐science/predictive‐analytics pipeline with an interactive dashboard front end.
• Purpose: ingest historical ticketing CSVs, clean and engineer features, build propensity models for new partial ticket plans, then serve insights via a Flask dashboard.
File structure
• Top‐level CSV files (raw inputs): AccountInfo.csv, MembersAccounts.csv, NONseasonticket.csv, etc.
• “DataAnalysis/” – Jupyter notebooks for exploratory analysis (linear regression, lasso, PCA, survival analysis, segmentation).
• Cleaning & preprocessing scripts: accountclean.py, dataclean.py, features_add.py, updateAccount.py, accountSort.py, linear_reg_with_features.py.
• “cleanedfiles/” – output of cleaning steps (per‐segment CSVs).
• “dashboard/” – Flask app and modules (app.py, bucks_stats.py, user_data.py).
• Utility module: data.py (likely contains shared data‐loading functions).
README for insights
• Four new partial‐ticket plans to model (Value, Marquee, Weekend, Promotional).
• Goals: predict propensity for each account, recommend most likely plan, provide marketing insights.
• Workflow implied: data ingestion → feature engineering → model training → prediction → dashboard.
a. Main components
• Data Ingestion Layer (raw CSVs)
• Data Cleaning & Preprocessing (accountclean.py, dataclean.py → cleanedfiles/)
• Feature Engineering (features_add.py, linear_reg_with_features.py)
• Modeling (Jupyter notebooks + model‐training scripts)
• Model Storage (serialized models, e.g. pickle files)
• Prediction Service (Flask endpoints in dashboard/app.py)
• Visualization & Dashboard (Flask static templates or dynamic UIs)
• Users (Data Scientists, Marketing Analysts, Sales)
b. Relationships & data flow
– Raw CSVs feed into the Cleaning layer
– Cleaning outputs to cleanedfiles/
– Clean data flows into Feature Engineering to produce feature datasets
– Feature datasets feed into Model Training notebooks/scripts
– Trained models are saved and loaded by the Prediction Service
– Prediction Service serves results to Dashboard UI
– Users interact with the Dashboard to view insights
c. Architectural patterns / design principles
– Separation of concerns: ETL (Extract/Transform/Load), Modeling, Serving
– Modular pipelines: each script/notebook handles one stage
– Reproducibility: notebooks for analysis, scripts for production steps
– RESTful service layer (Flask) for real‐time inference
d. Key technologies & libraries
– Python ecosystem: pandas, scikit‐learn, numpy
– Jupyter notebooks for exploratory analysis
– Flask for micro‐service / dashboard
– CSV/flat‐file data storage; potential extension to SQL or NoSQL
• Blue for Data Layer (CSV, cleaned data)
• Green for Compute Layer (scripts, notebooks, model training)
• Orange for Service Layer (Flask API + Dashboard)
• Rectangles for compute modules/scripts
Final recommendations
• Be thorough: capture every stage from ingestion to user interaction.
• Infrastructure notes if relevant (e.g., local files vs. cloud storage).
• Review with stakeholders (Data Science, DevOps, Marketing) to ensure completeness.