Approximately 580 Boston apartments could be overcrowded with students living off campus and city housing officials plan to conduct safety inspections of each unit over the next few months.

The units in question were identified by housing official in the first analysis of university data ever conducted, The Boston Globe reports.

The city obtained 25,000 addresses of off-campus Boston students from 31 colleges, the Globe reports. About 580 addresses could be, potentially, housing five or more undergrad living in the same unit, violating a 2008 zoning rule which prohibits more than four full-time undergraduate students from living in the same apartment.

The city collected data from private institutions, including: Boston College, Boston University, Harvard and Northeastern. The city expects to obtain data from UMass Boston in the coming weeks, the Globe reports.

Two years ago, BU student Binland Lee was killed during a fire in her Allston apartment, trapped in her illegal attic unit.

Related coverage:

City housing officials’ analysis has it flaws. According the Globe, the city didn’t obtain addresses for every off-campus student; and many that the city did obtain didn’t specify unit numbers. Despite these imperfections, the city believes the data it did collect will help target the residential buildings that house the most undergrads and could be in violation of zoning and/or providing unsafe living conditions.

The city says it will work with students, landlords and universities to find alternative housing for students found to be living in unsafe or overcrowded units. The initial analysis of off-campus student housing could be the start of a full inspection of all of Boston’s approximately 150,000 rental units over the next five years, the Globe reports.

In 2013, more than 45,000 undergrad and graduate students lived in off-campus apartments.