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

Filter on name #27

Merged
merged 5 commits into from Nov 18, 2019
Merged

Filter on name #27

merged 5 commits into from Nov 18, 2019

Conversation

KitBurgess
Copy link
Contributor

No description provided.

Comment on lines +15 to 27
from vortexasdk import CargoMovements, Vessels

print(f'Running {__file__}')

# Search for all the VLCC vessel IDs
vlccs = [v['id'] for v in Vessels().search(vessel_classes='vlcc')]

# Find all country level geographies with China in the name.
china = [g['id'] for g in Geographies().search("china") if 'country' in g['layer']]

df = CargoMovements().search(
filter_vessels=vlccs,
filter_destinations=china,
filter_destinations="China",
filter_time_min="2019-08-29T00:00:00.000Z",
filter_time_max="2019-10-30T00:00:00.000Z",
).to_df()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the key new functionality here

@KitBurgess KitBurgess marked this pull request as ready for review November 18, 2019 12:07
@KitBurgess
Copy link
Contributor Author

This will close #17

syed1992
syed1992 previously approved these changes Nov 18, 2019
tests/test_id.py Outdated Show resolved Hide resolved
@KitBurgess KitBurgess merged commit fa9bd68 into master Nov 18, 2019
@KitBurgess KitBurgess deleted the filter-on-name branch November 18, 2019 14:21
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.

None yet

2 participants