Skip to main content
GET
/
api
/
v1
/
infrastructure_projects
/
stats
curl -H "X-API-Key: your_api_key_here" \
  "https://api.northaxiumdata.ca/api/v1/infrastructure_projects/stats?group_by=province"
{
  "data": [
    {
      "group_by": "province",
      "group_value": "ON",
      "record_count": 4821,
      "sum_field": "federal_contribution",
      "sum_value": 12400000000.00
    },
    {
      "group_by": "province",
      "group_value": "QC",
      "record_count": 3104,
      "sum_field": "federal_contribution",
      "sum_value": 8750000000.00
    }
  ],
  "meta": {
    "total": 13,
    "limit": 100,
    "offset": 0
  }
}

Overview

Returns grouped aggregate statistics over the Infrastructure Canada projects dataset. Use this to answer questions like “how much federal infrastructure funding has gone to Quebec?” or “which programs have the highest total contribution?” Accepts the same filter parameters as Infrastructure Projects, so you can scope statistics to any subset before grouping.

Query Parameters

group_by
string
Field to group results by. One of province, program, status. Default: province
sum_field
string
Field to sum. Only federal_contribution is currently supported. Default: federal_contribution
q
string
Full-text match across title, recipient, and location — applied before grouping
province
string
Two-letter province code filter applied before grouping
program
string
Partial match on program_en applied before grouping
status
string
Exact match on project status applied before grouping
min_value
number
Minimum federal contribution filter applied before grouping
max_value
number
Maximum federal contribution filter applied before grouping
issued_after
string
ISO 8601 approved-date lower bound applied before grouping
issued_before
string
ISO 8601 approved-date upper bound applied before grouping
limit
integer
Max groups to return. Default: 100. Max: 200
offset
integer
Result offset. Default: 0
curl -H "X-API-Key: your_api_key_here" \
  "https://api.northaxiumdata.ca/api/v1/infrastructure_projects/stats?group_by=province"
{
  "data": [
    {
      "group_by": "province",
      "group_value": "ON",
      "record_count": 4821,
      "sum_field": "federal_contribution",
      "sum_value": 12400000000.00
    },
    {
      "group_by": "province",
      "group_value": "QC",
      "record_count": 3104,
      "sum_field": "federal_contribution",
      "sum_value": 8750000000.00
    }
  ],
  "meta": {
    "total": 13,
    "limit": 100,
    "offset": 0
  }
}