I just returned from a 3-day genealogy research trip to New York City, and New York city directories are one of the main sources for data that I used for New York City ancestry research in the early 1800s. From city directories I learn occupations and residences, as well as sometimes a middle initial. These are all clues that I use to help me identify an individual.
Then I look for others with the same surname who were living at the same residence or in the same neighborhood. Often they were brothers or fathers or sons. Sometimes I get lucky and find a widow with the same address in a succeeding year, and this tells me that her husband died in the previous 12 months. If the person disappears from the city directories, then it’s possible he moved out of the city or he died in the previous 12 months.
This is just the tip of the iceberg when it comes to using city directories for building family trees.