rWBclimate: A package for accessing World Bank climate data

> library(rWBclimate)

バージョン: 0.1.3


関数名 概略
Africa_basin Basin codes for Africa, used in downloading maps
Africa_country Country codes for all of Africa
Asia_basin Basin codes for Asia, used in downloading maps
Asia_country Country codes for all of Asia
Eur_basin Basin codes for Eur, used in downloading maps
Eur_country Country codes for all of Eur
NoAm_basin Basin codes for NoAm, used in downloading maps
NoAm_country Country codes for all of NoAm
Oceana_basin Basin codes for Oceana, used in downloading maps
Oceana_country Country codes for all of Oceana
SoAm_basin Basin codes for SoAm, used in downloading maps
SoAm_country Country codes for all of SoAm
check_ISO_code check country codes
check_locator Checks for what kind of locator a user input
climate_map Map climate data codes isocodes data
create_map_df Create mapable dataframe
date_correct correct data values
download_kml Download kml files
get_climate_data get_climate_data
get_data_recursive wratpper for get_climate_data()
get_ensemble_climate_data Download ensemble climate data
get_ensemble_data_recursive Wrapper for get_ensemble_climate_data()
get_ensemble_precip Download ensemble precipitation data
get_ensemble_stats Download ensemble statistics
get_ensemble_temp Download ensemble temperature data
get_historical_data Download historical climate data
get_historical_data_recursive Download historical climate data recursively
get_historical_precip Download historical precipitation data
get_historical_temp Download historical temperature data
get_model_precip Download GCM precipitation data
get_model_temp Download GCM temperature data
kml_to_sp Convert kml to polygon
rWBclimate rWBclimate

check_ISO_code

文字列がISOコードに含まれるか

Arguments

  • iso
> rWBclimate:::check_ISO_code("USA")
[1] TRUE

check_locator

> rWBclimate:::check_locator("USA")
[1] "country"

climate_map

create_map_df

Arguments

  • map_df
  • data_df
  • return_map... ggplot2の図として描画するかのオプション。初期値でFALSE。データフレームオブジェクトが返される。
> options(kmlpath =  paste(Sys.getenv("HOME"), "Dropbox/maps", "kml", sep = "/"))
> df_map_jpn <- create_map_df(locator = "JPN")

  |                                                                       
  |                                                                 |   0%
  |                                                                       
  |=================================================================| 100%

get_climate_data

気候データの入手

Arguments

  • locator
  • geo_type
  • type... データのタイプ。mavg -> 月平均値、annualavg -> 年平均値
  • cvar... pr -> 降水量、tas -> 気温(摂氏)
  • start
  • end
> get_climate_data(locator = c("JPN", "VUT", "DEU"), 
+                  geo_type = "country", 
+                  type = "annualavg", 
+                  cvar = "tas", 
+                  start = 2000, 
+                  end = 2020)

get_ensemble_climate_data

> get_ensemble_climate_data(locator, geo_type, type, cvar, start, end)

get_ensemble_stats

>  ens_dat <- get_ensemble_stats("USA","mavg","ppt_days2")

get_historical_data

> get_historical_data(locator, cvar, time_scale)

kml_to_sp

> kml_to_sp(map_df, df = NULL, crs_string = "+proj=longlat +datum=WGS84")