BaşlayınÜcretsiz Başlayın

Average building size

The estate agents are interested in understanding if there have been changes in building size over time.

You will group the melb dataset by date and calculate the average building size. You will then convert the grouped DataFrame into a Bokeh source object and build a line plot.

Bu egzersiz

Interactive Data Visualization with Bokeh

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Group melb by date and calculate the mean of "building_area".
  • Create fig, labeling the x and y-axes as "Date" and "Building Size (Meters Squared)", respectively, and setting the x-axis ticks to datetime format.
  • Add line glyphs to fig to visualize building_area versus date, using source.
  • Generate an HTML file called "property_size_by_date.html".

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Group by date and calculate average building size
prop_size = melb.____("____", as_index=False)["____"].____()
source = ColumnDataSource(data=prop_size)

# Create the figure
fig = figure(x_axis_label="____", y_axis_label="____", x_axis_type="____")

# Add line glyphs
fig.____(____)

# Generate the HTML file
____
show(fig)
Kodu Düzenle ve Çalıştır