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

Limit fishing events to only fishing vessels #13

Open
pwoods25443 opened this issue Oct 30, 2018 · 1 comment
Open

Limit fishing events to only fishing vessels #13

pwoods25443 opened this issue Oct 30, 2018 · 1 comment

Comments

@pwoods25443
Copy link
Member

pwoods25443 commented Oct 30, 2018

We should not be publishing fishing events for vessels that we do not believe are fishing vessels. Consider filtering with something like:

WITH 
  fishing as (
  SELECT
    DISTINCT CAST(mmsi as STRING) as ssvid
  FROM
    `gfw_research.vessel_info_allyears_20181002`
  WHERE
    on_fishing_list_best
    AND is_active
    AND (spoofing_days < 5
      OR spoofing_days IS NULL)
    AND (spoofing_factor < 1.05
      OR spoofing_factor IS NULL)
)
SELECT * FROM messages JOIN fishing USING (ssvid)
@pwoods25443
Copy link
Member Author

Need to get the list of fishing vessels from a well-defined location

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