LoslegenKostenlos loslegen

Favorite genres

In this exercise, you will create a figure with multiple subplots that explore various aspects of the favorite music genres reported by survey respondents. Firstly, you will generate bar plots showing counts of the occurrences of each genre as a favorite, grouped by respondents who frequently listen to songs in foreign languages and those who do not. Next, you will create scatter plots to analyze the distributions of age and BPM (beats per minute) for each favorite genre. To accomplish this, you will need to define an advanced layout to combine these plots effectively.

The Plots package has already been loaded, and you can utilize the streaming DataFrame along with the counts DataFrame, which contains the genre counts per favorite and foreign language status.

Diese Übung ist Teil des Kurses

Introduction to Data Visualization with Julia

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

theme(:mute, markeralpha=0.25)
# Bar plots
p1 = bar(counts.____, counts.____,
	group=counts.____, linewidth=0,
    layout=____, alpha=0.75, ylabel="Frequency",
    color=[:dodgerblue3 :brown1],
    legend_title="Foreign Languages")
Code bearbeiten und ausführen