Skip to content

#228: Add Organization Analytics API - #263

Open
DhruvinBarot wants to merge 1 commit into
mainfrom
DhruvinBarot_228_organization_analytics
Open

#228: Add Organization Analytics API#263
DhruvinBarot wants to merge 1 commit into
mainfrom
DhruvinBarot_228_organization_analytics

Conversation

@DhruvinBarot

Copy link
Copy Markdown

Summary

Implemented the Organization Analytics API for Issue #228 using the
virginia_dev_saayam_rdbms.organizations table structure.

Supports both Overview and Performance dashboards through a single Lambda handler using dashboard_type.

Features

Overview

  • Total organizations
  • Type and size distribution
  • Collaborator / contributor distribution
  • State and city distribution
  • Registration trends: daily, weekly, monthly, yearly

Performance

  • Average rating
  • Rated / unrated / five-star organizations
  • Rating distribution
  • Top-rated, collaborator, and contributor organizations
  • Ratings by type and size

Filters

Supports:

7D, 30D, 1Y, ALL, CUSTOM, org_type, org_size, state_id, city_name, org_rating, is_collaborator, is_contributor, and group_by.

Local Testing

Tested locally with PostgreSQL only.

  • No AWS deployment/ AWS Parameter Store
  • Overview and Performance dashboards tested
  • Required filters, time ranges, grouping options, custom dates, invalid inputs, and empty results tested
  • Both dashboards returned HTTP 200

Sample Result

Using time_filter: ALL:

{
  "total_organizations": 40,
  "non_profit_organizations": 21,
  "for_profit_organizations": 19,
  "collaborator_organizations": 21,
  "non_collaborator_organizations": 19,
  "contributor_organizations": 19,
  "non_contributor_organizations": 21
}

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant