efi_format: Format a fable fbl_ts forecast in EFI standard

View source: R/fable_helpers.R

efi_formatR Documentation

Format a fable fbl_ts forecast in EFI standard

Description

Format a fable fbl_ts forecast in EFI standard

Usage

efi_format(df, times = 10)

Arguments

df

a fbl_ts forecast

times

number of times to draw from distribution for ensemble method, ignored if distributions are normal.

Value

A data.frame (⁠[tsibble]⁠) in the EFI format

Examples


## Not run: 
library(dplyr)
library(readr)
library(fable)
aquatic <-
  read_csv("https://data.ecoforecast.org/neon4cast-targets/aquatics/aquatics-targets.csv.gz") %>%
  pivot_wider(names_from = "variable", values_from = "observation") %>%
  as_tsibble(index = datetime, key = site_id)
oxygen_fc <- aquatic %>%
  model(null = MEAN(oxygen)) %>%
  forecast(h = "35 days") %>%
  efi_format()
 
## End(Not run)

eco4cast/neon4cast documentation built on Sept. 14, 2024, 6:50 a.m.