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

Change to NWFSC Data Warehouse URL #24

Open
Curt-Whitmire-NOAA opened this issue Aug 11, 2020 · 10 comments
Open

Change to NWFSC Data Warehouse URL #24

Curt-Whitmire-NOAA opened this issue Aug 11, 2020 · 10 comments

Comments

@Curt-Whitmire-NOAA
Copy link

Hi Jim,
NWFSC IT recently changed the server URL for the FRAM Data Warehouse. The new URL adds "webapps" to the front end of the URL, like the example below:

https://www.webapps.nwfsc.noaa.gov/data/api/v1/source/trawl.catch_fact

@afredston
Copy link
Contributor

I assume this breaks download_catch_rates()? I can submit a PR to update the URLs if that's helpful...

@James-Thorson-NOAA
Copy link
Collaborator

Yeah, I haven't checked. Are you interested in taking a moment to confirm and then do the PR @afredston ...? Or tell me if you're too busy and ... err... I might ignore it until I'm back from leave :0

@afredston
Copy link
Contributor

afredston commented Aug 12, 2020

happy to do it this week! stay tuned and thanks for the heads-up @Curt-Whitmire-NOAA

@Curt-Whitmire-NOAA
Copy link
Author

Thanks @afredston! Yes, the new URL causes download_catch_rates() to not access data for survey == "WCGBTS", "WGHL" and "WGT".

@Curt-Whitmire-NOAA
Copy link
Author

I should have wrote the "current URL" causes download_catch_rates() to not access data...

@kellijohnson-NOAA
Copy link
Collaborator

Perhaps another option would be to rely on nwfsc-assess/nwfscSurvey::PullCatch.fn that @chantelwetzel-noaa maintains.

@James-Thorson-NOAA
Copy link
Collaborator

@chantelwetzel-noaa @kellijohnson-NOAA Could either of you comment on what output nwfsc-assess/nwfscSurvey::PullCatch.fn(.) generates, or even how it compares with the function here?

I've always hoped to transition to each region maintaining their own function to pull their API, so that FishData is really more about harmonizing and publicizing those regional sources (as needed realistically for any comparative analysis). So I'm excited to learn about that other option!

@kellijohnson-NOAA
Copy link
Collaborator

@James-Thorson-NOAA nwfscSurvey::PullCatch.fn(SurveyName = "NWFSC.Combo") results in a data frame with the following columns:
Trawl_id
Common_name
Project
Year
Pass
Vessel
Tow
Date
Depth_m
Longitude_dd
Latitude_dd
Area_Swept_ha
Subsample_count
Subsample_wt_kg
total_catch_numbers
total_catch_wt_kg
cpue_kg_km2

so I think we would have to add a few columns to match what you have, though I don't know exactly what columns are necessary.

@afredston
Copy link
Contributor

afredston commented Aug 22, 2020

I added a PR to fix the URLs for now.

The output columns of download_catch_rates() are "Sci" "Year" "TowID" "Lat" "Long" "Wt" (or Num in some cases) and "AreaSwept_ha" -- looks like those are all in nwfscSurvey except scientific names?

@James-Thorson
Copy link
Owner

James-Thorson commented Aug 22, 2020 via email

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

5 participants