In this assigment, I will briefly look at the “İzmir Fish Market Prices” data and try to make short inferences.
Installation of the package we need and the dataset we will be working with.
library(tidyverse)
hal <- read.csv("balik_hal_fiyatlari.csv",sep=';',fileEncoding = "utf-8")
First 6 rows of the data
head(hal)
str(hal)
Data type of TARIH columns is “character”. We need to change it to the “date” type to work with.
hal$TARIH <- as.Date(hal$TARIH)
Monthly distribution of deniz çipurası price
denizcip <- hal %>%
filter(MAL_TURU == "BALIK", MAL_ADI == "ÇIPURA (DENİZ)") %>%
mutate(avgdcipd = (ASGARI_UCRET + AZAMI_UCRET)/2) %>%
group_by(MAL_ADI,AY = lubridate::month(TARIH)) %>%
summarise(avgdcipm = mean(avgdcipd))
d_ay <- unique(denizcip$AY)
ggplot(denizcip, aes(d_ay, avgdcipm)) + geom_line() + scale_x_discrete(label = c("January", "February", "March", "April", "May", "June", "July", "August", "September", "October"), "Months", limits=c(1:10))
Monthly distribution of kültür çipurası price
kulturcip <- hal %>%
filter(MAL_TURU == "KÜLTÜR", MAL_ADI == "ÇİPURA ( KÜLTÜR )") %>%
mutate(avgkcipd = (ASGARI_UCRET + AZAMI_UCRET)/2) %>%
group_by(MAL_ADI,AY = lubridate::month(TARIH)) %>%
summarise(avgkcipm = mean(avgkcipd))
k_ay <- unique(kulturcip$AY)
ggplot(kulturcip, aes(k_ay, avgkcipm)) + geom_line() + scale_x_discrete(label = c("January", "February", "March", "April", "May", "June", "July", "August", "September", "October"), "Months", limits=c(1:10))
February is the best month to eat both deniz çipurası and kültür çipurası for cheap.
The average price of deniz çipurası is higher than the average price of kültür çipurası throughout the year.