Project Management Dataset¶
A comprehensive example using synthetic project management data that demonstrates most jpx function categories.
Dataset¶
All examples use this project management dataset:
[
{
"projectId": "P-8801",
"status": "active",
"timestamps": { "created_at": "2025-01-15T08:30:00Z", "last_modified": "2025-12-19T09:05:00Z" },
"details": {
"name": "Quantum Migration",
"description": "High-priority initiative to transition legacy on-premise infrastructure to a distributed cloud-native architecture.",
"tags": ["cloud", "security", "infrastructure"]
},
"milestones": [{ "phase": "Discovery", "due_date": "2025-03-01", "completed": true }]
},
{
"projectId": "P-9902",
"status": "pending",
"timestamps": { "created_at": "2025-06-10T14:20:00Z", "last_modified": "2025-11-30T11:00:00Z" },
"details": {
"name": "Mobile App Redesign",
"description": "Revamping the user interface for the primary customer-facing mobile application to improve accessibility and engagement.",
"tags": ["UX", "frontend", "accessibility"]
},
"milestones": []
},
{
"projectId": "P-4405",
"status": "archived",
"timestamps": { "created_at": "2024-11-01T09:00:00Z", "last_modified": "2025-01-20T16:30:00Z" },
"details": {
"name": "Legacy Data Cleanup",
"description": "Automated purging of obsolete database records older than seven years to maintain compliance with regional data privacy laws.",
"tags": ["database", "compliance", "automation"]
},
"milestones": [{ "phase": "Archive Audit", "due_date": "2025-01-15", "completed": true }]
},
{
"projectId": "P-5521",
"status": "active",
"timestamps": { "created_at": "2025-02-14T10:15:00Z", "last_modified": "2025-12-10T14:45:00Z" },
"details": {
"name": "Cyber Sentinel Firewall",
"description": "Implementation of AI-driven threat detection systems to safeguard corporate networks against zero-day vulnerabilities.",
"tags": ["AI", "security", "network"]
},
"milestones": [{ "phase": "Training", "due_date": "2025-05-20", "completed": true }]
},
{
"projectId": "P-1033",
"status": "on-hold",
"timestamps": { "created_at": "2025-03-22T13:00:00Z", "last_modified": "2025-09-05T08:20:00Z" },
"details": {
"name": "Blockchain Supply Chain",
"description": "Integrating distributed ledger technology to provide end-to-end transparency for global logistics and manufacturing pipelines.",
"tags": ["blockchain", "logistics", "transparency"]
},
"milestones": []
},
{
"projectId": "P-2294",
"status": "active",
"timestamps": { "created_at": "2025-04-12T16:45:00Z", "last_modified": "2025-12-18T10:00:00Z" },
"details": {
"name": "Green Energy Analytics",
"description": "Analyzing power consumption patterns to optimize the efficiency of solar and wind-based energy grids.",
"tags": ["sustainability", "analytics", "energy"]
},
"milestones": [{ "phase": "Sensor Install", "due_date": "2025-08-30", "completed": true }]
},
{
"projectId": "P-7761",
"status": "pending",
"timestamps": { "created_at": "2025-05-19T11:20:00Z", "last_modified": "2025-05-19T11:20:00Z" },
"details": {
"name": "Internal Wiki Overhaul",
"description": "Restructuring the company knowledge base to facilitate better cross-departmental collaboration and documentation sharing.",
"tags": ["knowledge", "internal", "documentation"]
},
"milestones": []
},
{
"projectId": "P-6610",
"status": "active",
"timestamps": { "created_at": "2025-07-04T09:00:00Z", "last_modified": "2025-12-15T15:30:00Z" },
"details": {
"name": "E-Commerce Personalization",
"description": "Deploying machine learning models to provide customized product recommendations based on real-time user behavior.",
"tags": ["retail", "ML", "personalization"]
},
"milestones": [{ "phase": "Model Alpha", "due_date": "2025-11-01", "completed": true }]
},
{
"projectId": "P-3349",
"status": "archived",
"timestamps": { "created_at": "2024-08-15T14:10:00Z", "last_modified": "2025-03-12T12:00:00Z" },
"details": {
"name": "Legacy Email Migration",
"description": "Relocating historical email archives from physical tape drives to a searchable secure cloud vault.",
"tags": ["email", "storage", "archival"]
},
"milestones": [{ "phase": "Final Sync", "due_date": "2025-02-28", "completed": true }]
},
{
"projectId": "P-1122",
"status": "active",
"timestamps": { "created_at": "2025-09-30T08:45:00Z", "last_modified": "2025-12-19T11:15:00Z" },
"details": {
"name": "HR Portal Integration",
"description": "Syncing payroll and performance management software to create a unified dashboard for human resources staff.",
"tags": ["HR", "integration", "software"]
},
"milestones": [{ "phase": "API Bridge", "due_date": "2026-01-10", "completed": false }]
}
]
Basic Extraction¶
Get all values for a field¶
["P-8801", "P-9902", "P-4405", "P-5521", "P-1033", "P-2294", "P-7761", "P-6610", "P-3349", "P-1122"]
Navigate nested objects¶
["Quantum Migration", "Mobile App Redesign", "Legacy Data Cleanup", "Cyber Sentinel Firewall", "Blockchain Supply Chain", "Green Energy Analytics", "Internal Wiki Overhaul", "E-Commerce Personalization", "Legacy Email Migration", "HR Portal Integration"]
Access by index¶
Filtering¶
Simple equality filter¶
["Quantum Migration", "Cyber Sentinel Firewall", "Green Energy Analytics", "E-Commerce Personalization", "HR Portal Integration"]
Numeric comparison¶
Empty array check¶
Nested filtering¶
Flattening & Nested Access¶
Flatten nested arrays¶
["cloud", "security", "infrastructure", "UX", "frontend", "accessibility", "database", "compliance", "automation", "AI", "security", "network", "blockchain", "logistics", "transparency", "sustainability", "analytics", "energy", "knowledge", "internal", "documentation", "retail", "ML", "personalization", "email", "storage", "archival", "HR", "integration", "software"]
Get unique values¶
["AI", "HR", "ML", "UX", "accessibility", "analytics", "archival", "automation", "blockchain", "cloud", "compliance", "database", "documentation", "email", "energy", "frontend", "infrastructure", "integration", "internal", "knowledge", "logistics", "network", "personalization", "retail", "security", "software", "storage", "sustainability", "transparency"]
Status & Grouping¶
Count by category¶
Group into buckets¶
Tag Operations¶
Tag frequency analysis¶
Find projects by tag¶
# Projects with "security" tag
[?includes(details.tags, 'security')].{id: projectId, name: details.name}
[
{"id": "P-8801", "name": "Quantum Migration"},
{"id": "P-5521", "name": "Cyber Sentinel Firewall"}
]
Multiple tag filter (AND)¶
# Projects with BOTH security AND cloud tags
[?includes(details.tags, 'security') && includes(details.tags, 'cloud')].projectId
Tags as comma-separated string¶
"AI, HR, ML, UX, accessibility, analytics, archival, automation, blockchain, cloud, compliance, database, documentation, email, energy, frontend, infrastructure, integration, internal, knowledge, logistics, network, personalization, retail, security, software, storage, sustainability, transparency"
Date & Time Queries¶
Filter by date prefix¶
Find most recent¶
Find oldest¶
Human-readable time ago¶
# Time since last modification (human readable)
[*].{name: details.name, last_touch: time_ago(timestamps.last_modified)}
[
{"name": "Quantum Migration", "last_touch": "1 hour ago"},
{"name": "Mobile App Redesign", "last_touch": "19 days ago"},
...
]
Stale project detection¶
# Projects not modified in 30+ days
[?date_diff(now(), to_epoch(timestamps.last_modified), 'days') > `30`].details.name
["Mobile App Redesign", "Blockchain Supply Chain", "Internal Wiki Overhaul", "Legacy Email Migration"]
Same-day check¶
Milestone Analysis¶
Projects without milestones¶
# Projects with no milestones defined
[?milestones == `[]`].{id: projectId, name: details.name, status: status}
[
{"id": "P-9902", "name": "Mobile App Redesign", "status": "pending"},
{"id": "P-1033", "name": "Blockchain Supply Chain", "status": "on-hold"},
{"id": "P-7761", "name": "Internal Wiki Overhaul", "status": "pending"}
]
Find incomplete work¶
# Projects with pending milestones
[?milestones[?completed == `false`]].{
project: details.name,
pending: milestones[?completed == `false`][].phase
}
Upcoming milestones¶
# All incomplete milestones with due dates
[*].milestones[?completed == `false`][].{phase: phase, due: due_date}
Text & Search¶
Fuzzy name search¶
Keyword search in descriptions¶
# Projects mentioning AI or machine learning
[?contains(details.description, 'AI') || contains(details.description, 'machine learning')].details.name
Case-insensitive search¶
# Projects mentioning compliance (case-insensitive)
[?contains(lower(details.description), 'compliance')].details.name
Word analysis¶
Truncated summaries¶
[
{"name": "Quantum Migration", "summary": "High-priority initiative to transition legacy..."},
...
]
String Transformations¶
URL-friendly slugs¶
[
{"id": "P-8801", "slug": "quantum-migration"},
{"id": "P-9902", "slug": "mobile-app-redesign"},
...
]
Database column names¶
Uppercase status¶
Projections & Reshaping¶
Create summary objects¶
[
{"id": "P-8801", "name": "Quantum Migration", "status": "active"},
{"id": "P-9902", "name": "Mobile App Redesign", "status": "pending"},
...
]
Computed fields¶
# Add computed milestone count
[*].{
name: details.name,
status: status,
milestone_count: length(milestones),
has_incomplete: length(milestones[?completed == `false`]) > `0`
}
[
{"name": "Quantum Migration", "status": "active", "milestone_count": 1, "has_incomplete": false},
{"name": "HR Portal Integration", "status": "active", "milestone_count": 1, "has_incomplete": true},
...
]
Aggregation & Analytics¶
Dashboard summary¶
# Executive dashboard
{
total_projects: length(@),
active: length([?status == 'active']),
pending: length([?status == 'pending']),
on_hold: length([?status == 'on-hold']),
archived: length([?status == 'archived']),
with_milestones: length([?milestones != `[]`]),
without_milestones: length([?milestones == `[]`]),
incomplete_milestones: length([*].milestones[?completed == `false`][]),
newest_project: max_by(@, ×tamps.created_at).details.name,
oldest_project: min_by(@, ×tamps.created_at).details.name,
unique_tags: length(unique([*].details.tags[]))
}
{
"total_projects": 10,
"active": 5,
"pending": 2,
"on_hold": 1,
"archived": 2,
"with_milestones": 7,
"without_milestones": 3,
"incomplete_milestones": 1,
"newest_project": "HR Portal Integration",
"oldest_project": "Legacy Email Migration",
"unique_tags": 29
}
Complex Filters¶
Multiple conditions¶
# Active projects with completed milestones, modified this month
[?status == 'active'
&& milestones[?completed == `true`]
&& starts_with(timestamps.last_modified, '2025-12')
].details.name
["Quantum Migration", "Cyber Sentinel Firewall", "Green Energy Analytics", "E-Commerce Personalization", "HR Portal Integration"]
Stale pending projects¶
# Pending projects with no recent activity (60+ days)
[?status == 'pending'
&& date_diff(now(), to_epoch(timestamps.last_modified), 'days') > `60`
].details.name
At-risk detection¶
# Active projects without any milestones (potential risk)
[?status == 'active' && milestones == `[]`].details.name
Export-Ready Formats¶
CSV row generation¶
Bullet list for reports¶
"Quantum Migration\n- Cyber Sentinel Firewall\n- Green Energy Analytics\n- E-Commerce Personalization\n- HR Portal Integration"
Full export with metadata¶
# Rich export format
[*].{
id: projectId,
title: details.name,
status: upper(status),
tags: join(', ', details.tags),
age_days: date_diff(now(), to_epoch(timestamps.created_at), 'days'),
last_touch: time_ago(timestamps.last_modified),
slug: kebab_case(details.name)
}
[
{
"id": "P-8801",
"title": "Quantum Migration",
"status": "ACTIVE",
"tags": "cloud, security, infrastructure",
"age_days": 338,
"last_touch": "1 hour ago",
"slug": "quantum-migration"
},
...
]
Function Categories Used¶
This guide demonstrates functions from these categories:
| Category | Functions Used |
|---|---|
| Array | first, last, unique, length, frequencies, group_by |
| String | upper, lower, join, split, starts_with, contains, truncate, kebab_case, snake_case, words |
| DateTime | now, to_epoch, from_epoch, time_ago, date_diff, is_same_day |
| Expression | map, filter_expr, max_by, min_by |
| Utility | includes, default |
| Fuzzy | fuzzy_match |
| Format | to_csv |
Using Query Libraries¶
Instead of typing these queries repeatedly, save them in a .jpx query library. See examples/project-management.jpx for a ready-to-use library:
# List available queries
jpx -Q examples/project-management.jpx --list-queries
# Run common analyses
jpx -Q examples/project-management.jpx:dashboard projects.json
jpx -Q examples/project-management.jpx:stale-projects projects.json
jpx -Q examples/project-management.jpx:status-counts projects.json
# Output as table
jpx -Q examples/project-management.jpx:full-export -t projects.json
See Query Files for more on creating and using query libraries.
Try It Yourself¶
Save the sample dataset to a file and experiment:
# Save the JSON to a file
cat > projects.json << 'EOF'
[ ... paste the sample data ... ]
EOF
# Run queries with jpx
cat projects.json | jpx '[?status == '\''active'\''].details.name'
cat projects.json | jpx 'frequencies([*].status)'
cat projects.json | jpx '[*].{name: details.name, tags: join('\'', '\'', details.tags)}'
Or use the interactive REPL: