From 9b42b60ef46a864437ba44d2dde6dabba9955a91 Mon Sep 17 00:00:00 2001 From: Kyle Belanger Date: Fri, 2 Aug 2024 14:33:00 -0400 Subject: [PATCH] update JFDA --- LearnJulia/src/JFDA.jl | 12 +++++++++++- Project.toml | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/LearnJulia/src/JFDA.jl b/LearnJulia/src/JFDA.jl index a9efa09..9798427 100644 --- a/LearnJulia/src/JFDA.jl +++ b/LearnJulia/src/JFDA.jl @@ -41,4 +41,14 @@ row_selector = (puzzles.NbPlays .> plays_lo) .&& good = puzzles[row_selector, ["Rating", "Popularity"]] -plot(histogram(good.Rating; label = "Rating"), histogram(good.Popularity; label = "Popularity")) \ No newline at end of file +plot(histogram(good.Rating; label = "Rating"), histogram(good.Popularity; label = "Popularity")) + +# Exercise 9.1 + +using StatsBase + +nb_100 = copy(puzzles[(puzzles.Popularity .== 100) , "NbPlays"]) +nbnot100 = copy(puzzles[(puzzles.Popularity .== -100) , "NbPlays"]) +summarystats(nb_100) +summarystats(nbnot100) + diff --git a/Project.toml b/Project.toml index cb0b823..3b648e1 100644 --- a/Project.toml +++ b/Project.toml @@ -3,3 +3,4 @@ CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" SQLite = "0aa819cd-b072-5ff4-a722-6bc24af294d9" +StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"