Skip to content

Unify parameter names in map visualization functions

Hi @abatalla @tkariyat

I am opening this issue for us to start working on unifying the parameter names in different plottings functions. We can start with the most-used 2D map visualization functions:

  • VizEquiMap
  • VizStereoMap
  • VizRobinson
  • VizMostLikelyQuantileMap

I envision that this will take the following steps:

  1. Identify repeated parameters with different names amongst the functions. For example, for adjusting the size of the title, VizRobinson() uses sizetitle while VizEquiMap uses title_scale.
  2. Decide which one to keep and which one to deprecate
  3. Homogenize the names and values (where possible) of the parameters.
  4. Update all documentation and examples.
  5. Deprecate the old parameters. For the first release they will be kept in the function description with a warning and a piece of code such as this:
  # Check sizetit
  if (!is.null(sizetit)) {
    warning("Parameter 'sizetit' is obsolete. Use 'title_scale' instead.")
    if (!is.numeric(sizetit) || length(sizetit) != 1) {
      stop("Parameter 'sizetit' must be a single numeric value.")
    }
    title_scale <- sizetit
  }

Then, in the following release, the warnings will be removed along with the old names.

If you have any other suggestions or questions, please write them here.

Victòria

Edited by vagudets