aodn / aatams

Animal Tracking (formerly AATAMS)
https://aatams.aodn.org.au
8 stars 3 forks source link

Document outlining assumptions of AATMS Database web-app #275

Closed dnahodil closed 8 years ago

dnahodil commented 8 years ago

We need to wait until we have confirmed the fix, and determined what the effect of these changes will be on the monthly reports, before we merge this document.

Pretty happy if anyone has feedback on this as I'm not really sure what a good format is to document these assumptions.

xhoenner commented 8 years ago

Nice work @dnahodil, I agree with all assumptions in your document except the one below:

It is assumed that there is a 1:1 relationship between tags and transmitters such that given a tag_id or transmitter_id you can determine the other.

This is not the case, running the following query returned ~550 tag_ids associated with > 1 transmitter_id SELECT tag_id, COUNT(transmitter_id) FROM aatams.sensor GROUP BY tag_id HAVING COUNT(transmitter_id) > 1 ORDER BY tag_id

dnahodil commented 8 years ago

Thanks @xhoenner, that's very interesting and something we'll need to look into!

xhoenner commented 8 years ago

@ktattersall asked a while ago to Colin Simpfendorfer whether it is possible for a tag (identified by serial number) to have more than one transmitter embedded/attached.

His response was: "A serial number should only have a single tag ID code associated with it. It may be possible though that a serial number has two possible tag ID codes. Vemco tags with temp and pressure sensors transmitted two different tag ID codes (one for each parameter), but would have a single serial number. I can’t remember how the database handles this – we would need to check with @jkburges."

jkburges commented 8 years ago

My understanding:

Yes, confusing.

jkburges commented 8 years ago

Not sure of the best place to make this comment, so I'll make it here...

As the document added in this PR describes, the AATAMS app makes several assumptions. Another way of looking at is that the data which is served up by AATAMS can be categorised, IMO, in to "raw" or "derived" data. The former being that which does not rely on any assumptions, the latter being that which does.

Examples of raw data:

Examples of derived data:

From a user's (i.e. a scientist using the data in a study) perspective, I think it is pretty important to make this distinction clear, and also to publish what assumptions are being made.

dnahodil commented 8 years ago

It's worth noting that this document is meant to record the assumptions that the web-app code makes. So even if we (the humans) know it to be different, if the code makes a certain assumption it should be documented. That way, if an assumption looks particularly dangerous, we have to update the code to remove that assumption (and can then undocument the assumption).

dnahodil commented 8 years ago

Thanks for the input, all.

I've updated the document to no longer include the assumption about 1:1 transmitters to tags. @jkburges showed me in the detection_view definition that the database does take into account the possibility of a n:1 relationship here.

jkburges commented 8 years ago

1:1 transmitters to tags

transmitter IDs to tags is 1:n

e.g. "A69-1303-1234" may be the transmitter ID for a sensor on more than one physical tag.

dnahodil commented 8 years ago

:headsplosion:

Got it, and we're still okay.

dnahodil commented 8 years ago

This can be merged, @julian1. The changes it describes are now on master.