Another nixtlar user <@U06HUECPYN5>! :tada: Seray ...
# support
t
Another nixtlar user @Mariana Menchero! 🎉 Seray Mirasci <Seray.Mirasci@lut.fi> has a question about something that's not working for them. Details in thread. Thank you!
1
Their dataset
m
thanks for letting me know @Tracy Teal from a first glance, it's because it is a tibble and the CRAN version only supports data frames and tsibbles
let me validate with the example they provided so we can answer them asap
🙏 1
t
Is it right that tibbles work in the development version? I can point them to that to try.
m
I haven't forgotten about this, is just that there is more than one issue with this use case.
t
Thanks, got it, and no problem! I'll just let them know we're looking into it.
m
1. It’s an excel file, so I’m assuming they’re using
read_excel
, which loads the data as tibble. No support for that on CRAN, but yes on the dev version on GitHub. However: 1. They use a sequence 1,2,3,… as unique_ids, so instead of having one series with 260 observations,
nixtlar
thinks it’s 260 series with 1 observation each. 2. Frequency is seconds (!), so they need to specify it since
nixtlar
can only deduce hourly and above. 3. When using
as.Date()
, the hms part disappears. And even after making the necessary changes, the call still fails 🤦‍♀️ I’m currently looking into it, and for the time being, we can tell them that.
t
great, thank you so much for looking into this
m
No, it was actually funny to find some many issues in such a small dataset 😅
I'll have an answer tonight or Monday at the latest.
t
😄 a what not to do example
I'll send them the update right now. So, Monday is definitely fine.
👍 1
m
Hi @Tracy Teal, as promised, the solution for this issue has now been implemented in
nixtlar
, so please ask the user to download the development version:
Copy code
devtools::install_github("Nixtla/nixtlar")
For this particular case, it is better to build a new data frame, specifying the format of the data, which is taken every second.
Copy code
Y_df <- readxl::read_excel("path/to/data/Output_Fyz_rev.xlsx", sheet = 1)

df <- data.frame(
 unique_id = "id", 
 ds = seq(as.POSIXct(Y_df$ds[1]), by = "1 sec", length.out = nrow(Y_df)), 
 y = as.numeric(Y_df$y)
)

df$ds <- format(df$ds, format = "%Y-%m-%d %H:%M:%S")
Given that
nixtlar
can’t deduce subhourly frequencies, it is necessary to set it directly with
freq="S"
.
Copy code
fc <- nixtla_client_forecast(df, h=8, id_col="unique_id", freq="S", level=c(80,95))
The forecast should look like this, same as with the Python SDK.
I know today is a holiday in the US, but I wanted to answer you so you can answer the user tomorrow 🙂
t
Thanks so much @Mariana Menchero! I'll share this.