I'm trying to find one or more open databases that contain comprehensive historical data about oil, coal, natural gas, solar, wind, biofuels, biomass, nuclear, wave, tidal, and hydro energy.
For each of these resource types, I'm looking for historical monthly or yearly time series data, globally and broken down by country, on consumption, capacity factor, real price (price paid at energy auctions), cost per kWh, cost of new plant production, number of existing plants, number of newly planned plants, number of newly cancelled plants, and (less importantly) public opinion data on each of these energy resource types, as well as any other data that is relevant to analyzing the relation between the growth of renewable energy and the decline of fossil fuels.
I've been able to find plenty of graphs depicting these trends, but what I need is raw data. Ideally, I would hope to find this data available via API, though any links to relevant up-to-date databases would be greatly appreciated.