| import_ghcn_monthly_temp | R Documentation |
This function is a convenient way to access the monthly summaries of the
GHCN. Monthly average temperature is available via
import_ghcn_monthly_temp() and monthly precipitation via
import_ghcn_monthly_prcp(). Note that these functions can take a few
minutes to run, and parallelism is only enabled for precipitation data.
import_ghcn_monthly_temp(
table = c("inventory", "data"),
dataset = c("qcu", "qcf", "qfe")
)
import_ghcn_monthly_prcp(
station = NULL,
year = NULL,
table = c("inventory", "data"),
progress = rlang::is_interactive()
)
table |
Either |
dataset |
For
|
station |
For |
year |
One or more years of interest. If |
progress |
For |
a list of tibbles
If you are importing a lot of meteorological data, this can take a long
while. This is because each combination of year and station requires
downloading a separate data file from NOAA's online data directory, and the
time each download takes can quickly add up. Many data import functions in
{worldmet} can use parallel processing to speed downloading up, powered
by the capable {mirai} package. If users have any {mirai} "daemons"
set, these functions will download files in parallel. The greatest benefits
will be seen if you spawn as many daemons as you have cores on your
machine, although one fewer than the available cores is often a good rule
of thumb. Your mileage may vary, however, and naturally spawning more
daemons than station-year combinations will lead to diminishing returns.
# set workers - once per session mirai::daemons(4) # import lots of data - NB: no change in the import function! big_met <- import_ghcn_hourly(code = "UKI0000EGLL", year = 2010:2025)
Jack Davison
Other GHCN functions:
import_ghcn_countries(),
import_ghcn_daily(),
import_ghcn_hourly(),
import_ghcn_inventory(),
import_ghcn_stations()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.