Richer Knowledgebase Access

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.

In[1]:=
Click for copyable input
poseGraph = NestGraph[Cases[EntityValue[#, "PreparatoryPoses"], _Entity] &, Entity["YogaPose", "ScorpionPose"], 4, VertexLabels -> "Name", VertexLabelStyle -> LightGray]
Out[1]=

Show schematic images of various poses.

In[2]:=
Click for copyable input
With[{v = Take[VertexList[poseGraph], 5]}, schm = Rule @@@ Transpose[{v, EntityValue[v, "Schematic"]}] ] // Column
Out[2]=

Make a plot of poses grouped by "communities" that share interlinkages.

In[3]:=
Click for copyable input
CommunityGraphPlot[EdgeList[poseGraph] /. e_DirectedEdge :> Reverse@e, VertexLabels -> Placed["Name", Tooltip]]
Out[3]=

Count the number of muscles contracted in the series of poses in Ashtanga Primary yoga sequence and plot against the number of muscles engaged.

show complete Wolfram Language input
In[4]:=
Click for copyable input
mus = Normal[ EntityValue[ Cases[Entity["YogaSequence", "AshtangaPrimarySeries"][ "PrimaryPoseSequence"] /. Entity["YogaSequence", s_] :> Entity["YogaSequence", s]["PrimaryPoseSequence"], _Entity, Infinity], "PrimaryContractedMuscles", "EntityAssociation"]] /. Rule[l_, r_] :> l -> Length[r];
In[5]:=
Click for copyable input
ListLinePlot[mus[[All, -1]], Filling -> Axis, AspectRatio -> .4, AxesLabel -> {"pose position", "contracted muscles count"}]
Out[5]=

Find muscles that are stretched in the series of poses in Sun Salutation A and visualize the most frequently stretched muscle.

In[6]:=
Click for copyable input
muscles = (SortBy[ Tally[DeleteMissing[ Flatten[EntityValue[ Cases[Entity["YogaSequence", "SunSalutationA"][ "PrimaryPoseSequence"], _Entity, Infinity], "StretchedMuscles"]]]], Last] // Reverse) // Take[#, 20] &
Out[6]=

Visualize the most frequently stretched muscle.

In[7]:=
Click for copyable input
EntityValue[muscles[[1, 1]], "RegionalLocationImage"]
Out[7]=

Use an implicitly defined entity class to find and visualize beginner medium-intensity yoga poses that stretch the leg and strengthen the core.

In[8]:=
Click for copyable input
EntityList[ Entity["YogaPose", {"ExperienceLevel" -> "Beginner", "IntensityLevel" -> "Medium", "SitesOfImprovedMobility" -> Entity["AnatomicalStructure", "Leg"], "SitesOfImprovedStrength" -> Entity["AnatomicalStructure", "Abdomen"]}]]
Out[8]=

View schematic images of these poses as an entity association.

In[9]:=
Click for copyable input
EntityList[ Entity["YogaPose", {"ExperienceLevel" -> "Beginner", "IntensityLevel" -> "Medium", "SitesOfImprovedMobility" -> Entity["AnatomicalStructure", "Leg"], "SitesOfImprovedStrength" -> Entity["AnatomicalStructure", "Abdomen"]}]]; EntityValue[Take[%, 5], "Schematic", "EntityAssociation"]
Out[9]=

Show advanced yoga poses that strengthen the iliopsoas and stretch the hamstrings.

In[10]:=
Click for copyable input
EntityValue[ Entity["YogaPose", {"ExperienceLevel" -> "Advanced", "PrimaryContractedMuscles" -> Entity["AnatomicalStructure", "Iliopsoas"], "StretchedMuscles" -> Entity["AnatomicalStructure", "SetOfHamstringMuscles"]}], "Schematic", "EntityAssociation"]
Out[10]=

Find yoga sequences with durations between 30 and 60 minutes.

In[11]:=
Click for copyable input
EntityList@ Entity["YogaSequence", {"EstimatedDuration" -> Quantity[ Interval[{30, 60}], "Minutes"]}]
Out[11]=

Related Examples

de es fr ja ko pt-br ru zh