By Selena Hill (staff@latinospost.com) | First Posted: Oct 22, 2013 07:47 PM EDT

For the third year in a row, San Francisco has been crowned as the best city to go trick-or-treating around the country, according to Zillow, a real estate company.

Every year, Zillow ranks the 20 best cities around the country for trick or treaters in search of the most candy on the safest streets. After San Francisco, the other top five cities of 2013 that topped the list are Boston, Honolulu, San Jose and Seattle.

The rating is based on home values, population density, walkability and crime data.

"San Francisco has some of the highest home values and incomes in the country," said Amy Bohutinsky, chief marketing officer for Zillow, reports the Business Insider. "Plus, it's a dense urban area. You can hit lots of single family homes side by side. It's the perfect storm of all our factors."

Although San Francisco may be a great place for children on Oct. 31, it's ironically a city with a very small child population. It is also one the most expensive places to live in the nation. Home prices have skyrocketed over the years in the bay, each worth an average of $1.43 million in August 2013, a 17.7 percent increase from last year. San Francisco also scored an 86 out of 100 on WalkScore.com, which earned Noe Valley a "very walkable" rating.

The index ranks cities by how much candy they give out versus how far kids have to walk to get it, and how safe it is to get from house to house. Zillow considered its own Home Value Index, population density, Walk Score, and local crime data from Relocation Essentials to compile the list.

© 2015 Latinos Post. All rights reserved. Do not reproduce without permission.