Part 1 - Section 2: Creating Distributions
A table is a basic unit for data storage. Data in the table is stored in a cell that is an intersection of a vertical column and horizontal row. The table has a specified number of columns, but can have any number of rows. With DataGrip, you can perform data manipulation and data definition operations with tables. Tables are more appropriate when:
- The user needs to reference specific numerical values.
- The user wants to compare numerical values and not vague similarities.
- The values being displayed are unable to be compared using charts.
|
|
In designing an effective table, keep in mind the data-ink ratio and avoid the use of unnecessary ink tables:
- Avoid using vertical lines because they make tables look cluttered and therefore unreadable.
- Horizontal lines are generally used to separate the titles of columns.
- In large tables, vertical lines or light shading can be usedful to help the reader distinguish the columns and rows.
- Horizontal lines are used for separating column titles from data values or when indicating that a calculation has taken place.
- Columns of numerical values in a table should be right-aligned.
- All values should include the same number of digits to the right of the d ecimal.
- Left-align text values within a column in a table.
- Column headings should either match the alignment of data in teh columns or be centered over the values.
Crosstabulation
A useful type of table for describing data of two variables is a crosstabulation, which provides a tabular summary of data for two variables.
Consider the following example that shows a survey of what electronic gadget a group of people were likely to buy in the next 6 months dependent on their age.
Age | Laptop | Phone | Tablet | Digital Camera |
20--24 | 38% | 29% | 31% | 12% |
25--29 | 19% | 15% | 24% | 17% |
30--34 | 23% | 19% | 11% | 27% |
35--39 | 19% | 12% | 9% | 30% |
above 40 | 12% | 17% | 5% | 31% |
You can see the distinctive connection between the age and the purchase of the electronic gadget.
PivotTables in Excel
A crosstabulation in Microsoft Excel in known as PivotTable. PivotTables in Excel are interactive and they may be used to display statistics or a simple count of numbers. So follow the following steps.
- Click Insert, click PivotTable in the Tables group
- When the Create PivotTable appears: choose Select a Table or Range, select New Worksheet, click OK
- In the PivotTable Fields task pane, go to Drag fields between areas below
- Select Value Field Settings from the list of options
- When the Value Field Settings dialog box appears: Under Summarize value field by, select Count, Click OK.
Example: Consider the data that comes from reviews of 25 Ice Cream Shops in New York.
|