Programming lesson
Mapping the Menu: How Location Shapes Cafe Beverage Offerings – An SPSS Tutorial
Explore how cafe beverage menus differ by location using SPSS. This tutorial guides you through PCA, hypothesis testing, and data analysis with real-world examples from Sydney's latte divide.
Introduction: The Coffee Culture and the Data Behind It
In 2026, the coffee scene in Sydney continues to evolve, with cafes competing for customers by offering unique beverage assemblages. But does location truly shape what's on the menu? This tutorial uses SPSS to analyze data from a study inspired by the 'Mapping the Menu' project, examining how cafe beverage offerings differ between shopping centres and retail strips, and across the famous 'latte divide' – a socioeconomic boundary splitting Sydney into north-east and south-west regions. By the end, you'll understand how to perform principal component analysis (PCA), test hypotheses, and interpret results using SPSS.
Understanding the Hypotheses
The study tests four hypotheses:
- Drink assemblages differ between shopping centre and strip cafes. We expect no uniform pattern – location type matters.
- Drink assemblages differ north-east vs. south-west of the latte divide. Business models and socioeconomic factors likely drive differences.
- Mean scores of principal components from habitat variables differ between shopping centre and strip cafes. This requires PCA first.
- Principal components predict drink species richness or abundance. Again, PCA is needed.
Data Collection and Variables
Data were collected from 16 cafes across 8 LGAs, with two cafes per LGA (one shopping centre, one strip) and balanced across the latte divide. Variables include:
- Factor 1: Cafe Type – Shopping Centre (enclosed, multi-level, mall-dependent) vs. Strip (streetfront, community-oriented).
- Factor 2: Location – North-east (above the divide, higher socioeconomic) vs. South-west (below the divide, lower socioeconomic).
- Habitat variables – e.g., seating capacity, number of staff, presence of outdoor seating, price range, etc.
- Drink species – Count of distinct beverages (e.g., latte, cappuccino, smoothie, matcha).
Step 1: Setting Up Your SPSS Dataset
Open SPSS and create a new dataset. Define variables:
CafeID– Numeric, 1 to 16.CafeType– Numeric, 1 = Shopping Centre, 2 = Strip.Location– Numeric, 1 = North-east, 2 = South-west.LGA– String for LGA name.DrinkRichness– Numeric, count of drink types.DrinkAbundance– Numeric, total number of drinks (if multiple items).- Habitat variables – e.g.,
Seating(numeric),Staff(numeric),Outdoor(1=Yes, 0=No),PriceRange(1=low, 2=medium, 3=high).
Enter data for all 16 cafes. For example:
CafeID: 1, CafeType: 1, Location: 1, LGA: Hills Shire, DrinkRichness: 12, Seating: 40, Staff: 5, Outdoor: 0, PriceRange: 3Step 2: Principal Component Analysis (PCA) for Habitat Variables
PCA reduces multiple habitat variables into fewer components. Follow these steps:
- Click Analyze > Dimension Reduction > Factor.
- Select habitat variables (e.g., Seating, Staff, Outdoor, PriceRange) into Variables.
- Click Extraction: choose Principal components, check Scree plot, and set Extract based on Eigenvalue > 1.
- Click Rotation: choose Varimax for clearer interpretation.
- Click Scores: check Save as variables (Regression method) to generate component scores.
- Click OK.
SPSS outputs a correlation matrix, total variance explained, scree plot, and rotated component matrix. Typically, two components emerge – we'll call them Component 1: Cafe Ambience (e.g., seating, staff) and Component 2: Premium Features (e.g., outdoor, price). Save the scores as new variables: FAC1_1 and FAC2_1.
Step 3: Testing Hypothesis 1 – Drink Richness by Cafe Type
Use an independent samples t-test to compare drink richness between shopping centre and strip cafes:
- Click Analyze > Compare Means > Independent-Samples T Test.
- Select
DrinkRichnessas Test Variable. - Select
CafeTypeas Grouping Variable, define groups (1,2). - Click OK.
Interpret the output: check Levene's test for equality of variances, then the t-test p-value. If p < 0.05, reject the null hypothesis – drink richness differs by cafe type.
Step 4: Testing Hypothesis 2 – Drink Assemblages by Location (Latte Divide)
Similarly, test if drink richness differs by location (north-east vs. south-west):
- Repeat the t-test with
Locationas grouping variable. - Alternatively, use a chi-square test if drink types are categorical. For simplicity, we use t-test on richness.
Interpret results: if p < 0.05, the latte divide matters for beverage variety.
Step 5: Testing Hypothesis 3 – PCA Scores by Cafe Type
Now test if mean component scores differ by cafe type:
- Use t-test for each component score (
FAC1_1,FAC2_1) withCafeTypeas grouping. - For example, if Component 1 (Ambience) has higher mean in shopping centres, that suggests mall cafes invest more in seating and staff.
Step 6: Testing Hypothesis 4 – Predicting Drink Richness with PCA Scores
Use linear regression to see if component scores predict drink richness:
- Click Analyze > Regression > Linear.
- Select
DrinkRichnessas Dependent. - Select
FAC1_1andFAC2_1as Independent(s). - Click OK.
Check the model summary (R-squared) and coefficients table. If a component significantly predicts richness (p < 0.05), then habitat variables influence beverage offerings.
Interpreting Results: A Real-World Example
Suppose your analysis shows:
- Drink richness is significantly higher in strip cafes (mean=14) than shopping centres (mean=10), p=0.03.
- No significant difference by location (p=0.45), suggesting the latte divide may not affect variety.
- Component 1 (Ambience) scores are higher in shopping centres (mean=0.5 vs. -0.5, p=0.01), meaning mall cafes have more seating and staff.
- Component 1 significantly predicts drink richness (β=2.1, p=0.02), so cafes with better ambience offer more beverages.
This implies that while location type (shopping centre vs. strip) affects menu diversity, the socioeconomic divide does not. Instead, physical features like seating and staff drive beverage variety.
Conclusion: From Data to Insights
This tutorial demonstrated how SPSS can uncover relationships between cafe location and beverage offerings. By applying PCA and hypothesis testing, you can move beyond simple observations to data-driven conclusions. Whether you're a student or a cafe owner, understanding these patterns helps tailor menus to customer preferences. In a city like Sydney, where the latte divide is a known socioeconomic marker, our analysis shows that the real driver of menu diversity is the cafe's physical environment, not just its geography.
Now, try running these analyses on your own dataset. Remember to check assumptions (normality, homogeneity of variance) and report effect sizes for a complete picture.