This project is an in-depth analysis of customer profiles and shopping behaviors for Gabes stores. It uses data from a Redshift database to perform various analyses including department analysis, customer segmentation, seasonality analysis, and market basket analysis.
The project is structured into several modular R scripts, each serving a distinct purpose:
- Setup and Database Connection: Script for initializing the environment and establishing database connections.
- Data Loading: Script to load and rename tables from the database.
- Analysis Functions: Separate scripts for different analyses such as open store analysis, customer segments analysis, seasonality analysis, department analysis, and market basket analysis.
- Main Execution: The main script that ties together all other scripts and executes the analysis pipeline.
- R environment (Preferably RStudio)
- Access to a Redshift database with the necessary data tables
- R libraries:
RPostgreSQL
,dplyr
,dbplyr
,data.table
,lubridate
,reshape2
,arules
- Setup Database Connection: Configure the database connection parameters in the
connect_to_database
function. - Run Main Script: Execute the
main
function to run the entire analysis pipeline. - Individual Analysis: Optionally, you can run individual analysis functions for specific insights.
Replace database connection details and analysis parameters in the script with your actual values. Modify the analysis functions according to your specific requirements or data structures.
Contributions to enhance the project's functionality or performance are welcome. Please adhere to the project's structure and coding standards for new features or improvements.