As for Madrid I would avoid the south of the city center, that is, Lavapies. It is much safer now than a year ago but I would still skip it. I would
not go to the area left to Chueca: Barco st etc..... specially at night.
I would stick to Huertas, El Madrid de los Austrias, Salamanca, these are some of the safest districts.