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

Problem with HL and CA data #5

Closed
James-Thorson opened this issue Aug 11, 2016 · 6 comments
Closed

Problem with HL and CA data #5

James-Thorson opened this issue Aug 11, 2016 · 6 comments
Assignees

Comments

@James-Thorson
Copy link

Hi all,

I'm exploring adding icesDatras as a depenency to FishData (https://github.com/James-Thorson/FishData), and its working for getting haul meta-data, but I'm finding problems when querying length or age data:

> dim( getHHdata(survey="NS-IBTS", year=2014, quarter=1) )
[1] 352  61
> dim( getHLdata(survey="NS-IBTS", year=2000, quarter=1) )
[1] 0 0
> dim( getCAdata(survey="NS-IBTS", year=2000, quarter=1) )
[1] 0 0

some sleuthing seems to show that its a problem in the call to the API, during

    out <- curlDatras(url = url)
    out <- parseDatras(out)

in e.g, getHLdata. Any thoughts on what might be happening?

@colinpmillar
Copy link
Member

Thanks Jim, I think the problem is that the API returns nothing - see:

https://datras.ices.dk/WebServices/DATRASWebService.asmx/getHLdata?survey=NS-IBTS&year=2015&quarter=1

So, techincally not an issue with this package, but an issue with the API itself. I have raised this with the Data Centre here at ICES.
Thanks for raising this.

@James-Thorson
Copy link
Author

Makes sense. I don't know the DATRAS API, and haven't done any homework
really on how it works. But: is it possible to automate some check
whether its working as expected or not? It would be a shame for a user to
conclude there's no length/age data available for a given
quarter/year/survey when there really is. Perhaps getHHdata could check
a given quarter/year/survey combo, and if there's data available but the
age/length API isn't returning anything then it gives a warning/error
message?

As always, please suggest helpful coding for me...

jim

On Thu, Aug 11, 2016 at 11:47 AM, Colin Millar [email protected]
wrote:

Thanks Jim, I think the problem is that the API returns nothing - see:

https://datras.ices.dk/WebServices/DATRASWebService.
asmx/getHLdata?survey=NS-IBTS&year=2015&quarter=1

So, techincally not an issue with this package, but an issue with the API
itself. I have raised this with the Data Centre here at ICES.
Thanks for raising this.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHnqTclauqID42_ncmyxkTVncd5rarztks5qe25OgaJpZM4JiWE0
.

@colinpmillar
Copy link
Member

Yeah think you are right - and that would be the sensible solution to this issue.

We know there should be data, because before we send the request, we check that DATRAS says there are records for that survey, year and quarter combinations.

Will implement and close, probably the start of next week.

@colinpmillar colinpmillar self-assigned this Aug 11, 2016
@colinpmillar
Copy link
Member

Hi, it seems that this was an internal issue due to updated column names in the database itself that had not been carried through to the API, it should be fixed now.

@James-Thorson
Copy link
Author

Great! Yes, I can confirm that I'm now getting reasonable output from
getHLdata.

One additional question: many surveys in North America report and analyzes
survey catch rates in units weight per area. However, Datras doesn't
appear to report weight for each specimen in the getHLdata output. If
this were available, FishData (or icesDatras) could sum across
specimens weights in each tow to get total weight by species per tow, for
comparison with N American data.

Would someone at ICES be willing to work with me to make automated code
that uses weight-length relationships to convert specimen length to weight?

jim

On Fri, Aug 12, 2016 at 9:22 AM, Colin Millar [email protected]
wrote:

Hi, it seems that this was an internal issue due to updated column names
in the database itself that had not been carried through to the API, it
should be fixed now.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHnqTeXEnMTCR-HvWQfzXlkGl0RBPm4pks5qfJ3WgaJpZM4JiWE0
.

@colinpmillar
Copy link
Member

Continue length weight issue: Length weight from DATRAS #26

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

2 participants