10/10/2023 0 Comments Dog life expectancy chart by weight![]() But here in the blog (and other places you might want to show such a graph), it would be nice to show the breeds on the graph. If you're viewing the interactive HTML version of the graph, you could see the dog breed in mouse-over text. Scatter y=life_expectancy x=weight_mid_lb / markerattrs=(color=red size=10) Highlow y=life_expectancy low= weight_min_lb high= weight_max_lb / lineattrs=(color=red) I draw a horizontal line from the minimum weight to the maximum weight for each breed (using SGPlot's highlow statement). Therefore I took a simpler, more direct approach. In the original plot, they tried to represent the weight range with the size of the markers (or bubbles) - that confused a lot of people, and got a lot of negative comments in the Reddit thread. Scatter y= life_expectancy x= weight_mid_lb / markerattrs=(color=red size=10) īut there's a bit more information in the data (the minimum and maximum weight for each breed), and I don't want to lose that. ![]() I started simple, with just a scatter plot of the life expectancy along the left axis, and the weight along the bottom axis (since I needed a single value for the weight, I used the 'mid' value). and we like it!) I also calculated a value midway between the minimum and maximum (weight_mid_lb) - this is where I plot the scatter markers. I parsed the weight range into two separate variables, and converted them from kilograms to pounds (I know, I know - but we do pounds here in the US. I copy-n-pasted the csv text data into the datalines section of my SAS job, and then massaged it a bit. Collecting the weight ranges for each breed was probably a lot of work, and I'm thankful the author included a link to their final data! Here's a screen-capture showing what a few lines of their data looks like: They got the life expectancy from this Wikipedia page, and then the weight ranges from the pages for the individual breeds. Thankfully the graph author mentions the data source in the Reddit comments. The curved arrows could also be misleading - I originally thought they represented 'movement' from point A to point B. And I'm not sure of the significance of the "30-seconds" they mention in the title. One problematic feature was using bubble sizes to represent the weight range of the breeds - that seemed a little confusing. I thought their graph was an OK way to represent the data in general. It seems to indicate that there is a fairly strong relationship between a dog's life expectancy and weight. The following graph on Reddit is what got me thinking about this topic. ![]() ![]() It was too difficult to pick a favorite, so I put them all in a collage: It seems that all of my Facebook friends are dog owners, and they all had a picture (or two) that they were happy to share. I naively asked my Facebook friends if any of them had a picture of their dog that I could use in this blog - little did I know the 'flood' that would ensue. Some live longer than others, but what are the determining factors? Let's throw some data to this problem, and see if we can fetch some answers!īut before we get started, how about a random picture to get you into the mood for a dog blog.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |