【R】世界のナスの生産量

国連機関であるFood and Agriculture Organization of United Nationsが報告しているナスの生産量を図示してみます。

データはFood and agriculture dataから取得しました。しかし、少し扱いにくかったので、多少編集したものをこちらの置いておきます。

library(tidyverse)

dat <- read.csv("FAOSTAT_data_9-26-2020.csv", header = TRUE)

dat2 <- dat %>%
  select(-Flag) %>%
  drop_na() %>% 
  rename(val = Value) %>% 
  arrange(desc(val))

table_df<-data.frame(Country=dat2$Area, Value=dat2$val)

library(rworldmap)
mapDevice('x11')
sdat <- joinCountryData2Map(dat2, joinCode="NAME", nameJoinColumn="Area")
par(family="JP4")
mapCountryData(sdat, nameColumnToPlot="val", catMethod="fixedWidth", mapTitle = "Eggplant production [ton](2018)", addLegend = TRUE)

library(kabel)
library(kableExtra)
library(clipr)
kable(table_df, align = "c") %>%
  kable_styling(full_width = F) %>%
  column_spec(1, bold = T) %>%
  collapse_rows(columns = 1, valign = "middle") %>%
  write_clip
Country Value
China 34137557
India 12826000
Egypt 1409202
Turkey 836284
Iran (Islamic Republic of) 666838
Indonesia 551552
Japan 300400
Italy 298313
Philippines 244838
Spain 238325
Algeria 181618
Mexico 179656
Romania 137829
Sri Lanka 129212
Syrian Arab Republic 128290
Iraq 113699
United States of America 103003
C?te d’Ivoire 100146
Kazakhstan 95233
Sudan 92558
Pakistan 87587
Mali 80528
Azerbaijan 79724
Jordan 71473
Greece 70940
Ukraine 68510
Palestine 59480
Netherlands 55000
Rwanda 53277
Ghana 53114
Morocco 52754
Israel 51404
Democratic People’s Republic of Korea 48561
Guyana 47992
Lebanon 41621
Oman 32214
France 31989
Albania 31491
Malawi 29242
Kuwait 27601
Dominican Republic 26851
Saudi Arabia 25384
United Arab Emirates 20859
Thailand 19926
Venezuela (Bolivarian Republic of) 17206
Bulgaria 11260
Uzbekistan 10935
Belgium 10120
Honduras 9948
Niger 8512
Republic of Korea 5472
Portugal 5209
Republic of Moldova 5022
Yemen 4809
Georgia 3700
Senegal 3655
Libya 3529
Colombia 3524
Qatar 2902
Congo 2651
Mauritius 2495
Fiji 2424
Cameroon 2386
Cyprus 2335
Lithuania 2200
Serbia 2040
Madagascar 2035
Bahrain 1456
Austria 1130
French Guyana 1100
North Macedonia 1035
R茅union 1034
Puerto Rico 887
Tunisia 884
Hungary 867
Haiti 856
Malta 838
Bhutan 658
Kyrgyzstan 563
Martinique 499
Trinidad and Tobago 488
Peru 476
Antigua and Barbuda 416
Jamaica 385
Brunei Darussalam 283
Gabon 244
New Caledonia 183
American Samoa 155
Guadeloupe 144
Costa Rica 96
Djibouti 55
Guam 33

Add a Comment

メールアドレスが公開されることはありません。