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

[Feature] Yield tracks with weather #131

Merged
merged 19 commits into from
Feb 12, 2025
Merged

Conversation

Vaishnav2804
Copy link
Collaborator

@Vaishnav2804 Vaishnav2804 commented Feb 10, 2025

Example usage:

from aisdb.weather.data_store import WeatherDataStore # for weather

# ...some code before...
tracks = aisdb.track_gen.TrackGen(rowgen, decimate=False)

weather_data_store = WeatherDataStore(['10v','10u'], start_time, end_time,"/home/CanadaV2)")
tracks = weather_data_store .yield_tracks_with_weather(tracks)

for t in tracks:
    print(f"'u-component' 10m wind for:\nlat: {t['lat'][0]} \nlon: {t['lon'][0]} \ntime: {t['time'][0]} \nis {t['weather_data']['u10'][0]} m/s")
    break

weather_data_store.close()

Output:

'u-component' 10m wind for:
lat: 50.003334045410156 
lon: -66.76000213623047 
time: 1690858823 
is 1.9680767059326172 m/s

@Vaishnav2804 Vaishnav2804 marked this pull request as draft February 10, 2025 23:31
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@Vaishnav2804 Vaishnav2804 marked this pull request as ready for review February 11, 2025 00:34
@Vaishnav2804 Vaishnav2804 marked this pull request as draft February 11, 2025 01:03
@gabrielspadon
Copy link
Collaborator

@Vaishnav2804, I took a quick look at the changes in your implementation.
I have nothing to add; I believe the design patterns I mentioned before are now covered.

Copy link
Collaborator

@tsuzzy tsuzzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Vaishnav2804 is working on finalizing the edge cases. This is going to be merged when everything is ready.

@Vaishnav2804 Vaishnav2804 marked this pull request as ready for review February 11, 2025 20:49
@Vaishnav2804 Vaishnav2804 requested a review from tsuzzy February 11, 2025 21:24
@Vaishnav2804 Vaishnav2804 self-assigned this Feb 11, 2025
@tsuzzy tsuzzy merged commit efb9fa9 into master Feb 12, 2025
14 checks passed
@tsuzzy tsuzzy deleted the FE/yield_tracks_with_weather branch February 12, 2025 13:48
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

Successfully merging this pull request may close these issues.

3 participants