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

Lists are stored as strings in turbine library fetched from the OpenEnergy database #141

Open
jome1 opened this issue Jun 3, 2024 · 3 comments

Comments

@jome1
Copy link

jome1 commented Jun 3, 2024

When fetching all data with 'windpowerlib.data.store_turbine_data_from_oedb()', then listed data is stored as a string within the table. Why is it like this and what can be done, that the data is stored as a list in the respetice dataframe cell?

For example, the "power_curve_wind_speeds" is actually a list of wind speeds but when accessing the dataframe cell the data is there as a string.

@birgits
Copy link
Member

birgits commented Jun 4, 2024

Hi @jome1, I'm not quite sure I understand you correctly, but I think you mean, why are the power curve data stored as string in the csv file? The reason is, that pandas stores lists inside a dataframe that way. The windpowerlib handles that for you though. When reading the data from csv with this function, the string is converted back to a list of floats. Does that answer your question?

@jome1
Copy link
Author

jome1 commented Jun 4, 2024

Thanks so much for your fast and helpful response! (you understand my question correctly)

My general goal is to derive power curves in form of a 3-parameter logistical function. I am using the discrete power curve values from windpowerlib and apply a curve fitting.

When initializing a WindTurbine object, one has to also select the hub_heigt of the turbine_type. But the power curve is always the same in the database for every hub_height of a specific turbine_type. So I thought, I should just loop through the database (each row is one turbine_type and sometimes multiple hub_heights listed).

Just to clarify:
The API documentation lists under wind turbine data

  • data.store_turbine_data_from_oedb: accesses the oedb database, shows it and stores it locally?
  • wind_turbine.get_turbine_data_from_file: fetches turbine data from the locally stored csv file

So I could loop through all turbine_types and their power curves in the locally stored turbine data csv file? The respective turbine_type and the path to the locally stored csv file are passed as a parameter to wind_turbine.get_turbine_data_from_file

@birgits
Copy link
Member

birgits commented Jun 4, 2024

Glad I could help. And yes, everything you wrote is correct.

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

2 participants