library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✔ ggplot2 3.4.2 ✔ purrr 1.0.1
## ✔ tibble 3.2.1 ✔ dplyr 1.1.2
## ✔ tidyr 1.1.4 ✔ stringr 1.4.0
## ✔ readr 2.1.4 ✔ forcats 1.0.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
market_data_raw <-
readr::read_csv("tairyo_navi_Flounder_teaching2023.csv")
## Rows: 1937 Columns: 10
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (4): Market, Gear_Type, Species, Standard
## dbl (5): Landing_Amount, Landing_Price, Highest_Price, Average_Price, Lowes...
## date (1): Landing_Date
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
market_data_raw |> distinct(Gear_Type)
## # A tibble: 11 × 1
## Gear_Type
## <chr>
## 1 底刺網
## 2 小延縄
## 3 定置網
## 4 底びき網
## 5 その他
## 6 磯建網
## 7 底延縄
## 8 小延縄(新)
## 9 かご
## 10 搬入
## 11 一本釣り
market_data_raw |> ggplot(aes(x = Gear_Type)) + geom_bar() + theme(text = element_text(family = "HiraKakuPro-W3"))
## Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): Windows のフォ
## ントデータベースにフォントファミリが見付かりません
## Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): Windows のフォ
## ントデータベースにフォントファミリが見付かりません
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## Windows のフォントデータベースにフォントファミリが見付かりません
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## Windows のフォントデータベースにフォントファミリが見付かりません
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## Windows のフォントデータベースにフォントファミリが見付かりません
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## Windows のフォントデータベースにフォントファミリが見付かりません
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## Windows のフォントデータベースにフォントファミリが見付かりません
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## Windows のフォントデータベースにフォントファミリが見付かりません
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## Windows のフォントデータベースにフォントファミリが見付かりません

market_data_raw |> group_by(Gear_Type) |> summarize(n =n())
## # A tibble: 11 × 2
## Gear_Type n
## <chr> <int>
## 1 かご 107
## 2 その他 152
## 3 一本釣り 18
## 4 定置網 814
## 5 小延縄 100
## 6 小延縄(新) 13
## 7 底びき網 41
## 8 底刺網 516
## 9 底延縄 17
## 10 搬入 29
## 11 磯建網 130
market_data_raw |> distinct(Standard)
## # A tibble: 4 × 1
## Standard
## <chr>
## 1 活魚
## 2 山
## 3 生鮮
## 4 不明
market_data_raw |> ggplot(aes(x = Standard)) + geom_bar() + theme(text = element_text(family = "HiraKakuPro-W3"))
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## Windows のフォントデータベースにフォントファミリが見付かりません
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## Windows のフォントデータベースにフォントファミリが見付かりません
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## Windows のフォントデータベースにフォントファミリが見付かりません
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## Windows のフォントデータベースにフォントファミリが見付かりません
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## Windows のフォントデータベースにフォントファミリが見付かりません
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## Windows のフォントデータベースにフォントファミリが見付かりません
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## Windows のフォントデータベースにフォントファミリが見付かりません
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## Windows のフォントデータベースにフォントファミリが見付かりません

market_data_raw |> group_by(Standard) |> summarize(n =n())
## # A tibble: 4 × 2
## Standard n
## <chr> <int>
## 1 不明 302
## 2 山 173
## 3 活魚 719
## 4 生鮮 743