Skip to main content
100%

Scatter Plot with Menus for Boston Housing Dataset

✓ Published1🌍 Public
Yyuzhang21
Last edited Oct 2, 2019
Created on Oct 1, 2019

This interactive scatter plot explores correlations among variables in the Boston Housing Dataset, which includes 14 attributes such as crime rate, room count, and median home value. Users select any two variables from dropdown menus to map to the X and Y axes, while point color encodes proximity to the Charles River, size reflects pupil-teacher ratio, and 35% opacity reveals overlapping points. The visualization uses React with d3.scaleLinear and d3.scaleOrdinal for scaling, SVG for rendering, and fetches CSV data via d3.csv, with tooltips showing median home value.

AI-generated description

A scatter plot of any two variables in Boston Housing Dataset.

In this dataset, the target variable is: "medv", which is the median value of owner-occupied homes. Because there are total 14 columns, we need to see the correlation among different variables to make sense of the data. Selection menus for both X and Y offers an excellent way for us to review the correlation between any two variables. Not only for the relationship to the target variable, but also for any pair of variables. In addition to X, Y channels, the point color is fixed to use "chas" variable, which indicates whether the house is near Charles river. And point size is mapped to "ptratio" - the pupil-teacher ratio of the town. Point transparency is set to 35% so that overlapping can be revealed by the darkness of the color. Also tooltips is set to target variable, which is the medium home value. Here we only allow menu to make changes to X, Y channels. But other channels can be changed in the similar way if we connect them with the menus.

The original data comes from the github: Boston Housing Data

MIT Licensed

Similar vizzes