Skip to content

Aggregating on something other than area #137

Open
@adamConnerSax

Description

Tobler is great! Thanks so much for providing it.

I'm wondering if it would be possible to weight some intensive variables using some column from the data rather than the area itself? I'm thinking, for example, of population density when aggregating census data. In some sense, the density of a larger area is just the area-weighted density of the components, sure.

But one might also want the population weighted aggregation, rather than the area-weighted one. And if the source_df had the population in a column, I imagine it might be easy enough to use that as a weight instead of the area. You'd still need to use area overlap to get the fraction of the weight in each target geometry.

Maybe a 3rd category of variables, specified by a dictionary of columns keyed by the column to use as a weight in place of area? Or is there some simple way of doing this that I am missing?

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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