head(aquaculture)
# Add species columns
aqua <- merge(aquaculture, species)
# Top 10 aquaculture species in 2023, production in tonnes
x <- aggregate(value~species_name, aqua, sum, subset=year==2023)
x$value <- round(x$value)
head(x[order(-x$value),], 10)
# Total aquaculture production by major taxa since 1950, in million tonnes
aggregate(value~tolower(major), aqua, function(x) round(sum(x/1e6)))
# Annual aquaculture production of all animals
x <- aggregate(value~year, aqua, sum, subset=yearbook != "Aquatic plants")
plot(value/1e6~year, x, ylab="million tonnes", type="l")
title(main="Aquaculture production: All animals")
Run the code above in your browser using DataLab