Ece Erke/Data Analyst
← Back to portfolio

Exploratory data analysis · R

Real Estate Market Patterns

A housing-market analysis connecting 2019 home sales with assigned school data to identify potential areas for growth.

Project brief

01

Question

Where can a private housing organization find promising market opportunities in a city’s neighborhoods?

02

Data

2019 home-sales data was merged with elementary, middle, and high school size and rating data, resulting in 635 rows and 21 variables.

03

Method

Data cleaning, sensitivity analysis, exploratory visualization, k-means clustering, and linear regression.

Explore the analysis

From market structure to investment signals.

01 · Housing dataset

What does the housing market look like?

The cleaned housing dataset captures 2019 sales across eight pseudonymized neighborhoods and four home types. Use the chart toggle to move from market coverage, to home-type composition, to the overall price distribution.

  • Orange and Blue have the largest number of observations; Purple has only three.
  • Single-family homes are the most common home type in the cleaned data.
  • Selling prices range from roughly $400K to $2.4M and hint at multiple market segments.
What does the housing market look like? visualization 1
What does the housing market look like? visualization 2
What does the housing market look like? visualization 3
1 / 3

02 · Schools dataset

How do school ratings and enrollment differ by grade level?

The schools dataset provides one-to-ten ratings and enrollment measures for elementary, middle, and high schools. Use the chart toggle to compare the rating distributions and student-body sizes before those measures are merged with housing data.

  • Middle-school ratings are more tightly clustered than the other grade levels.
  • High schools tend to have the largest student bodies.
  • School ratings, rather than school size, provide the more useful later price signal.
How do school ratings and enrollment differ by grade level? visualization 1
How do school ratings and enrollment differ by grade level? visualization 2
1 / 2

1 / 2

03 · Market structure

Home types suggest two distinct price segments.

The selling-price distribution has two broad peaks. Condos and townhouses collect around the lower-price peak, while single- and multi-family homes are more prominent in the higher-price range.

  • Condos and townhouses behave similarly in their price distribution.
  • Single- and multi-family homes form the higher-price segment.
  • The visible divide motivated a two-cluster k-means analysis.
Home types suggest two distinct price segments. visualization 1

07 · K-means result

Two clusters closely align with the original home-type split.

Using year built and selling price, k-means separated the data into higher- and lower-price groupings. The distribution reinforces the pattern already visible by home type.

  • 88% of single- and multi-family homes fell in Grouping 1.
  • 83% of condos and townhouses fell in Grouping 2.
  • The cluster distribution separates most clearly around $1.2M.
Two clusters closely align with the original home-type split. visualization 1

05 · Segments over time

Both segments rise with newer construction, but remain separated.

The year-versus-price view shows an upward pattern for both groupings. Grouping 1 stays consistently above Grouping 2, indicating that the segment gap persists across construction years.

  • Grouping 1 has higher average year built and selling price.
  • Grouping 2 contains most of the lower-priced observations.
  • The chart describes a market pattern rather than a causal relationship.
Both segments rise with newer construction, but remain separated. visualization 1

1 / 3

09 · Housing-price model

Neighborhood and home features explain most price variation.

A regression model using neighborhood, house type, heating, fireplace, year built, and bedrooms explained 90% of the variation in selling price. Diagnostics indicate a generally strong model fit.

  • Single-family homes had the largest price association, followed closely by multi-family homes.
  • Each additional bedroom was associated with an estimated $82.37K increase.
  • Heating, fireplaces, newer construction, and higher-priced neighborhoods were positively associated with price.
Neighborhood and home features explain most price variation. visualization 1

10 · School-rating models

High-school ratings have the strongest school-price relationship.

School ratings at all three grade levels were statistically significant price predictors when modeled separately. The individual regression plots show the relationship strengthening from elementary to high school.

  • Elementary school rating: R² = .11.
  • Middle school rating: R² = .20.
  • High-school rating: R² = .28, the strongest school-price fit.
High-school ratings have the strongest school-price relationship. visualization 1
High-school ratings have the strongest school-price relationship. visualization 2
High-school ratings have the strongest school-price relationship. visualization 3
1 / 3

1 / 2

11 · Neighborhood patterns

Selling price rises from Red through Gold.

Mean selling price increases across the neighborhoods from Red to Gold. The standalone view establishes the price ordering before comparing it with the school-rating pattern.

  • Gold, Green, and Yellow have the highest mean selling prices.
  • Red and Purple are the lowest-price neighborhoods.
  • Purple’s low price should be interpreted cautiously because it has only three observations.
Selling price rises from Red through Gold. visualization 1
Selling price rises from Red through Gold. visualization 2
1 / 2

12 · Home type & value

Home type, location, and square footage add important context to price.

Single- and multi-family homes have the highest mean prices. Neighborhood composition varies across home types, while Purple has the highest average square footage despite its comparatively low average selling price.

  • Multi-family homes are concentrated in the five most expensive neighborhoods.
  • Single-family homes are closer in distribution to condos and townhouses than to multi-family homes.
  • Purple may offer more square footage per dollar, but its sample is very small.
Home type, location, and square footage add important context to price. visualization 1
Home type, location, and square footage add important context to price. visualization 2
Home type, location, and square footage add important context to price. visualization 3
1 / 3

13 · Price over time

Selling prices rise with year built across every home type.

The trend and scatterplot views both show prices trending upward as homes become newer. The home-type view makes the market segmentation visible again: single- and multi-family homes occupy the upper range, while condos and townhouses cluster lower.

  • Newer homes tend to sell for more in this dataset.
  • The two cluster trend lines rise at similar rates but have very different intercepts.
  • Home type remains a strong divider even when construction year is considered.
Selling prices rise with year built across every home type. visualization 1
Selling prices rise with year built across every home type. visualization 2
1 / 2

1 / 3

Key findings

01

Two market tiers

Condos and townhouses cluster at lower price points, while single- and multi-family homes form a higher-price segment.

02

Home features

Bedrooms, newer construction, heating, and fireplaces were all associated with higher selling prices.

03

School ratings

Assigned high-school rating was the strongest of the three school-rating predictors.

04

Yellow

High elementary-school ratings and a lower price tier than Gold and Green point to a potential growth opportunity.

05

Purple

The highest average square footage at a low price level is promising, but only three observations prevent a firm conclusion.

Recommendation

Prioritize Yellow for further market research, while treating Purple as a value hypothesis to validate.

  • Consider Yellow for families who value elementary education but may be priced out of Gold and Green.
  • Explore value-add opportunities in lower-priced neighborhoods, where heating and fireplaces align with higher prices.
  • Collect more Purple-neighborhood data before using its price-per-square-foot signal in decisions.
Read the full report ↗