Living in the city, you still must be streetwise if you want to avoid crime
I raise this issue, with fear about being accused of "blaming the victim" with regard to various crimes reported lately in DC, from cars being stolen at gas stations--because you left the keys in the ignition--to sexual assaults of people walking on the street at 3 am ("Woman sexually assaulted, robbed in Petworth near Metro station," Post) or bikes stolen from a neighbor's garage (a report from our neighborhood Nextdoor website) in areas that abut problem areas of the city.
I almost can't count the number of bad things (muggings, burglaries, stolen rental car, physical assault that led to a breakup of my marriage, etc.) that I've experienced here--mostly from 1989 to the early part of the last decade, accentuated by my being either young and dumb (when I first moved here, I was unfamiliar with the level of "street smarts" necessary to live safely in the "inner city") or living in or near "bad areas" and traveling through them (something discussed in an edition of the Annals of the American Academy of Political and Social Science that I recall as being from the late 1980s, as associated with a higher risk of being a victim of crime).
Now I don't think about it as much, but I still aim to be careful and judicious and not take extranormal chances with my safety, recognizing that DC is a center city and the juxtaposition of the well off and the impoverished provides greater opportunities for crime to occur.
So when I see a white woman running alone at night around midnight on North Capitol Street NW one block from New York Avenue I am very surprised as it seems a bit risky.
One of the better ways to ward off "random" violence is to reduce the number of times you subject yourself to the conditions where it thrives. The "crime triangle" refers to the fact that perpetrator and victim need to be in the same place for a crime to occur.
From time to time I mention the books of Elijah Anderson, Streetwise and Code of the Street, and how informative they are in terms of understanding crime in the city.
See for example the 2009 blog entry "Dealing with crime (in DC and elsewhere)" which makes the distinction between what we might call "random" violence and gang-related crime.
I make the point that I would have avoided many problems, had these books been available for me to read before I moved to the city.
Because things are "so much better" than they were 20+ years ago, some people may believe that across the board, it's always safer too.
DC is still a city.
See the Courtland Milloy column from 2006, "Violent Robberies Make It Hard to Ignore D.C.'s Vicious Side."