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

v2: endpoint for geographic stats #575

Open
1 of 2 tasks
josh-chamberlain opened this issue Jan 9, 2025 · 0 comments
Open
1 of 2 tasks

v2: endpoint for geographic stats #575

josh-chamberlain opened this issue Jan 9, 2025 · 0 comments
Assignees
Labels
api enhancement New feature or request fixed_in_dev This is merged into the dev environment and waiting to be merged into main

Comments

@josh-chamberlain
Copy link
Contributor

josh-chamberlain commented Jan 9, 2025

Context

We can display some simple statistics on the front page:

Our database contains Sources from <br>
<strong>{{ agenciesCount }} agencies</strong> in 
<strong>{{ countiesCount }} counties</strong> across 
<strong>{{ statesCount }} states </strong> and the District of Columbia.

Previously we had tried to do this by paging through all the sources and adding this up.

Requirements

  • instead, let's make an endpoint either in the /agencies namespace or a new /metrics namespace.
    • it should return the count of agencies for which we have at least one source
    • the number of counties represented by those agencies
    • the number of states covered by those agencies
  • optionally, modify another endpoint to efficiently return this information

Tests

probably!

Docs

API docs

@josh-chamberlain josh-chamberlain added enhancement New feature or request api labels Jan 9, 2025
@maxachis maxachis added the fixed_in_dev This is merged into the dev environment and waiting to be merged into main label Jan 9, 2025
@josh-chamberlain josh-chamberlain moved this from Todo to Done in Open issues & Roadmap Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api enhancement New feature or request fixed_in_dev This is merged into the dev environment and waiting to be merged into main
Projects
Status: Done
Development

No branches or pull requests

2 participants