Creating multivariate charts
What the previous recipe showed is that only a handful of houses with less than two bedrooms were sold in the Sacramento area. In the Visualizing the interactions between features recipe, we used D3.js to present the relationship between the price and floor area. In this recipe, we will add an another dimension to the two-dimensional chart, the number of bedrooms.
Getting ready
To execute this recipe, you will need the pandas
, SQLAlchemy
, and Bokeh
modules installed. No other prerequisites are required.
How to do it…
Bokeh
is a module that marries Seaborn
and D3.js: it produces visually appealing data visualizations (just like Seaborn
) and allows you to interact with the chart, using D3.js in the backend of the produced HTML file. Producing a similar chart in D3.js would require more coding. The source code for this recipe is contained in the data_multivariate_charts.py
file:
# prepare the query to extract the data from the database query = 'SELECT beds...