I'm travelling to Japan in February next year. To be precise to either Kawasaki or Yokohama.
Are there specific areas we should avoid for safety reasons in Tokyo and Ueda?
Thanks in advance.
Tokyo is exceedingly safe, particularly by American standards. While Tokyo, like any large city, has both wealthier and poorer parts, there are no "slums" worthy of the label and the odds of being violently assaulted or mugged are virtually zero regardless of where you go.
The one potential exception is if you go to nightlife districts, notably Roppongi, and let yourself be lured by touts into adult entertainment clubs, where you may either get your drink spiked or just run up a ridiculous bill. This is easily avoided by choosing your own places to go.
Roppongi is an upscale and quite good neighborhood otherwise; just be careful when it comes to night life.
On the other hand, try to avoid the red light districts, such as Kabuki-cho and Shinjuku 2-chome. If you go, don't engage anyone and especially don't partake in "special" activities. Most likely you won't get mugged or anything, but do be careful.
Also, avoid missionaries and far-right protesters (i.e. people shouting with loudspeakers and who apparently are not campaigning politicians), as they occasionally pop up at the street. They won't do any harm to you, but conflict is more likely around them (plus they're really annoying).
As for Ueda, I have not been there but the city looks like an idyllic city in the mountains (but not middle of nowhere either). Therefore I would be even less concerned with safety there. Of course, if you do hike, pay attention to geological failure and animals as usual (and, in the winter, snowstorms). According to the comments, this basically means stay on paved roads.