From my experience, gun violence in the US is mostly prevalent in the poorer neighborhoods. If you avoid those areas, you will likely not have any issues. I grew up in New York City and lived several years in Buffalo. I knew the areas to avoid (and what times) and I never had an issue. Hence I didn't experience a huge decline in gun violence when I moved here (Toronto) because I never really experienced any when living in the US. IMHO, the reports of gun violence in the US is a little bit hyped up here.
HOWEVER, I will say that there are a lot less of these "dangerous" areas in Canada and the level of danger in these areas are much less than what you would see in some parts of the US. For example, I have been through the "dangerous" areas in Toronto and did not really feel threatened much whereas some parts of Buffalo and NYC I was definitely concerned.