I've had multiple people throw stuff at me from cars, I've had a teenager take a swing at me with a baseball bat from the curb, I've had a car stalk me for eight blocks driving inches from my back tire late at night. This is mostly West Oakland and the parts of of North Oakland along Adeline that gets you up to Berkeley -- I can't really comment on East Oakland or the hills. YMMV, of course.
I've been to your part of the world. The entire area felt unsafe everywhere. I got into a semi-fight on the bus for taking a seat. I've had poets aggressively push there words. It seems like the area is ready to explode.
Detriot feels much safer. People mostly leave you alone.
Wear the wrong colors could be an issue. The boards over windows is a little bit scarier but in Detriot you feel more prepared, even expect something to happen so it rarely does. In Oakland/SanF things can be very calm but turn really quickly.
If there’s one thing that gets my goat it’s overly aggressive poets. The media really need to pay attention to this widespread problem. Once in Detroit a 15-line sonnet almost got me into fisticuffs with the so-called poet. Let’s just say I grew up in the mean streets of Anaheim and she didn’t stand a chance.