Sunset is the moment the top edge of the sun drops out of sight, the definition published times use (Wikipedia, Sunset: "the moment the upper limb of the Sun disappears below the horizon"); sunrise is the top edge appearing. The air bends sunlight near the horizon, so at that moment the disc is really about one diameter below it. Behind a ridge, the time is the moment the top edge meets the ridge line, worked out the same way, so the minutes a spot gains or loses are the terrain alone. The moon is timed the same way.
In town, buildings within 600 m of the pin, toward the event, are counted too, from OpenStreetMap footprints: a building's tagged height, else 3 m a storey, else one storey of 4 m (most footprints carry no height, so that last one is a guess).
Away looks at the 60° of sky straight opposite the sun. The Belt of Venus is a pink band "roughly 10–20° above the horizon" there during twilight, over the dark band of Earth's shadow (Wikipedia, Belt of Venus), so a spot is graded by how low its horizon is on that side.
Map © OpenStreetMap contributors · Terrain: Mapzen/AWS Open Data (SRTM, NASA/USGS, ETOPO1 & others) · Roads, places and buildings via the Overpass API