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

✨ [Feature request] - Replicate API filter options present in the UI #24

Open
2 tasks
edwardchalstrey1 opened this issue Nov 20, 2024 · 0 comments
Open
2 tasks
Labels
enhancement New feature or request

Comments

@edwardchalstrey1
Copy link
Collaborator

Description of Improvement

Update the API bindings such that you can construct a filtered query similar to that which can be done via the API website UI:

Screenshot 2024-11-20 at 12 48 21

Dependencies

No response

Technical Notes

Currently the way to filter/query data coming from the API is to load it all and then use pandas:

from seshat_api.core import Polities
polities = Polities(client)
polities_df = pd.DataFrame(polities.get_all())
# then filter with pandas

Building a way to do a specific query is probably only worth it if it's a simple job. Loading the entire polities table to a dataframe with the code above only takes ~15s on my 10Mb home internet connection, so this way is already practical.

Definition of Done

  • The feature has been developed on a feature branch.
  • A pull request has been created for the feature branch to be merged into the main branch.
@edwardchalstrey1 edwardchalstrey1 added the enhancement New feature or request label Nov 20, 2024
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

1 participant