Closed xhdong-umd closed 5 years ago
@chfleming I tried to at least include the animal name in the download.
From the buffalo data it seemed that the name came from column individual-local-identifier
. This can be obtained with a separate inquiry. So this is doable but I'm not sure if all data have this column, or if they will use other columns for name.
All the available attributes for individuals:
access_profile_id, comments, death_comments, default_profile_eventdata_id,
earliest_date_born, exact_date_of_birth, external_id, external_id_namespace_id,
i_am_owner, id, latest_date_born, local_identifier, ring_id, sex, study_id,
taxon_canonical_name, taxon_id
Do you think we need to add more attributes in data? What attributes in website download but not in API download are important and worth to keep? If we can have specific attribute names, I can add them to the data.
So there are multiple possible names for the individuals that I try to capture in the 0.3.6 version of the package.
Then there are multiple versions of error/HDOP that I try to look for, import, and standardize. These can be used and are necessary if the sampling rate is small.
In the future there are also error ellipse columns that I will import and use. And there are speed & heading columns that I will import and use.
All of this varies wildly from dataset to dataset. If you cannot pull the entire CSV, then I would not implement this feature.
I just checked if move
can download more complete data. It did read local-indentifier like this, though it probably don't have the entire csv, just made more specific inquiries.
So maybe I can add a button to download the study with move
?
Update: when a MoveStack
was feed to as.telemetry
, the animal names are not picked up, though the names in MoveStack
are strings concatenated from individual id and local identifier, not really the names we want.
I added a checkbox for studies owned by user. Though my account don't have any study so I cannot really test if it works. I have updated the app in repo so you can test it when you have time.
@chfleming Do you think we should add the feature to download by move
?
It's easy but will add quite some package dependencies. I'm not sure if the benefit would overweight the burdens. If we don't need the other functionalities of move
I'm inclined to skip it.
I think we should only import Movebank data from Movebank if we can get all of the columns. Whether that is done with the move
package or with the Movebank API, I don't care.
move
probably will not get all columns. It has its own choices. If all possible columns are accessible from the API, I can try to retrieve them all. I'll also ask Movebank to confirm this.
If some columns are only available in website download but not in API, then the whole movebank download page become useless. I should find out this earlier instead of after finished all the features!
I tried to get more attributes through API. It's impossible to find out the right syntax just by reading the documentation. With reading move
source code I managed to get some attributes, though it's time consuming and may not be thorough.
For all the extra columns usage, will ctmm take MoveStack
object input too? I found MoveStack
object have some extra information but not in a simple data frame format. If you want to support MoveStack
for all the additional columns, I can simply use move
to download and save all the trials and errors.
ctmm
can import MoveStack
format files fairly well, but let's put this on hold until we can make sure that either using the API or using move
will return all of the original columns.
@chfleming With help from people at movebank
I think I can pull any attribute included in API now.
I'm looking at all the possible attributes list but I cannot find some of the useful columns you mentioned. Do you have some sample data (movebank id) for all the possible extra columns you mentioned? It don't have to cover every case, but at least one data for each category of columns.
local_identifer
, tag_id
etcerror/HDOP
error ellipse
speed & heading
With these samples I can check if it's possible to get all the columns. Actually I'm wondering if some of the columns came from the raw data instead of movebank formatted data.
@chfleming I haven't meet any study that have multiple sensor types although it seemed possible. If there are multiple sensor types, should we download a mixed file with a sensory type column, or we want a separate file for each sensor type? That will need some extra UI to select sensor type.
The sensor type question is not relevant now. I was planning to download the whole csv directly by simulating the download request in website visits, but that link only works in a small percentage of times. I guess it need to have a valid session established in the website visits, so it will not work in our app.
Another approach is to query what kind of columns are available for study, then assemble an API call with all the possible columns. We will also need to merge the individual level information into event data. This will be a substantial task and I'll postpone it now because
Right now I'll just guide user to download the csv by opening the study page directly, which will not add too much efforts, and user will need to agree license terms in website sometimes anyway.
As for the direct download with limited columns, I'll leave it there as a simple quick method to test with more data. In the future if we made the decision about download methods and extra columns, this feature can be disabled if it will cause some confusions.
Closed now. Will reopen when
Good news, Movebank implemented our feature suggestion, and now we can download all available data for a study, just like the web page download result. This means the app will be able to download study directly with complete data, not just the very basic limited columns.
I did a simple test with API it seemed to be working. I'll implement and test the new API once I switched back to the project.
There is another feature about "visible" column, though I'm not totally sure about that.
The movebank new API changes have been incorporated.
All features have been completed. And I recorded a demo video here.
There are some limits in saving user name and password, and some complexities in data download. See the two help pages for more details.