Tutorial 2: Analyzing Data
In the tutorial TinkerPlots Basics, you learned how to enter data into TinkerPlots and make basic plots. In this tutorial, you will learn to:
- Measure averages
- Use the ruler tool to measure distances
- Use dividers and hats to estimate central clumps
- Use counts to see the number or percent of data in a bin, division, or plot
- Use the color meter to see the average color in a selected area of the graph
Exploring Averages and Distributions
- Choose File | Open Sample Document. From the Tutorials folder, open the file Analyzing Data.tp.
- You will see data cards with information about each state in the United States, a text box describing the attributes, and a plot. Read the description of the RedBlue_State attribute to see how RedState and BlueState are defined in this data set.
You can use TinkerPlots to compare educational spending in red and blue states.
- Find Ed_Spending in the data cards and drag this attribute onto the horizontal axis of the plot. Drag a case icon to the right to fully separate the values, and stack the cases vertically.
- Click RedBlue_State in the data cards, and then drag a red case icon (in the plot) up to separate the values.
- Click the Mean button to display the average for each group. You can also use the Median button to show a different measure of center.
- To show the numeric value of the mean, click the Average Options button and choose Show Numeric Value(s). You can see that the mean educational spending per student in the blue states is greater than in the red states.
- To determine how much greater, click the Ruler button in the upper plot toolbar. Move the ends of the ruler to the two means - the means of the two plots. You can lock the ends of the ruler onto the means by clicking on the ruler's end line and dragging the cursor to the mean symbol itself. A circle around the mean marker indicates that you are locked onto that value. What is the difference of the averages?
- Click the Ruler button and the Mean button again to turn off the ruler and the means.
- Click the Dividers button.
Click and drag the top corners of the divider to change its size and position. Adjust each divider so that it includes the "center clump" of data.
- Now click one of the Counts buttons to display how many cases are in each divider. You can click N to display the number, or % to display the percent of data in each area.
- Click N or % again to turn off counts.
- Click the Hats button to display a hat plot of the data.
The center clumps in your dividers should be close to where the hat is, while the "brim" reaches to the data points on either side of the center clump.
- Adjust the dividers to match the hats. About what percent of data lies within the hat? About what range of spending lies within the hat for red states? Blue states? This is called a Percentile Hat. You can explore other types of hats by clicking the Hat Options button.
Using the Color Meter
Now you'll use the color meter to look at population density in the United States.
- First click the Mix-up button to clear your plot.
- Click Longitude in the data cards and drag it to the horizontal axis. Fully separate the values.
- Click Latitude in the data cards and drag it to the vertical axis. Fully separate the values. You should see a plot that somewhat resembles a map of the United States. What do the two left-most cases represent?
- Click PopDensity to color the cases.
- Click the Meter button to turn on the color meter. The color meter shows the color representing the average value for cases within its rectangle.
- Make the color meter narrower by dragging one edge.
- Click within the color meter and drag it across the plot. Do you notice any trends as you drag it to the right? Which areas of the country appear to be the most densely populated?
- You can also create snapshots of the color meter. Move the color meter to the left edge of the plot, and double-click inside it. Double-click again to create another snapshot. Repeat this until the snapshots fill the plot. Ignoring snapshots with only 1 or 2 cases, do you notice any trends?
- Click the Meter button again to turn the color meter off.
You can also use the color meter's Line Trace to analyze population density.
- Click PopDensity and drag it to the vertical axis.
- Click the Meter button to turn on the color meter, and resize the color meter to be about half as wide.
- Click the Color Meter Options button and choose Line Trace.
- Click and drag the color meter from left to right across the plot. As you do so, observe the line being drawn. It represents the average value within the color meter as you drag it across the plot. Does this value correspond to your answer to Question 20?
You may wish to further explore these data by investigating the question "Do states with lotteries spend more money on education?"
In the next tutorial, Simulating Data, you will learn how to build a sampler to model data.