> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Workforce Analytics

> Tabbed analytics hub for workforce data including Dashboard, Trends, Retention Risk, Cost Analysis, and Reports, with tab state persisted in the URL.

The Workforce Analytics page is a tabbed hub providing analytics across five dimensions of the workforce. It is served at route `/hr/analytics`.

## Overview

`WorkforceAnalyticsHubPage` uses `useTabUrlState` to persist the active tab in the URL query string (`?tab=...`). Valid tabs: `dashboard` (default), `trends`, `retention-risk`, `costs`, `reports`. Each tab lazily loads its sub-page:

* `dashboard` → `WorkforceAnalyticsDashboardPage`
* `trends` → `TrendAnalysisPage`
* `retention-risk` → `RetentionRiskPage`
* `costs` → `WorkforceCostPage`
* `reports` → `WorkforceReportBuilderPage`

Sub-paths `/hr/analytics/trends`, `/hr/analytics/retention-risk`, `/hr/analytics/costs`, and `/hr/analytics/reports` redirect to the hub with the corresponding `?tab=` parameter.

## Who it's for

Access follows your organization's role and module configuration. ## Before you start

* Workforce data (employees, timesheets, turnover records) must exist for analytics to populate meaningfully.

## Steps

1. Navigate to **HR > Analytics** or go to `/hr/analytics`.
2. Select a tab to view the corresponding analytics section:
   * **Dashboard** — overview metrics
   * **Trends** — historical workforce trend analysis
   * **Retention Risk** — employees at risk of attrition
   * **Cost Analysis** — workforce cost breakdown
   * **Reports** — report builder

## Key concepts

| Term           | Meaning                                                                                               |
| -------------- | ----------------------------------------------------------------------------------------------------- |
| Tab URL state  | Active tab is stored in `?tab=` query parameter, enabling direct links to specific tab views.         |
| Retention risk | Analysis identifying employees at elevated risk of leaving. SME: confirm methodology.                 |
| Cost analysis  | Workforce cost data including headcount, labor costs, and related metrics. SME: confirm data sources. |

## Related

<Columns cols={2}>
  <Card title="Human Resources" icon="users" href="/hr/overview">
    Human Resources core overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index" />
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/hr/oversight-analytics-succession-routes.tsx
  * src/cores/hr/analytics/pages/WorkforceAnalyticsHubPage.tsx
</Accordion>
