IniziaInizia gratis

Instant and powdered coffee

In this exercise, you will analyze the prices of instant and powdered coffee in Indian markets. Grouped histograms are excellent tools for comparing different distributions side by side, mainly when simple statistical measures fall short of providing a comprehensive description of the data.

The DataFrames package has been imported for your convenience, and the coffee DataFrame is readily available for analysis.

Questo esercizio fa parte del corso

Introduction to Data Visualization with Julia

Visualizza il corso

Istruzioni dell'esercizio

  • Import the StatsPlots package
  • Create a grouped histogram using the Retail Price column from the coffee DataFrame.
  • Group the histogram by the Variety column
  • Select sandybrown and brown for the colors in that specific order.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# import StatsPlots
____ ____

# Create grouped histogram
____(
	coffee."____",
    # Define the group
    ____=coffee.____,
    # Choose colors
    ____=[____ ____]
)
title!("Cofee Prices in India")
xlabel!("Price (Rupees)")
ylabel!("Frequency")
Modifica ed esegui il codice