Eating Meat on a Diet: What Meats Have the Fewest Calories?

Jacob Mattheis
INST414: Data Science Techniques
4 min readSep 19, 2023
Caloric density by gram of meat varies depending on the source and processes they go through which raises the question: which meat has the fewest calories?

In todays day and age, grocery stores and online marketplaces provide consumers with an almost infinite amount of meat choices when shopping. This large selection leaves consumers in the situation where they often have to decide between eating one type of meat over another. People can make these choices based on taste, price, who they are cooking for, religion, or dietary purposes. Given a data source that holds 107 different types of meats available to consumers, an insight I am interested in extracting would be figuring out which meat is the least calorie dense.

The data I chose to use for this analysis is from calories.info, a website commonly used by individuals who are seeking a healthier lifestyle, hyperlinked here. Calories.info is a very reputable site for getting the average amount of calories per serving of an item. The credibility associated with this site will add value to our data and subsequent analysis. This information can help consumers make more educated decisions when shopping.

Calories per gram= Calories per serving size/ Serving size (# of grams)

Extraction and Analysis:

This data was extracted via APIs from Calories.info. First, I went to the calories.info site and found the page which listed all of the meats, their serving sizes, and calorie counts. I then right clicked on the page and selected ‘inspect’. From the popup that occurs after selecting ‘inspect’, I clicked on ‘Network’ and then ‘Fetch/XHR’.

View of my screen during the process mentioned above.

After refreshing the page, I was shown that the site uses multiple .json files when loading. I went through these until I found the file which held the information I was seeking (Page-data.json, shown in the image above). I then copied this json file as a cURL and pasted the cURL into insomnia, which helped me write the start of my program, shown below.

Code provided by Insomnia given cURL

Once provided with the base code from insomnia, I was ready to get coding. Prior to deciding how I am going to go about doing this, I wanted to check the data to see if there were any issues that needed to be attended to such as inaccurate or missing data. Determining whether or not if the information from calorie.info was accurate proved to be a problem initially due to the fact that they are likely the source that someone would go to for the purpose of information verification. However, by sorting the data, I was able to find that two meats (Hot dog sausage and Beef Tripe) reportedly had 0 calories per serving. A quick internet search proved this information to be incorrect so those items were removed from our dataset. Missing values from our data were much easier to eliminate. If an item in the .json file did not have a value for both calories and serving size, they would not be incorporated into the final analysis. This was done via an ‘if’ statement in python.

Conclusion

The results of our analysis showed that the top 3 meats with the lowest caloric density are beef lung, water buffalo meat , and beef kidney. A bar chart of the results from the analysis are below.

Chart Created Via Python

This information can be used by calorie conscious individuals who wish to get a bit more slim, personal trainers trying to get in shape, or dietitians who are calorie counting for the sake of others.

Limitations

There are a multitude of limitations associated with this analysis. The first few are related to the quality of our data. Earlier it was shown that the data source had inaccuracies that I was able to detect. There may have well been several other inaccuracies that I was unable to recognize. A second limitation with this assignment is the number of items within our data frame. While 107 different meats may seem like a wide variety, it is more than likely not a comprehensive list. For certain meats, the style in which they were cooked is associated with their calorie count while for others, there is no mention of the meats preparation. A truly exhaustive list would have every type of meat as well as every type of way this meat can be cooked. Another limitation is that our data only had 3 fields, name, calories, and serving size. More data would be preferable so additional analysis can be made such as, what is the most protein dense meat per calorie? In summary, this analysis provided insights into what meats have the lowest caloric density and could potentially help an individual make better choices in relation to their health

The code used for this analysis is available here

--

--