inbo / camtraptor

Camtraptor is an R package to read, explore and visualize Camera Trap Data Packages (Camtrap DP)
https://inbo.github.io/camtraptor/
MIT License
10 stars 2 forks source link

Add temporal plot of deployement #164

Open Rafnuss opened 2 years ago

Rafnuss commented 2 years ago

I've been using this plot to check the date of my deployements and the corresponding image to check that everything was correct (eg. camera running all the way to the end of the deployement, etc). MicrosoftTeams-image

I thought it might be a nice plot to add to the package. I was thinking of following the argument than map_dep() roughly.

damianooldoni commented 2 years ago

I think this functionality fits perfectly in this package, @Rafnuss! Thanks.

Function name

time_dep() seems to me a good name as well. But if it goes about naming things, I always ask an opnion from @peterdesmet 😄

Axis

x-axis: timestamp y-axis: I would use by default locationName which is at researcher level the most readable field. But it can be set to one of the following deployment columns as well:

feature

yes, same features, please, but only the ones you think make sense. Still, we would like to change the way of working of map_dep(), see #91. The same workflow would be applied to this function as well. I hope to find time for #91 so that it is ready before end October.

filtering

Again, this is also something we would like to do before hand, see issue #92. In this way, both map_dep() and time_dep() will not have to implement any extra filtering.

library

yes, ggplot2.

plot style

Scatter plot is an option, yes. Still, I was thinking about an heatmap: it would improve the appeal of the plot, I think. I was wondering what you thought about matrix plot, maybe an heat map?

peterdesmet commented 2 years ago

Naming: ideally the first part of the function name is a verb, so time_ doesn't work here. It could be plot_dep but that doesn't convey you're plotting time information. Another option would be to name all visualization functions (currently this one and map_dep) plot_x() or viz_x(). So I think my preference would go to:

damianooldoni commented 2 years ago

Thanks @peterdesmet! You are right. The point is that map_dep() returns a (leaflet) map, not a plot. IMO, I find that plot_dep_location() is also quite long.

I think viz_ prefix is better:

I would use viz_dep() instead of viz_dep_location() simply because I associate deployment visualization to the geographical information associated to such deployments.

@peterdesmet, @Rafnuss: could you follow my reasoning?

Rafnuss commented 2 years ago

Thanks for the input. Yes, I follow the logic and this could work well. I do have a slightly difference option to suggest.

So, I would go for plot_location() or plot_map() or something. (Would it be possible to actually use leaflet directly on the data: mica %>% get_n_obs() %>% leaflet()). And then plot_time().

But I don't have much experience, so happy to follow your advice.

jimcasaer commented 2 years ago

I'm strong in favor of using the leaflet function and would distinguish these functions using leaflet from those returning plots this would give you within camtraptor a family of functions map() and plot()

I agree that we should think about the second part of the function names given that a deployment returns many different interesting variables (n_obs, n_species, n_indiv, ...)

peterdesmet commented 2 years ago

I agree that it would be better to remove _dep_ from the function name, especially if all map/plot functions would work on the package property (which may or may not be filtered beforehand by one of the filter() functions, see #92). So, I'm in favour of plot_time(). I'd have to reassess the other function names.

peterdesmet commented 2 years ago

Decided to keep plot_ and map_ as separate verbs and functions. @Rafnuss the function you suggest in this issue should be named plot_time(). Renaming map_dep() (if necessary) would happen at a later stage.

Rafnuss commented 1 year ago

Hey, I'm a little squeezed with time at the moment and don't think I'll be able to develop this functions now (and for the next 6-9months I belive to be honest with you). Sorry. Is it better to close this issue for now?

damianooldoni commented 1 year ago

Hi @Rafnuss. You don't need to say sorry! I would prefer to leave the issue open as it can be that I will work on this next year. Showing this kind of information is quite important. In case I work on it, would you like to be (one of) the reviewer(s)?