It's pretty cheap to have soil samples tested, but it winds up just confirming what you expect - our NYC backyard had 18x the upper limit for lead! Definitely raised beds.
Hydroponics is also perfect for polluted urban areas. Generally produces a higher yield per area and absorbs co2 at a higher rate; with the caveat being that there is potentially a higher rate of maintenance.
Assuming you're not converting some dense residential zoned area into a garden and no one moves away due to their dislike of hydroponics, I don't think it's going to tangibly effect traffic rates which are show to fluctuate based on availability. Ie. after reaching a certain point of urban density; if you increase the availability of the road (by widening it for example), you'll increase the number of people driving such that the availability is reduced again.
If you want to reduce traffic and co2 further while increasing livable, walkable space in dense urban areas - then that can be accomplished by reducing the width of the roads.
Locally, definitely. If urban heat island effects are a problem then co2 displacement would be beneficial. There is also the future possibility of processing waste streams locally and using that.