How to Find Bodyweight-Only Exercises in the Exercises-Dataset Repository
Filter the data/exercises.json file for objects where the equipment property equals "body weight" to extract exercises requiring no external equipment.
The hasaneyldrm/exercises-dataset repository contains approximately 30,000 exercise entries in a single JSON file. To find bodyweight-only exercises, you parse this file and filter entries where the equipment field matches the specific literal string "body weight". This approach works across any programming language that supports JSON parsing.
Understanding the Equipment Field Structure
The master dataset resides in data/exercises.json at the repository root. Each exercise object includes an equipment property that specifies what tools are required for the movement.
When this field contains the exact string "body weight", the exercise requires no external equipment and can be performed using only the practitioner's body mass. Representative entries demonstrating this structure appear throughout the file:
- Exercise #0001 at lines 7-9:
"equipment": "body weight" - Exercise #0109 at lines 109-111:
"equipment": "body weight" - Exercise #0210 at lines 210-212:
"equipment": "body weight"
The data/exercises.schema.json file formally defines this property at line 87, documenting that valid values include "dumbbell", "body weight", and other equipment types. Referencing this schema ensures your filter targets the correct literal string rather than variations like "bodyweight" or "none".
Filtering Methods by Language
Because the source file is a standard JSON array, you can filter it using any language or tool that supports JSON parsing. Below are production-ready implementations that match the logic shown in the repository's own documentation.
Python Implementation
The README.md file at lines 321-322 demonstrates this filter pattern using Python's standard library.
import json
import pathlib
# Load the JSON file
exercises_path = pathlib.Path(__file__).parent / "data" / "exercises.json"
with exercises_path.open(encoding="utf-8") as f:
exercises = json.load(f)
# Keep only body-weight exercises
bodyweight = [ex for ex in exercises if ex.get("equipment") == "body weight"]
print(f"Found {len(bodyweight)} body-weight exercises")
This approach uses .get() to safely handle any missing keys while filtering the list comprehension.
JavaScript Implementation
The repository's index.html file at lines 370-371 contains an equivalent JavaScript filter used in the web demo.
const fs = require('fs');
const path = require('path');
// Load the JSON file
const dataPath = path.join(__dirname, 'data', 'exercises.json');
const exercises = JSON.parse(fs.readFileSync(dataPath, 'utf8'));
// Filter for body-weight only
const bodyweight = exercises.filter(ex => ex.equipment === 'body weight');
console.log(`Found ${bodyweight.length} body-weight exercises`);
Bash and jq Command-Line
For quick command-line extraction without writing a script, use jq to filter and save the results.
jq '[.[] | select(.equipment == "body weight")]' data/exercises.json > bodyweight.json
jq 'length' bodyweight.json
The first command creates a new JSON array containing only matching exercises, while the second counts the results.
R Implementation
Using the jsonlite package, you can load and filter the dataset in R.
library(jsonlite)
exercises <- fromJSON("data/exercises.json")
bodyweight <- subset(exercises, equipment == "body weight")
cat("Found", nrow(bodyweight), "body-weight exercises\n")
Validation Against the Schema
The repository includes a JSON Schema at data/exercises.schema.json that formally defines the structure. Line 87 explicitly documents the equipment property as storing the "Required equipment (e.g. "dumbbell", "body weight")", confirming that "body weight" is the canonical value for equipment-free movements.
Summary
- Data location: All exercises reside in
data/exercises.jsonas a JSON array of objects. - Filter criteria: Check for
equipment == "body weight"(exact string match, including the space). - Implementation: Any JSON-capable language works; the repository provides Python examples in
README.mdand JavaScript examples inindex.html. - Validation: The schema at
data/exercises.schema.jsonconfirms the field structure and valid values.
Frequently Asked Questions
Where is the exercise data stored in the repository?
The complete dataset resides in data/exercises.json at the repository root. This file contains approximately 30,000 exercise objects, each with fields including id, name, category, body_part, and equipment.
What exact value should I filter for to find bodyweight exercises?
Filter for the literal string "body weight" (with a space, not "bodyweight"). The data/exercises.schema.json file confirms this is the canonical value, and entries throughout data/exercises.json such as lines 7-9 use this exact formatting.
Can I filter the data using command-line tools without programming?
Yes. Install jq and run jq '[.[] | select(.equipment == "body weight")]' data/exercises.json. This extracts the matching objects directly to standard output or a new file without requiring Python, JavaScript, or other runtime environments.
Does the dataset include exercises with no equipment specified?
The equipment field typically contains descriptive strings rather than null values. Exercises meant to use only bodyweight explicitly set "equipment": "body weight". Always check for this specific string value rather than assuming missing or null equipment fields indicate bodyweight exercises.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →