curl -H "X-API-Key: your_api_key_here" \
"https://api.northaxiumdata.ca/api/v1/infrastructure_projects/stats?group_by=province"
import requests
headers = {"X-API-Key": "your_api_key_here"}
response = requests.get(
"https://api.northaxiumdata.ca/api/v1/infrastructure_projects/stats",
headers=headers,
params={"group_by": "program"}
)
for row in response.json()["data"]:
print(f"{row['group_value']}: ${row['sum_value']:,.0f} across {row['record_count']} projects")
const response = await fetch(
"https://api.northaxiumdata.ca/api/v1/infrastructure_projects/stats?group_by=program",
{ headers: { "X-API-Key": "your_api_key_here" } }
);
const data = await response.json();
{
"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
}
}
{
"error": {
"code": "BAD_REQUEST",
"message": "group_by must be one of: province, program, status."
}
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing API key. Pass your key in the X-API-Key header."
}
}
{
"error": {
"code": "RATE_LIMITED",
"message": "Monthly request limit exceeded. Upgrade your plan for higher limits."
}
}
Infrastructure
Infrastructure Project Stats
Aggregate statistics over the Infrastructure Canada funded projects dataset.
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"
import requests
headers = {"X-API-Key": "your_api_key_here"}
response = requests.get(
"https://api.northaxiumdata.ca/api/v1/infrastructure_projects/stats",
headers=headers,
params={"group_by": "program"}
)
for row in response.json()["data"]:
print(f"{row['group_value']}: ${row['sum_value']:,.0f} across {row['record_count']} projects")
const response = await fetch(
"https://api.northaxiumdata.ca/api/v1/infrastructure_projects/stats?group_by=program",
{ headers: { "X-API-Key": "your_api_key_here" } }
);
const data = await response.json();
{
"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
}
}
{
"error": {
"code": "BAD_REQUEST",
"message": "group_by must be one of: province, program, status."
}
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing API key. Pass your key in the X-API-Key header."
}
}
{
"error": {
"code": "RATE_LIMITED",
"message": "Monthly request limit exceeded. Upgrade your plan for higher limits."
}
}
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
string
Field to group results by. One of
province, program, status. Default: province. Example: vendor.string
Field to sum. Only
federal_contribution is currently supported. Default: federal_contribution. Example: amount.string
Full-text match across title, recipient, and location — applied before grouping. Example:
University of Toronto.string
Two-letter province code filter applied before grouping. Example:
ON.string
Partial match on
program_en applied before grouping. Example: Canada Summer Jobs.string
Exact match on project status applied before grouping. Example:
issued.number
Minimum federal contribution filter applied before grouping. Example:
100000.number
Maximum federal contribution filter applied before grouping. Example:
5000000.string
ISO 8601 approved-date lower bound applied before grouping. Example:
2023-01-01.string
ISO 8601 approved-date upper bound applied before grouping. Example:
2023-12-31.integer
Max groups to return. Default:
100. Max: 200. Example: 25.integer
Result offset. Default:
0. Example: 50.curl -H "X-API-Key: your_api_key_here" \
"https://api.northaxiumdata.ca/api/v1/infrastructure_projects/stats?group_by=province"
import requests
headers = {"X-API-Key": "your_api_key_here"}
response = requests.get(
"https://api.northaxiumdata.ca/api/v1/infrastructure_projects/stats",
headers=headers,
params={"group_by": "program"}
)
for row in response.json()["data"]:
print(f"{row['group_value']}: ${row['sum_value']:,.0f} across {row['record_count']} projects")
const response = await fetch(
"https://api.northaxiumdata.ca/api/v1/infrastructure_projects/stats?group_by=program",
{ headers: { "X-API-Key": "your_api_key_here" } }
);
const data = await response.json();
{
"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
}
}
{
"error": {
"code": "BAD_REQUEST",
"message": "group_by must be one of: province, program, status."
}
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing API key. Pass your key in the X-API-Key header."
}
}
{
"error": {
"code": "RATE_LIMITED",
"message": "Monthly request limit exceeded. Upgrade your plan for higher limits."
}
}