using CSV
using DataFrames
using Plots
using DataSets
using StatsPlots
using Tar

project = DataSets.load_project!(path"zoo.toml")

full_file = open(Vector{UInt8}, dataset("zoo")) do buf
    CSV.read(buf, DataFrame)
end

groupedbar(full_file.Month,
           [full_file.Max_age full_file.Min_age],
           labels = ["Max_age" "Min_age"],
           title = "Max/min age of purchased animals",
           size = (925, 450))
mkdir("results")
savefig("results/animalsAge.pdf")
scatter(full_file.Animal,
        full_file.Count,
        labels = "total number",
        title = "Total number of purchased animals",
        size=(925, 450))
savefig("results/animalsCount.pdf")
