Sustainable roofs, such as those with greenery and photovoltaic panels, contribute significantly to the roadmap for reducing the carbon footprint of cities. However, research on sustainable urban roofscapes is hindered by the scarcity of data, limiting our understanding of their current content, spatial distribution, and temporal evolution. To tackle this issue, we introduce Roofpedia, a set of three contributions: (i) automatic mapping of relevant urban roof typology from satellite imagery; (ii) an open roof registry mapping the spatial distribution and area of solar and green roofs of more than one million buildings across 15 cities; and (iii) the Sustainable Roof Index, a derivative from the registry, to benchmark the cities by the extent of sustainable roofscape in term of solar and green roof penetration. This project, partially inspired by its street greenery counterpart -Treepedia, is made possible by a multi-step pipeline that combines deep learning and geospatial techniques, demonstrating the feasibility of an automated methodology that generalises successfully across cities with an accuracy of detecting sustainable roofs of up to 100% in some cities. We offer our results as an interactive database so that our work could aid researchers, local governments, and the public to uncover the pattern of sustainable rooftops across cities, evaluate the effectiveness of existing incentives, and ultimately support better policies and strategies to increase the adoption of instruments contributing to the sustainable development of cities.