MathMarEcol / pdyer_aus_bio

GNU General Public License v3.0
0 stars 0 forks source link

How to take the average abundance in a grid cell? #5

Closed PhDyellow closed 3 years ago

PhDyellow commented 3 years ago

https://github.com/MathMarEcol/pdyer_aus_bio/blob/2a7acb867876f7e90bbcc151454ca0406dd2da3e/R/functions/merge_bio_env.R#L59

Currently, I take the average of all non-zero observations of a species.

The limitations of this approach is that if 5 samples were taken in a grid cell, with one showing an abundance of 10, and 4 of with an abundance of zero, the average for the grid cell will be 10, not 2. This is not consistent.

The advantage is that it works without needing to figure out how many times a survey was taken in a particular location. The NRS is the main culprit, every sample is taken at the same LonLat location. I havn't brought time into the analysis, so I have to guess the sampling done over time.

PhDyellow commented 3 years ago

I think the best option is to guess at the number of time samples at each survey location, and the number of 0's will be decided by the taxon that has the most observations at any given survey location.

The logic will roughly be: For a survey site, how many time points are there? Estimated by counting how many times each species was sampled at each survey location and taking the largest number for that location. For each grid cell, the number of 0's will be the sum of all time points from all surveys in the grid cell, less any actual observed values.

ric325 commented 3 years ago

Phil, you don’t have to guess. Email Claire for the list of how many times the data were collected. Or ask her to add zeros – she normally does.

From: Phil Dyer @.> Reply to: MathMarEcol/pdyer_aus_bio @.> Date: Monday, 26 July 2021 at 11:22 am To: MathMarEcol/pdyer_aus_bio @.> Cc: Subscribed @.> Subject: Re: [MathMarEcol/pdyer_aus_bio] How to take the average abundance in a grid cell? (#5)

I think the best option is to guess at the number of time samples at each survey location, and the number of 0's will be decided by the taxon that has the most observations at any given survey location.

The logic will roughly be: For a survey site, how many time points are there? Estimated by counting how many times each species was sampled at each survey location and taking the largest number for that location. For each grid cell, the number of 0's will be the sum of all time points from all surveys in the grid cell, less any actual observed values.

β€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/MathMarEcol/pdyer_aus_bio/issues/5#issuecomment-886303938, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABLPRX7QWBTKH75AWVLZ7RTTZS2E3ANCNFSM5A7DM4RQ.

PhDyellow commented 3 years ago

Good point Ant, I've reworked the pipeline to use the real samples, not estimates. Claire was helpful, as always : )

ric325 commented 3 years ago

πŸ‘

From: Phil Dyer @.> Reply to: MathMarEcol/pdyer_aus_bio @.> Date: Tuesday, 3 August 2021 at 3:25 pm To: MathMarEcol/pdyer_aus_bio @.> Cc: Anthony Richardson @.>, Comment @.***> Subject: Re: [MathMarEcol/pdyer_aus_bio] How to take the average abundance in a grid cell? (#5)

Good point Ant, I've reworked the pipeline to use the real samples, not estimates. Claire was helpful, as always : )

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/MathMarEcol/pdyer_aus_bio/issues/5#issuecomment-891538880, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABLPRX2AF5XHKXXUIPUXNWLT254UDANCNFSM5A7DM4RQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.