I relied on two sources:
For safety statistics, I created an index based on the data in this study: http://www.ciudadnuestra.org/facipub/upload/cont/3222/cont/files/encuesta_victimizacion_2012_cn_2.pdf
For housing prices, I labor-intensively looked at all the listings for apartments of a medium size, and calculated price/sq mt on: http://urbania.clasificados.pe/alquiler/casas-departamentos-en-santiago-de-surco--miraflores--san-isidro-en-lima-1
My findings were not revolutionary, but they are still informative. The biggest conclusion was that the fanciest districts don't have a huge price premium over less prestigious safe districts, and are probably worth it for those who want to live in the center of things.
The safe districts are:
Tier 1: San Isidro, San Borja, Miraflores
Tier 2: La Molina, Jesus Maria, Magdalena del Mar, Surco, Barranco near the ocean
I would generally stick to those until you know the city better.
Miraflores and Barranco have the most bars/nightlife. San Isidro is the business district. San Borja is very quiet and residential. Parts of Surco near Benavides are basically Miraflores-lite (and an easy combi ride to downtown), and the northern urbanization of Chacarilla and Monterrico are upper-class, but Surco is huge, and there are isolated and shady parts, too. La Molina is very nice with walled houses where the celebrities/super-rich live - it has the best price/quality ratio of housing, better weather (less fog in the winter), but it's also way out in the boonies with only one road in (with terrible traffic at commuter ours), so you'll be isolated.
If you want to be in the middle culture and nightlife, there's no reason really not to live in Miraflores (or if you're a hipster, in Barranco), because the price difference isn't significant compared to other safe districts. I found that for a 70m place, average (asking) prices are about:
$756 in Miraflores, $728 in San Isidro, $644 in San Borja
$483 in La Molina, $609 in Jesus Maria, ? in Magdalena del Mar, $644 in Surco, $651 in Barranco
Besides living in exile in La Molina, it's only if you venture to the third tier of safety that you really get discounts: in places like Surquillo, Chorrillos, Pueblo Libre and San Miguel, it's more like $400.
Only Surquillo is really convenient for Miraflores downtown, although Chorrillos has also become a bedroom community for a younger middle class crowd.
The high-speed bus goes easily between Barranco, Miraflores, and parts of San Isidro, Surco and Chorrillos, and combis are ubiquitous, so don't rule out "boring" residential districts if you see your dream house. La Molina, maybe you should, if you ever want to venture into other districts - some people don't care!
I used to live right in the Miraflores downtown on 28 de Julio with Larco (neighbors with the Fiesta Casino and within three blocks of the three poker rooms), and it was no more expensive (about $600 all-in) but it was too hectic for me. Miraflores has its residential areas too, though, if you're into parks and trees and things - I'd recommend San Antonio and (a bit farther) La Aurora. You can take a combi down Benavides to the Via Expres for 20c, or just walk 15-30 mins - free exercise!
Overall, expect to pay about $600/month all-in (utilities, taxes) for a nice 1-bedroom in Miraflores. My girlfriends's sister pays $300/month all in for an apartment overlooking Parque Kenedy (with two roommates).
How to Find Your ApartmentI would look on http://www.adondevivir.com/ (slightly better deals) and http://urbania.clasificados.pe/alqui...idro-en-lima-1
Just walking around and calling signs in windows is also good, and it's a great way to get to know the city.