Decreasing of salmon population in wild habitat are cause by over fishing and developed on the river stream such as a dam. Because salmons are Anadromous they are swiming against the river flow from the ocean and back to the freshwater for spawning.
Helo, Welcome to My Rmd In this Rmd I would explore a little bit about salmon.
Data source is from FAO. There are a lot of species, however Im only need a commercial salmon species. I wont to know about the source, which country? and what the metodologi used to harvest salmon?
Decreasing of salmon population in wild habitat are cause by over fishing and developed on the river stream such as a dam. Because salmons are Anadromous they are swiming against the river flow from the ocean and back to the freshwater for spawning.
I only chose 7 species of salmon and for column I chose Country, Source, Species, Year, and Quantity
and then assign to the salmon data frame
str(salmon)
tibble [6,724 × 5] (S3: tbl_df/tbl/data.frame)
$ COUNTRY : chr [1:6724] "643" "643" "643" "643" ...
$ SOURCE : num [1:6724] 4 4 4 4 4 4 4 4 4 4 ...
$ SPECIES : chr [1:6724] "SAL" "CHE" "CHE" "CHE" ...
$ YEAR : num [1:6724] 1988 1995 1994 1993 1992 ...
$ QUANTITY: num [1:6724] 89 4 4 0 0 0 0 0 0 381 ...
There is no missing data in salmon data frame
Check country code
unique(salmon$COUNTRY)
[1] "643" "410" "666" "840" "724" "810" "752" "124" "152" "208" "233"
[12] "234" "250" "246" "276" "304" "352" "372" "833" "392" "428" "440"
[23] "528" "554" "578" "616" "620" "826" "300" "408" "196" "036" "792"
[34] "376" "100"
Interpret county code
negara <- country [ country$UN_Code %in% c("643", "410", "666", "840", "724",
"810", "752", "124", "152", "208",
"233", "234", "250", "246", "276",
"304", "352", "372", "833", "392",
"428", "440", "528", "554", "578",
"616", "620", "826", "300", "408",
"196", "36", "792", "376", "100") , ]
negara$Name_En
[1] "Bulgaria" "Canada"
[3] "Chile" "Cyprus"
[5] "Denmark" "Estonia"
[7] "Faroe Islands" "Finland"
[9] "France" "Germany"
[11] "Greece" "Greenland"
[13] "Iceland" "Ireland"
[15] "Israel" "Japan"
[17] "Korea, Dem. People's Rep" "Korea, Republic of"
[19] "Latvia" "Lithuania"
[21] "Netherlands" "New Zealand"
[23] "Norway" "Poland"
[25] "Portugal" "Russian Federation"
[27] "St. Pierre and Miquelon" "Spain"
[29] "Sweden" "Turkey"
[31] "Un. Sov. Soc. Rep." "United Kingdom"
[33] "Isle of Man" "United States of America"
There are 34 countries in salmon data frame, however according to the FAO there are only 14 countries that contribute to the global salmon trade, So I just convert 14 countries to the salmon data frame.
salmon$COUNTRY[salmon$COUNTRY=="578"]<-"Norway"
salmon$COUNTRY[salmon$COUNTRY=="152"]<-"Chile"
salmon$COUNTRY[salmon$COUNTRY=="752"]<-"Sweden"
salmon$COUNTRY[salmon$COUNTRY=="208"]<-"Denmark"
salmon$COUNTRY[salmon$COUNTRY=="616"]<-"Poland"
salmon$COUNTRY[salmon$COUNTRY=="826"]<-"United Kingdom"
salmon$COUNTRY[salmon$COUNTRY=="840"]<-"United States of America"
salmon$COUNTRY[salmon$COUNTRY=="124"]<-"Canada"
salmon$COUNTRY[salmon$COUNTRY=="250"]<-"France"
salmon$COUNTRY[salmon$COUNTRY=="276"]<-"Germany"
salmon$COUNTRY[salmon$COUNTRY=="528"]<-"Netherlands"
salmon$COUNTRY[salmon$COUNTRY=="392"]<-"Japan"
salmon$COUNTRY[salmon$COUNTRY=="724"]<-"Spain"
salmon$COUNTRY[salmon$COUNTRY=="643"]<-"Russian Federation"
unique(salmon$COUNTRY)
[1] "Russian Federation" "410"
[3] "666" "United States of America"
[5] "Spain" "810"
[7] "Sweden" "Canada"
[9] "Chile" "Denmark"
[11] "233" "234"
[13] "France" "246"
[15] "Germany" "304"
[17] "352" "372"
[19] "833" "Japan"
[21] "428" "440"
[23] "Netherlands" "554"
[25] "Norway" "Poland"
[27] "620" "United Kingdom"
[29] "300" "408"
[31] "196" "036"
[33] "792" "376"
[35] "100"
Subset 14 countires
salmon <- salmon[ salmon$COUNTRY %in% c("Norway", "Chile", "Sweden", "Denmark", "Poland",
"United Kingdom", "United States of America", "Canada",
"France", "Germany", "Netherlands", "Japan", "Spain",
"Russian Federation") , ]
unique(salmon$COUNTRY)
[1] "Russian Federation" "United States of America"
[3] "Spain" "Sweden"
[5] "Canada" "Chile"
[7] "Denmark" "France"
[9] "Germany" "Japan"
[11] "Netherlands" "Norway"
[13] "Poland" "United Kingdom"
Interpret code of source
source
# A tibble: 5 × 5
Identifier Code Name_En Name_Fr Name_Es
<dbl> <chr> <chr> <chr> <chr>
1 5 AQUACULTURE Aquaculture p… Production de… Producción d…
2 1 FRESHWATER Aquaculture p… Production de… Producción d…
3 2 BRACKISHWATER Aquaculture p… Production de… Producción d…
4 3 MARINE Aquaculture p… Production de… Producción d…
5 4 CAPTURE Capture produ… Captures Capturas
Check code of source on salmon data frame
unique(salmon$SOURCE)
[1] 4 1 3
There are only 3 of 5 source in the salmon data frame So now convert the code to the name
salmon$SOURCE[salmon$SOURCE=="1"]<-"Freshwater Aquaculture"
salmon$SOURCE[salmon$SOURCE=="3"]<-"Marine Aquaculture"
salmon$SOURCE[salmon$SOURCE=="4"]<-"Capture Fishery"
unique(salmon$SOURCE)
[1] "Capture Fishery" "Freshwater Aquaculture"
[3] "Marine Aquaculture"
Interpret species code
convert the code to spacies name
salmon$SPECIES[salmon$SPECIES=="SAL"]<-"Atlantic Salmon"
salmon$SPECIES[salmon$SPECIES=="PIN"]<-"Humpback Salmon"
salmon$SPECIES[salmon$SPECIES=="CHU"]<-"Keta Salmon"
salmon$SPECIES[salmon$SPECIES=="CHE"]<-"Cherry Salmon"
salmon$SPECIES[salmon$SPECIES=="SOC"]<-"Red Salmon"
salmon$SPECIES[salmon$SPECIES=="CHI"]<-"King Salmon"
salmon$SPECIES[salmon$SPECIES=="COH"]<-"Silver Salmon"
unique(salmon$SPECIES)
[1] "Atlantic Salmon" "Cherry Salmon" "Red Salmon"
[4] "King Salmon" "Silver Salmon" "Keta Salmon"
[7] "Humpback Salmon"
Im just need year at 2018 so, i subset it
salmon <- salmon[ salmon$YEAR == 2018, ]
salmon <- salmon[ , c("COUNTRY", "SOURCE", "SPECIES", "QUANTITY")]
Now the data is ready to explore
salmon_species <- as.data.frame(sort(prop.table(table(droplevels(salmon[ , "SPECIES" ]))),
decreasing = T))
names(salmon_species)[1] <- paste("Salmon Species")
head(salmon_species, 3)
Salmon Species Freq
1 Atlantic Salmon 0.4393939
2 Humpback Salmon 0.1212121
3 Silver Salmon 0.1212121
Ok this is the top 3 of the most popular salmon
I try to make a pie chart
First, Atlantic Salmon
Atlantic_Salmon_Source <- as.data.frame(sort(prop.table(table(droplevels(salmon[salmon$SPECIES == "Atlantic Salmon","SOURCE"]))),decreasing = T))
names(Atlantic_Salmon_Source)[1] <- paste("Atlantic Salmon")
Atlantic_Salmon_Source
Atlantic Salmon Freq
1 Capture Fishery 0.6206897
2 Marine Aquaculture 0.2758621
3 Freshwater Aquaculture 0.1034483
So capture fisheries practice is still being carried out, even though this species is already under threat
Second, Humpback Salmon
Humpback_Salmon_Source <- as.data.frame(sort(prop.table(table(droplevels(salmon[salmon$SPECIES == "Humpback Salmon","SOURCE"]))),decreasing = T))
names(Humpback_Salmon_Source)[1] <- paste("Humpback Salmon")
Humpback_Salmon_Source
Humpback Salmon Freq
1 Capture Fishery 0.875
2 Marine Aquaculture 0.125
Third, Silver Salmon
Silver_Salmon_Source <- as.data.frame(sort(prop.table(table(droplevels(salmon[salmon$SPECIES == "Silver Salmon","SOURCE"]))),decreasing = T))
names(Silver_Salmon_Source)[1] <- paste("Silver Salmon")
Silver_Salmon_Source
Silver Salmon Freq
1 Capture Fishery 0.625
2 Marine Aquaculture 0.250
3 Freshwater Aquaculture 0.125
From three species above, the conclusion is capture fisheries still dominate the output of production.
I am curious, what species are cultivated? Start from Freshwater Aquaculture
Freshwater_Aquaculture <- as.data.frame(sort(table(droplevels(salmon[salmon$SOURCE == "Freshwater Aquaculture",
"SPECIES"]))),decreasing = T)
names(Freshwater_Aquaculture)[1] <- paste("Freshwater Aquaculture")
Freshwater_Aquaculture
Freshwater Aquaculture Freq
1 Keta Salmon 1
2 Silver Salmon 1
3 Atlantic Salmon 3
Ok now from Marine Aquaculture
Marine_Aquaculture <- as.data.frame(sort(table(droplevels(salmon[salmon$SOURCE == "Marine Aquaculture",
"SPECIES"]))),decreasing = T)
names(Marine_Aquaculture)[1] <- paste("Marine Aquaculture")
Marine_Aquaculture
Marine Aquaculture Freq
1 Humpback Salmon 1
2 Silver Salmon 2
3 Atlantic Salmon 8
So based on the data above, not only top three species, but keta salmon is also cultivated
which countries did cultivation? From Freshwater Aquaculture First
Country_Freshwater_Aquaculture <- as.data.frame(sort(table(droplevels(salmon[salmon$SOURCE == "Freshwater Aquaculture" , "COUNTRY"]))),decreasing = T)
names(Country_Freshwater_Aquaculture)[1] <- paste("Freshwater Aquaculture")
Country_Freshwater_Aquaculture
Freshwater Aquaculture Freq
1 Denmark 1
2 Chile 2
3 Russian Federation 2
And then Marine Aquaculture
Country_Marine_Aquaculture <- as.data.frame(sort(table(droplevels(salmon[salmon$SOURCE == "Marine Aquaculture" , "COUNTRY"]))),decreasing = T)
names(Country_Marine_Aquaculture)[1] <- paste("Marine Aquaculture")
Country_Marine_Aquaculture
Marine Aquaculture Freq
1 France 1
2 Japan 1
3 Norway 1
4 United Kingdom 1
5 United States of America 1
6 Canada 2
7 Chile 2
8 Russian Federation 2
Only Chile and Russia did both cultivation, however how about the production results?
Before that I need to aggregate
salmon_country_agg <- aggregate(QUANTITY ~ COUNTRY + SOURCE , salmon , sum)
fresh_aquaculture_country <- salmon_country_agg[ salmon_country_agg$SOURCE == "Freshwater Aquaculture", ]
fresh_aquaculture_country
COUNTRY SOURCE QUANTITY
13 Chile Freshwater Aquaculture 683.38
14 Denmark Freshwater Aquaculture 1030.00
15 Russian Federation Freshwater Aquaculture 0.00
I was surprised, it turned out that Russia did not produce Freshwater Aquaculture in 2018
marine_aquaculture_country <- salmon_country_agg[ salmon_country_agg$SOURCE == "Marine Aquaculture", ]
marine_aquaculture_country_sorted <- marine_aquaculture_country[order(-marine_aquaculture_country$QUANTITY, marine_aquaculture_country$COUNTRY),]
marine_aquaculture_country_sorted
COUNTRY SOURCE QUANTITY
20 Norway Marine Aquaculture 1282003.2
17 Chile Marine Aquaculture 808975.8
22 United Kingdom Marine Aquaculture 166000.0
16 Canada Marine Aquaculture 123184.0
21 Russian Federation Marine Aquaculture 20632.0
19 Japan Marine Aquaculture 18000.0
23 United States of America Marine Aquaculture 16107.0
18 France Marine Aquaculture 300.0
as well known Norway definitely the highest of Salmon production in Marine Aquaculture
So it is actually not easy to cultivate salmon, but the positive thing is that many technologies have been developed to cultivate salmon. Cultivation is also not always positive, the cons is that production costs are too expensive. My assumptions, an easy solution to keep the population of salmon still sustainable is to limit the catch by weight or by fishing season, and improve the technologies for Aquaculture to make the cost is cheaper. I think that is enough, thanks for reading my Rmd.
http://www.fao.org/fishery/statistics/global-production/en
Cover photo by Marcos Paulo Prado on Unsplash
This article also available on Medium and Rpubs
Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".
For attribution, please cite this work as
Nugroho (2022, Jan. 9). fajardwnugroho: Wicked Salmon. Retrieved from https://fajardwnugroho.netlify.app/posts/2021-07-26-wicked-salmon/
BibTeX citation
@misc{nugroho2022wicked,
author = {Nugroho, Fajar},
title = {fajardwnugroho: Wicked Salmon},
url = {https://fajardwnugroho.netlify.app/posts/2021-07-26-wicked-salmon/},
year = {2022}
}