Multiple Types of Observational Units are Stored in the Same Table
Tidy Data Rule(s) Broken: Each type of observational unit forms a table
Select the "should-be-multiple" table from the left pane.
This table holds course descriptions and professor’s Google Scholar citation statistics. These are 2 observations although they do have the “professor” in common.
DUPLICATE THE TABLE:
- In the left pane, right click on the “should-be-multiple” query. Select Duplicate from the drop-down menu
Click for Navigation help
DELETE COLUMNS:
-
In the original “should-be-multiple” table. Select all the columns that are related to citations (other than the professor). To do so hold CTRL (Windows) or Command (Mac) and click on the headers. If the columns are highlighted, they are selected.
-
On the Home tab in the Manage Columns section, click Remove Columns
Click for Navigation help
RENAME TABLE:
- To differentiate your new table from the other one, name it to identify the observation (eg. “Courses”)
Click for Navigation help
DELETE COLUMNS IN OTHER TABLE:
- Switch to the “should-be-multiple (2)” table.
- Select all the columns that are related to courses (other than the professor). To do so hold CTRL (Windows) or Command (Mac) and click on the headers. If the columns are highlighted, they are selected.
- On the Home tab in the Manage Columns section, click Remove Columns
Click for Navigation help
REMOVE DUPLICATES:
- Now you have repeated rows. To delete repeats, right click on the header “Professor” and select Remove Duplicates
Click for Navigation help
RENAME TABLE IN OTHER TABLE:
- To differentiate your new table from the other one, name it to identify the observation (eg. “Google Scholar Citations”)
NEXT STEP: Should be in the Same Table