This repo contains everything you need to get started on the program! Good luck!
This project is a Dash application for visualizing sales data of Pink Morsel. It allows users to filter the sales data by region and view the corresponding sales trends.
main.py
: Processes raw data files and generatesformatted_data.csv
.app.py
: Contains the Dash app initialization, layout, and callback definitions.test_app.py
: Contains tests for the Dash app.run_tests.sh
: Shell script to run the test suite.data/
: Directory containing raw data files.daily_sales_data_0.csv
daily_sales_data_1.csv
daily_sales_data_2.csv
formatted_data.csv
: Resulting data file generated bymain.py
.
- Python 3.7+
- Pip (Python package installer)
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Ensure your raw data files are placed in the
data/
directory.
Before running the Dash application, process the raw data files using main.py
to generate formatted_data.csv
:
python main.py
5. Place your formatted data file in the root directory of the project and name it `formatted_data.csv`.
## Running the Application
To run the application, execute the following command:
```sh
python app.py
## Running tests
To run the tests, use the provided run_tests.sh script:
1: Ensure the virtual environment is activated:
```sh
source venv/bin/activate
```
2: Run the test script:
```sh
./run_tests.sh
```