Yoga for Health and Knowledge
The Wolfram Knowledgebase includes a curated dataset encapsulating data on yoga poses. As a result, the relationships between poses, their difficulty levels, the muscles they involve, their durations, and many other characteristics can be explored and studied in a simple, powerful, precise, and completely programmatic way.
Form and visualize the relationships of yoga postures based on the "PreparatoryPoses" relationships, starting with the scorpion pose.
![Click for copyable input](assets.en/yoga-for-health-and-knowledge/In_89.png)
poseGraph =
NestGraph[Cases[EntityValue[#, "PreparatoryPoses"], _Entity] &,
Entity["YogaPose", "ScorpionPose"], 4, VertexLabels -> "Name",
VertexLabelStyle -> LightGray]
![](assets.en/yoga-for-health-and-knowledge/O_68.png)
Show schematic images of various poses.
![Click for copyable input](assets.en/yoga-for-health-and-knowledge/In_90.png)
With[{v = Take[VertexList[poseGraph], 5]},
schm = Rule @@@ Transpose[{v, EntityValue[v, "Schematic"]}]
] // Column
![](assets.en/yoga-for-health-and-knowledge/O_69.png)
Make a plot of poses grouped by "communities" that share interlinkages.
![Click for copyable input](assets.en/yoga-for-health-and-knowledge/In_91.png)
CommunityGraphPlot[EdgeList[poseGraph] /. e_DirectedEdge :> Reverse@e,
VertexLabels -> Placed["Name", Tooltip]]
![](assets.en/yoga-for-health-and-knowledge/O_70.png)
Count the number of muscles contracted in the series of poses in Ashtanga Primary yoga sequence and plot against the number of muscles engaged.
![](assets.en/yoga-for-health-and-knowledge/O_71.png)
Find muscles that are stretched in the series of poses in Sun Salutation A and visualize the most frequently stretched muscle.
![Click for copyable input](assets.en/yoga-for-health-and-knowledge/In_94.png)
muscles = (SortBy[
Tally[DeleteMissing[
Flatten[EntityValue[
Cases[Entity["YogaSequence", "SunSalutationA"][
"PrimaryPoseSequence"], _Entity, Infinity],
"StretchedMuscles"]]]], Last] // Reverse) // Take[#, 20] &
![](assets.en/yoga-for-health-and-knowledge/O_72.png)
Visualize the most frequently stretched muscle.
![Click for copyable input](assets.en/yoga-for-health-and-knowledge/In_95.png)
EntityValue[muscles[[1, 1]], "RegionalLocationImage"]
![](assets.en/yoga-for-health-and-knowledge/O_73.png)
Use an implicitly defined entity class to find and visualize beginner medium-intensity yoga poses that stretch the leg and strengthen the core.
![Click for copyable input](assets.en/yoga-for-health-and-knowledge/In_96.png)
EntityList[
Entity["YogaPose", {"ExperienceLevel" -> "Beginner",
"IntensityLevel" -> "Medium",
"SitesOfImprovedMobility" -> Entity["AnatomicalStructure", "Leg"],
"SitesOfImprovedStrength" ->
Entity["AnatomicalStructure", "Abdomen"]}]]
![](assets.en/yoga-for-health-and-knowledge/O_74.png)
View schematic images of these poses as an entity association.
![Click for copyable input](assets.en/yoga-for-health-and-knowledge/In_97.png)
EntityList[
Entity["YogaPose", {"ExperienceLevel" -> "Beginner",
"IntensityLevel" -> "Medium",
"SitesOfImprovedMobility" -> Entity["AnatomicalStructure", "Leg"],
"SitesOfImprovedStrength" ->
Entity["AnatomicalStructure", "Abdomen"]}]];
EntityValue[Take[%, 5], "Schematic", "EntityAssociation"]
![](assets.en/yoga-for-health-and-knowledge/O_75.png)
Show advanced yoga poses that strengthen the iliopsoas and stretch the hamstrings.
![Click for copyable input](assets.en/yoga-for-health-and-knowledge/In_98.png)
EntityValue[
Entity["YogaPose", {"ExperienceLevel" -> "Advanced",
"PrimaryContractedMuscles" ->
Entity["AnatomicalStructure", "Iliopsoas"],
"StretchedMuscles" ->
Entity["AnatomicalStructure",
"SetOfHamstringMuscles"]}], "Schematic", "EntityAssociation"]
![](assets.en/yoga-for-health-and-knowledge/O_76.png)
Find yoga sequences with durations between 30 and 60 minutes.
![Click for copyable input](assets.en/yoga-for-health-and-knowledge/In_99.png)
EntityList@
Entity["YogaSequence", {"EstimatedDuration" ->
Quantity[ Interval[{30, 60}], "Minutes"]}]
![](assets.en/yoga-for-health-and-knowledge/O_77.png)