The Wide Format
Repeated responses from a subject will appear in a single row and each response will appear in a separate column in the wide format.
<iframe width="560" height="315" src="https://www.youtube.com/embed/tgMTfUCUm-U" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>Land area and the presence of a natural amenity only have one variable per county because they do not change from decade to decade. However, one of our predictors, College, and one of our outcomes, Jobs, both have different values each year, necessitating a different variable (column) for each year.
The Long Format
Each row in the long format represents one time point for each subject. So, data will be presented in multiple rows for each subject (county). The same value will be assigned to any variables that remain constant over time in each row.
The long format of the same five counties' data is shown below. There are four rows of data for each county, one for each year.
The data is set up differently, but the information is the same.
Both Jobs and College no longer require four columns. Instead, the Jobs column has all four of the values for each county stacked together. The four College values are no different.
However, we must add a variable called Year to keep track of which observation happened in which year.
You'll see that each of the four rows for each county has the same value for the variables Land Area and Natural Amenity, which didn't change from year to year. Although it seems strange, it's okay to have it this way as long as you analyze the data properly, which will account for the fact that these are redundant.