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

Wrong definition of haulid in SA #9

Closed
4 tasks done
rBatt opened this issue Nov 5, 2015 · 5 comments
Closed
4 tasks done

Wrong definition of haulid in SA #9

rBatt opened this issue Nov 5, 2015 · 5 comments

Comments

@rBatt
Copy link
Owner

rBatt commented Nov 5, 2015

pinskylab/OceanAdapt#45 and pinskylab/OceanAdapt#44; related to #6 here.

There's now a few things swirling around related to my confusion on the issue:

  • is the use of eventname and collectionnumber intentional? Jim says yes
  • is collectionnumber the haulid, or is that eventname? Jim says latter; need to check
  • do all of Jim's indicated collection numbers and eventname 's return rows? (see Typo in correcting roughtail stingray? pinskylab/OceanAdapt#45
  • I then need to make sure I'm using the correct haulid, and/or make sure that Jim's corrections are working as intended

Even though I might be using COLLECTIONNUMBER as haulid instead of EVENTNAME, that still doesn't explain why I'm not geting some rows returned (because I'm still referring to the same columns as Jim; switching the column name won't affect the subsetting).

@rBatt
Copy link
Owner Author

rBatt commented Nov 5, 2015

Here is some quick R output (note that lu() is a custom function that is length(unique(x))):

sa[,lu(haulid)]
[1] 14101
sa[,lu(EVENTNAME)]
[1] 7051
sa[,lu(EVENTNAME)*2]
[1] 14102

@JWMorley here haulid is just COLLECTIONNUMBER renamed. It appears, therefore, that I have the correct identification of the haulid. I've always wanted the haulid to be the most specific descriptor of the tow/haul/attempt to catch things. So I think that I have this right, as-is.

@rBatt
Copy link
Owner Author

rBatt commented Nov 5, 2015

Also, in pinskylab/OceanAdapt#45 @JWMorley says:

'haulid' is made from EVENTNAME, not COLLECTIONNUMBER, which I think you
know.

But what I found above indicates that we disagree about what haulid should represent.

@JWMorley
Copy link
Collaborator

JWMorley commented Nov 5, 2015

It sounds like you're treating the two COLLECTIONNUMBERs as
independent...which may not be appropriate considering they're a paired
two.

Here is some quick R output (note that lu() is a custom function that is
length(unique(x))):

sa[,lu(haulid)]
[1] 14101
sa[,lu(EVENTNAME)]
[1] 7051
sa[,lu(EVENTNAME)*2]
[1] 14102

@JWMorley here haulid is just COLLECTIONNUMBER renamed. It appears,
therefore, that I have the correct identification of the haulid. I've
always wanted the haulid to be the most specific descriptor of the
tow/haul/attempt to catch things. So I think that I have this right,
as-is.


Reply to this email directly or view it on GitHub:
#9 (comment)

@rBatt
Copy link
Owner Author

rBatt commented Nov 5, 2015

In my analyses I've always summed any numbers from a given species in a given haulid, then averaged the per-species haulid's in a given stratum on a given date. That way I got 1 number per species per stratum per date.

@rBatt
Copy link
Owner Author

rBatt commented Nov 9, 2015

The problem was that I have an outdated version of the data sets. In SA, e.g., they didn't just add contemporary data in recent updates; they also added data from past years (e.g., roughtail stingray in 2001).

See #11

@rBatt rBatt closed this as completed Nov 9, 2015
rBatt added a commit that referenced this issue Dec 15, 2015
rBatt added a commit that referenced this issue Dec 15, 2015
@JWMorley my stuff should now match up with yours for sa (seus)

fixes #9

fixes pinskylab/OceanAdapt#45

ties into #6

ties into pinskylab/OceanAdapt#44
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