SAN FRANCISCO—In a study done by Wallet Hub, San Francisco was ranked among the worst cities for drivers.

Wallet Hub, a financial comparison site, compiled data on the hundred most populated cities of the US to determine its ranking.

According to the study, San Francisco lands number 97 in the ranking. The city has some of the highest average annual hours of traffic delay, and is also one of the most accident-prone cities compared to the national average.

The study took into account three major factors: the costs of driving, including gas prices, car insurance, and maintenance costs; road conditions together with traffic data; and the safety of the driver measured by 6 sub factors inclusive of the likelihood of an accident. Driver and car wellness, which depended on number of repair shops and dealerships, was a smaller category that added to the study.

San Francisco received the following rankings in the subcategories: 100th rank in costs, 91st in traffic and road conditions, 58th in safety, and 83rd for driver and car wellness.

The best place to be a driver is Lubbock, Texas, which is ranked as the 85th most populous city in the US according to the 2014 Census.

New York City came in at a 100, making it the worst city to drive in.

According to Elizabeth A. Deakin, professor of regional planning and urban design at UC Berkley, improved design of merges and metering to control freeway congestion help decrease the traffic issues, but better transportation options make a big difference. She also noted that “drivers should pay attention to fuel efficiency standards” when they buy a car in order to save money because they end up saving in the long run.