Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[feature-idea]: zcol count parameter #495

Copy link
Copy link

Description

@sonicseamus
Issue body actions

I often have datasets where I would like to visualize the number of occurrences of my zcol variable ("name" in this example), e.g.

Geometry name
(1, 1) "a"
(1, 2) "b"
(1, 3) "c"
(1, 4) "d"
(1, 3) "c"
(1, 1) "a"

and what I want displayed by mapview is really the summarized dataframe:

Geometry name count
(1, 1) "a" 2
(1, 2) "b" 1
(1, 3) "c" 2
(1, 4) "d" 1

where the new "count" column is the one visualized on a scale with zcol. However, it should still display the "name" column when I mouse over the data points for ease of identification.

I could accomplish something close to this by using mapview(df |> dplyr::count(name), zcol = "n", label = "name"), but it might be more intuitive if it could be implemented as a one-step function within the mapview call, perhaps something like mapview(df, zcol = "name", count = TRUE).

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.