It is a wide but shallow ditch that allows water to pass through it to street or drainage easement. Swales are often designed to manage water runoff. It is a water collection device.
How close can the dirt be to the siding?
The dirt should never touch the siding, a minimum of 2" of concrete between dirt and siding. Wood siding, stucco, vinyl, brick; all siding should ideally have at least 6 to 8 inches clearance above the ground. The reason for this clearance requirement is that while moisture will rot wood and damage other siding, even if the ground isn't holding water against the siding, rain splashes up and soaks the siding. Also, the closer to the ground the siding, the more easily termites can go undetected and the more easily rodents can bore their way into your home.
How much slope should my yard have?
A grass yard should be graded to have 1" of fall every 8' minimum.