using CSV, DataFrames, StatsPlots
spotify_filepath = "data//archive//museum_visitors.csv";
museum_data = CSV.read(spotify_filepath, DataFrame);
last(museum_data, 5)
Date | Avila Adobe | Firehouse Museum | Chinese American Museum | America Tropical Interpretive Center | |
---|---|---|---|---|---|
1 | 2018-07-01 | 23136 | 4191 | 2620 | 4718 |
2 | 2018-08-01 | 20815 | 4866 | 2409 | 3891 |
3 | 2018-09-01 | 21020 | 4956 | 2146 | 3180 |
4 | 2018-10-01 | 19280 | 4622 | 2364 | 3775 |
5 | 2018-11-01 | 17163 | 4082 | 2385 | 4562 |
# How many visitors did the Chinese American Museum
# receive in July 2018?
ca_museum_jul18 = 2620
2620
19280-4622
14658
# In October 2018, how many more visitors did Avila
# Adobe receive than the Firehouse Museum?
avila_oct18 = 14658
14658
#gr(size=(1000,700))
@df museum_data plot(museum_data.Date, cols(2:5), xlabel="Date", title="Monthly Visitors to Los Angeles City Museums")
propertynames(museum_data)
5-element Vector{Symbol}: :Date Symbol("Avila Adobe") Symbol("Firehouse Museum") Symbol("Chinese American Museum") Symbol("America Tropical Interpretive Center")
p = @df museum_data plot(museum_data.Date, cols(2), title="Monthly Visitors to Avila Adobe", xlabel="Date",ylabel="Avila Adobe", legend=false, grid=false)
Built with Julia 1.9.1 and
CSV 0.10.9DataFrames 1.5.0
StatsPlots 0.15.4
To run this tutorial locally, download [this file](/tutorials/museum03x02.jl) and open it with Pluto.jl._