The Ferry Passengers Who Appeared in a Spreadsheet

No ferry has moved, but a newsroom spreadsheet has just gained eight hundred boardings. The correspondent added information about the amenities at three American ferry terminals to an existing passenger table. Every row in the output contains a recognizable terminal, a plausible number and a real entry from the amenities list. The error emerges only when someone adds the passenger column again.
Combining tables is a routine part of reporting across borders. One file supplies counts, another provides descriptions or geography, and a shared identifier connects them. A join takes matching records from the two tables and puts their fields together. How many output rows it creates depends on how often each identifier appears in each file. That small detail can decide what an entire story says.
Give each table its own sentence
Imagine three terminals with eight hundred, five hundred and two hundred boardings during the same month. The three rows represent one terminal each for that month. The total is fifteen hundred boardings. A person making two trips can contribute twice, so the story will use “boardings” wherever it refers to this measure.
The second table contains one entry per listed amenity at a terminal. The first terminal has a waiting room and a drinking fountain. The second has a bicycle rack. There is no entry for the third. This file therefore has three rows too, but its rows represent amenities. Two three-row tables can have entirely different relationships to the places they describe.
Write down the intended result before joining them. If the goal is one row per terminal with its monthly boardings and a list of amenities, the output should contain three rows and preserve fifteen hundred boardings. A fact sheet with one row per individual amenity is a different product. Boardings can appear there as a terminal characteristic, but adding that column will count the same terminal more than once.
Watch one terminal expand
Take the passenger table as the starting table and keep every one of its rows in the result. This operation is commonly called a left join. For the first terminal there are two matching amenities, so expanding the matching records produces two rows, each showing eight hundred boardings. The second terminal appears once, with five hundred. The third appears once, with two hundred and empty amenity fields.
There are now four rows. The sum is 2,300 boardings, eight hundred above the original total. The operation has carried out a valid one-to-many match. Its results are unsuitable for summing boardings in their present form. Walk an editor through those four rows before discussing software settings. Seeing eight hundred appear under both “waiting room” and “drinking fountain” usually explains the problem in seconds.
An inner join, which keeps only matching records, would produce three rows. The third terminal disappears, and the first still appears twice. The resulting sum is 2,100. Notice the particularly convincing error here. The new file has as many rows as the original passenger file. A row count alone would have passed this output even though the coverage and the total both changed.
Check the matching field before the merge
Identify the official terminal code in each file and look at how many records use it. A terminal name can change spelling across translations. A code can omit a leading zero after spreadsheet import. Test that the two fields have compatible types and meanings. A number identifying a ferry route cannot substitute for a terminal code just because both contain three digits.
Time can be part of the key. A passenger file covering several months might legitimately repeat every terminal. An amenities directory might include records for different versions of the same facility. Decide whether the right match needs terminal and month, or a terminal and a date when the amenity was in service. An amenity installed in autumn cannot describe a spring passenger experience without a qualification.
Count the matches for each starting record and inspect every departure from the expected pattern. Keep a list of codes present only in the passenger file and another present only in the directory. In the example, the third terminal has no matching amenities row. That could mean the directory is incomplete, the codes differ or the terminal has no listed amenities. Confirm the directory’s coverage before describing a bare waiting area.
Build the table the story needs
For one row per terminal, first gather the amenities into a single list for each terminal code. The first code will now carry both the waiting room and the fountain in one record. Connect that smaller directory to the passenger table. Every terminal retains its boardings once, and the sum returns to fifteen hundred. Keep the absence of a directory match visible for the third terminal.
Another approach is to maintain two linked displays. A terminal table can carry passenger totals, and an amenities list can hold several entries per terminal. Readers interested in which terminals have drinking fountains can follow the directory. A question about how many boardings occurred at terminals with a fountain requires first identifying qualifying terminals, then counting each terminal’s boardings once in the relevant period.
Reconcile the published result
Check the count of distinct terminals, the total boardings and the individual record for a terminal with multiple amenities. Repeat the checks for one with exactly one match and one without a match. Where both input tables repeat a key, every matching pair can generate a row. Two passenger records for a terminal and three directory records can become six combinations unless another field limits the match.
Give the editor the original fifteen-hundred figure and a short account of the unmatched terminal. If a designer later reshapes the file into one line per amenity for a mobile graphic, repeat the total check in the exported version. The reporting should let readers discover where they might sit or fill a bottle without adding a single fictional boarding to the ferry system.