The dataset viewer is not available for this split.
Error code: RowsPostProcessingError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
- 1. Data Cleaning -
- 2. Feature Engineering -
- 3. Descriptive Statistics & Visual Exploration -
- Univariate Analysis : As outlined in the data science workflow, the first step involved examining each column independently. To optimize this process, I categorized the variables into groups then used loops (Python loops) to automatically generate relevant plots for each group. for example :
- Bivariate Analysis (Identifying Initial Correlations) : After engineering the new variables, I compared them against existing features to detect potential relationships between individual factors. By again grouping variables into categories and using automated loops, I was able to efficiently visualize how different demographics interact with my custom metrics.
- Multivariate Exploration : The goal was to identify specific consumer clusters that exhibit strong shopping tendencies by observing how multiple features interact simultaneously.Instead of looking at "dry" demographic data in isolation, I looked at specific groups ( a combination of variables) in uncover behavioral patterns related to the consumer's persona.
- Univariate Analysis : As outlined in the data science workflow, the first step involved examining each column independently. To optimize this process, I categorized the variables into groups then used loops (Python loops) to automatically generate relevant plots for each group. for example :
- Supporting Research Questions :
- Final Conclusion: Refuting the Primary Hypothesis :
my video :
The selected dataset provides a comprehensive look into consumer shopping habits, incorporating various factors such as demographics, digital habits, shopping patterns, logistics preferences, and psychological insights. The dataset is designed with realistic variability and meaningful relationships between features, making it ideal for practicing real-world data science workflows. In this project, I have decided to focus primarily on investigating a core question: Can demographic characteristics effectively predict whether a consumer will prefer online shopping over physical retail stores?
Workflow & Methodolog :
hroughout the project, I followed a comprehensive data science workflow as outlined in the project guidelines.
1. Data Cleaning -
The initial step involved a thorough cleaning of the dataset. After performing various checks, there were no missing or invalid values. However, I identified and addressed several logical inconsistencies and outliers. My decision to fix them as driven by the need to ensure that the subsequent analysis provides results that can be accurately generalized to the consumer market and to make sure there is logical consistency.
2. Feature Engineering -
To align the dataset with my specific research goals and provide a more organized structure for analysis, I performed targeted data transformations. I engineered three new variables designed to create a data structure capable of revealing deeper patterns, ultimately making it a more effective tool for classification and profiling. These new features serve as key metrics, engineered to capture more precise measurements and act as stronger predictors of shopping choices than any individual raw variable. By synthesizing these features, I was able to reduce the overall complexity of the dataset while retaining maximum information.
3. Descriptive Statistics & Visual Exploration -
To move from raw data to real insights, I analyzed the data in three steps, with the primary goal of visualizing distributions and uncovering patterns.
Univariate Analysis : As outlined in the data science workflow, the first step involved examining each column independently. To optimize this process, I categorized the variables into groups then used loops (Python loops) to automatically generate relevant plots for each group. for example :
- For example:
for col in demographics:
if df[col].dtype == 'object' or col in ['age_group', 'income_level', 'gender', 'city_tier']:
counts = df[col].value_counts()
plt.figure(figsize=(8, 6))
plt.pie(counts, labels=counts.index, autopct='%1.1f%%', startangle=140)
plt.title(f'Distribution of {col}')
plt.show()
else:
plt.figure(figsize=(8, 5))
plt.hist(df[col], bins=15, color='lightblue', edgecolor='black')
plt.title(f'Distribution of {col}')
plt.show()
Bivariate Analysis (Identifying Initial Correlations) : After engineering the new variables, I compared them against existing features to detect potential relationships between individual factors. By again grouping variables into categories and using automated loops, I was able to efficiently visualize how different demographics interact with my custom metrics.
- For example:
for demog in original_cols:
for feature in new_features:
plt.figure(figsize=(10, 6))
if df_final[demog].dtype in ['int64', 'float64']:
# Visualizing trends with regression for numerical data
sns.regplot(data=df_final, x=demog, y=feature,
scatter_kws={'alpha':0.5}, line_kws={'color':'red'})
plt.title(f'Scatter Plot: {demog.title()} vs {feature.replace("_", " ").title()}')
else:
# Visualizing distribution across categories using Box Plots
sns.boxplot(data=df_final, x=demog, y=feature, palette='Set2', hue=demog, legend=False)
plt.title(f'Box Plot: {feature.replace("_", " ").title()} by {demog.title()}')
plt.xticks(rotation=45)
plt.xlabel(demog.replace("_", " ").title())
plt.ylabel(f'{feature.replace("_", " ").title()} (0-10)')
plt.grid(True, axis='y', linestyle='--', alpha=0.7)
plt.tight_layout()
plt.show()
Multivariate Exploration : The goal was to identify specific consumer clusters that exhibit strong shopping tendencies by observing how multiple features interact simultaneously.Instead of looking at "dry" demographic data in isolation, I looked at specific groups ( a combination of variables) in uncover behavioral patterns related to the consumer's persona.
* <u>For example, you can see here "Comparison of Online Preference Across income level and Gender":</u>
Research Findings :
I utilized various plots and graphs to visualize the discoveries regarding each of my sub-questions, leading to a primary conclusion regarding my main hypothesis.
Supporting Research Questions :
I initiated this assignment with three core sub-questions, all of which were mostly Refuted by the data. The analysis showed that variables I expected to be predictors, did not hold the consistent weight I initially hypothesized and consistently pointed toward a "Hybrid" consumer model.
Follow-up Research Questions :
After discovering that the modern consumer is inherently hybrid, I decided to explore two additional directions. I incorporated further variables to identify potential segments that might exhibit a clearer consumer bias. However, as demonstrated in the graphs below, the results consistently proved that consumers do not possess a definitive or one-sided preference.
Final Conclusion: Refuting the Primary Hypothesis :
Ultimately, the findings across the entire analysis consistently point to the same conclusion: it is not possible to determine or predict consumer channel preferences based solely on demographic data. A deeper dive into the metrics reveals that modern consumers do not hold a definitive or exclusive preference for a single shopping channel. Instead, the evidence characterizes the modern shopper as inherently hybrid,his discovery refutes my primary research question and suggests that consumer behavior today is driven by situational context rather than static demographic traits.
- Downloads last month
- 10







