forked from frequenz-floss/frequenz-api-weather
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert a page of historical location forecast data into a flattened …
…numpy array for easier use (frequenz-floss#89) - Enable the conversion of protobuf LocationForecast list to a flattened numpy array. - Enhance the historical data retrieval example with conversion to a pandas dataframe, sample output: ``` (sdk_venv22) david@david-desktop:~/projects/frequenz/source/frequenz-api-weather$ PYTHONPATH=py python examples/iterate_hist_forecast.py "localhost:50051" creation_ts latitude longitude valid_at_ts feature value 0 2022-06-27 12:00:00 52.5 13.4 2022-06-27 13:00:00 ForecastFeature.U_WIND_COMPONENT_100_METRE -2.629823 1 2022-06-27 12:00:00 52.5 13.4 2022-06-27 13:00:00 ForecastFeature.V_WIND_COMPONENT_100_METRE 2.316034 2 2022-06-27 12:00:00 52.5 13.4 2022-06-27 14:00:00 ForecastFeature.U_WIND_COMPONENT_100_METRE -2.439865 3 2022-06-27 12:00:00 52.5 13.4 2022-06-27 14:00:00 ForecastFeature.V_WIND_COMPONENT_100_METRE 1.965858 4 2022-06-27 12:00:00 52.5 13.4 2022-06-27 15:00:00 ForecastFeature.U_WIND_COMPONENT_100_METRE -1.6119 .. ... ... ... ... ... ... 337 2023-12-18 00:00:00 52.5 13.4 2023-12-18 22:00:00 ForecastFeature.V_WIND_COMPONENT_100_METRE 4.606584 338 2023-12-18 00:00:00 52.5 13.4 2023-12-18 23:00:00 ForecastFeature.U_WIND_COMPONENT_100_METRE 11.596823 339 2023-12-18 00:00:00 52.5 13.4 2023-12-18 23:00:00 ForecastFeature.V_WIND_COMPONENT_100_METRE 4.560944 340 2023-12-18 00:00:00 52.5 13.4 2023-12-19 00:00:00 ForecastFeature.U_WIND_COMPONENT_100_METRE 11.380841 341 2023-12-18 00:00:00 52.5 13.4 2023-12-19 00:00:00 ForecastFeature.V_WIND_COMPONENT_100_METRE 4.240217 [342 rows x 6 columns] ``` Closes frequenz-floss#88.
- Loading branch information
Showing
3 changed files
with
133 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters