Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems to load data from WeatherReport.jl #19

Open
NoelAraujo opened this issue May 23, 2024 · 0 comments
Open

Problems to load data from WeatherReport.jl #19

NoelAraujo opened this issue May 23, 2024 · 0 comments

Comments

@NoelAraujo
Copy link

Hello,

I'm trying to work with temperatures extracted from WeatherReport.jl and forecast next month heat wave. Check the minimal working example below

Important: the data from export_to_sqlite is exported inside on the root folder from the WeatherReport.jl and I had to copy and paste the sqlite file manually into my working directory

In my case, the sql file was on: /home/noel/.julia/packages/WeatherReport/akdwz/export

using WeatherReport
export_to_sqlite("Araraquara", start_date = "2020-01-01", end_date = "2023-12-31")

using SQLite, DataFrames, ArarForecast, TimeSeries, Dates
db_train = SQLite.DB("Araraquara_all.sqlite")
df_train = DBInterface.execute(db_train, "SELECT * FROM temperature_2m") |> DataFrame

_dates = Date.(df_train[:,"TIME"], dateformat"yyyy-mm-dd HH:MM:SS")
_data = df_train[:, "temperature_2m"]
# _data = rand(length(_dates)) # for tests
_train = (date = _dates, data = _data);
train = TimeArray(_train; timestamp = :date)

p = 30
fc = arar(train, p, Day)

I get an error message about vector and scalar types, even though I am using the correct TimeArray input.

Screenshot from 2024-05-23 13-30-26

I don't know that to think, for instance, if I change the content of _data to random numbers, everything works as expected.

Any suggestion on what am I missing?

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant