You have a file Retail.csv
describing sales data for a hypothetical Camping Supplies store.
Using your tool of choice, answer the following questions:
-
Construct a report breaking down sales by country, sales channel, product and year. The report should be easy to navigate.
-
Provide a list of recommendations for improving the store's profit.
-
Predict the next year of sales for each country. Your predictions will be analysed by a statistically sophisticated manager.
-
What additional data would you want to collect? What analyses would it empower you to run?
I have created a flask app to render different pages to answer the above questions.
I have a demo app running on: https://retail-challenge-lite.herokuapp.com/
Below are screenshots of what the app looks like when running:
Plotly JS was used to render the data onto the page by querying the API endpoints created.
Forecasts are performed in real-time using an API I wrote with a fitted model using Facebook Prophet.
This page was created by rendering markdown using Python Markdown.
API docs were created using Flask RESTX.
This page was created by rendering markdown using Python Markdown. Each change log is written in markdown and rendered onto the page as cards.
-
Freeze pip / conda requirements
python -m pip list --format=freeze > requirements.txt
-
Create the environment using
conda create -n <env> --file requirements.txt
-
Run the app using:
python app.py
OR
flask run
-
Freeze pip / conda requirements
python -m pip list --format=freeze > requirements.txt
-
Create/Update
Procfile
to use gunicorn to run the web server and set app.py as the application to run:web: gunicorn app:app
-
Create/Update
runtime.txt
to contain:python-3.7.10