When coders visualize data, they try to find patterns in the data that tell them something about the source of the data. We ask questions like: If we know your step count for a particular day, can we predict that day's average heart rate, and why? Or: How unusual is your highest recorded distance walked, compared to all the other days' distances?
In order to start answering these questions, we will start exploring graphs. Try running the code below.
<iframe data-type="datacamp" id="extra-2-1" height="350" src="https://uclatall.github.io/mtucker-coding-study/data-camp/dc-extra-2-1.html" style="border: 0px #ffffff none;" width="100%"></iframe>Now that you see what the gf_histogram
function does, modify the code so that it graphs distance
instead of heart_rate
. What do you notice about the tallest peaks of both of the graphs you've produced?
Great! You have probably inferred some information about how the gf_histogram
function works. The gf_dotplot
function is similar. Use this function to create a dot plot of distance
. How does this compare to the histogram of distance
? See if you can find similarities and differences.