Skip to content

ENH: Support other H3 APIs #8

@DahnJ

Description

@DahnJ

h3-py has multiple index APIs. Currently, H3-Pandas is based on the basic_str API.
For performance, it would make the most sense to work with the numpy_int or memview_int APIs.

I see two options:

Method 1: Provide the user with an option

The user could then choose which API they want, similar to how h3-py does it. They could be informed of the potential speedups with the integer representations.

Method 2: Work always with integers, but show string representations

Most H3 users are arguably familiar with the H3 string representation. A possibility, originally suggested by @ajfriend, might be to utilize Pandas' extension types to provide a class that uses the int representation under the hood, but has a str representation (repr). This would allow the user to stay with the familiar string representation, but use all the performance improvements stemming from the int representation.

I do not know if this is possible in such a way as to still be able to leverage the speedups. This should be investigated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions