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

Call map_dep() only after get_ functions #91

Open
peterdesmet opened this issue Mar 15, 2022 · 3 comments
Open

Call map_dep() only after get_ functions #91

peterdesmet opened this issue Mar 15, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@peterdesmet
Copy link
Member

peterdesmet commented Mar 15, 2022

Currently features are implemented in two ways:

  • get_n_obs(mica)
  • map_dep(mica, feature = "n_obs")

That might get complicated to explain and maintain. I think features should be functions only, and map_dep() should be a generic function that is always called after get_.

E.g.:

mica %>%
  get_n_obs() %>%
  map_dep()

That way, users call a get_ function first (and can explore the data at that stage), but have the option to pipe it further to see that dataframe as a map.

@peterdesmet peterdesmet added the enhancement New feature or request label Mar 15, 2022
@damianooldoni damianooldoni self-assigned this Mar 15, 2022
@damianooldoni
Copy link
Member

@jimcasaer: I discussed this with @peterdesmet of course and I find a good idea as well. What do you think? I think this will give a very boost to the package (especially if combined with #92) as it will make things easier to understand and follow. Users will have to use explicitly the get_* functions, I know, but they will get rid of the argument feature in map_dep(). At least in the new approach they will be helped by autocompletion while writing the function name, while they are not while selecting the feature in map_dep().
This will also very clearly split the calculation and the visualization part. Good for both users and software quality.

Curious about your opinion.

@jimcasaer
Copy link
Collaborator

@damianooldoni can we discuss this tomorrow before the coding club - drinking a coffee ?

@damianooldoni
Copy link
Member

We didn't speak about this issue during the camtraptor July 2023 coding sprint. However, I think we should tackle this aspect while working on #231.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants