Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute energy expenditure and other properties of various physical activities
ResourceFunction["PhysicalActivityCalculator"][activities] returns energy expenditure information for activities as a Dataset. | |
ResourceFunction["PhysicalActivityCalculator"][activities, format] returns information in the specified format. |
| "activities" | a single string, with different activities and duration information separated by a delimiting character (default "\n") |
| {"activity1","activity2",…} | a list of strings |
| {{"activity1","duration1"},…} | a list of lists of activities and duration, with each element given as a string |
| "DelimiterCharacter" | "," | character used to separate activities within a single string |
| “MetabolicProperties" | {"EnergyExpenditure","MetabolicEquivalent", "FatBurned","OxygenConsumption"} | properties to be returned for each activity |
| “BodyWeight" | Quantity[160,"Pounds"] | body weight described in Quantity to compute energy expenditure |
| “UnitSystem" | "Imperial" | which unit system ("Metric" or "Imperial") to return results in |
Get energy expenditure information about activities specified in a text:
| In[1]:= |
| Out[1]= | ![]() |
Get energy expenditure information about activities specified in lists of activities and duration:
| In[2]:= | ![]() |
| Out[2]= | ![]() |
Get energy expenditure information as an ASCII table, with columns delimited by pipe characters ("|"):
| In[3]:= | ![]() |
| Out[3]= | ![]() |
Get energy expenditure information as a List:
| In[4]:= | ![]() |
| Out[4]= | ![]() |
Get energy expenditure information as an Association:
| In[5]:= | ![]() |
| Out[5]= | ![]() |
Use "DelimiterCharacter" to specify how to split up activities in a string:
| In[6]:= | ![]() |
| Out[6]= | ![]() |
Specify the desired metabolic properties using the "MetabolicProperties" option:
| In[7]:= | ![]() |
| Out[7]= | ![]() |
Use the "BodyWeight" option to specify the weight variable used to compute energy expenditure:
| In[8]:= | ![]() |
| Out[8]= | ![]() |
Use "UnitSystem" to specify the units of the result:
| In[9]:= | ![]() |
| Out[9]= | ![]() |
For running exercises, speed information can be added for more specific energy expenditure computation:
| In[10]:= |
| Out[10]= | ![]() |
PhysicalActivityCalculator uses Interpreter["PhysicalActivity"] internally to convert strings into computable "PhysicalActivity" entities:
| In[11]:= |
| Out[11]= |
| In[12]:= |
| Out[12]= |
Information about the duration of an activity is essential to compute specific energy expenditures:
| In[13]:= |
| Out[13]= |
More specific activities can be difficult to find data for:
| In[14]:= |
| Out[14]= | ![]() |
Compute energy expenditure of daily activities:
| In[15]:= | ![]() |
| Out[15]= | ![]() |
Total duration of the record:
| In[16]:= |
| Out[16]= |
Total caloric expenditure:
| In[17]:= |
| Out[17]= |
Visualize the daily activity pattern:
| In[18]:= | ![]() |
| Out[18]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License