Viability of photovoltaic installations in Spain

The energy transition is no longer an option, it's a necessity. In Spain, one of the countries with the highest solar radiation in Europe, the key question arises: is it worth investing in solar energy?

This project addresses that question from a data science perspective, transforming scattered technical information into clear, practical, and accessible decisions for anyone interested in renewable energy.

Carried out by Eduardo Campos | Mario Liria | David Santiago Sánchez | Juan Santos

Qualification Master in Data Science

Technologies Pandas | NumPy | Scikit-learn | Statsmodels | Power BI | Streamlits

What is the motivation?

This project arises from the need to harness Spain's enormous solar potential and offer citizens and businesses a tool that turns data into clear decisions about investing in photovoltaic energy.

  • To evaluate the technical and economic feasibility of residential photovoltaic installations in Spain.
  • Construct a predictive model for solar production with time series and Machine Learning.
  • Integrate a financial analysis which allows the calculation of key indicators (NPV, IRR, ROI, Payback).
  • Develop an interactive web application that democratises access to this data.

Development

The project was based on the collection and unification of over 960 observations (2018–2025) from sources such as INE, OMIE, AEMET and NASA POWER. With this data, a DataFrame maestro which includes radiation, temperature, electricity prices and energy consumption.

  • SARIMAX for temporal patterns.
  • Random Forest Regressor to capture non-linear relationships.

The results were combined with a comprehensive financial analysis to simulate the profitability of real facilities in different provinces. Finally, it was designed “photovoltaic data”, an interactive web application that allows you to explore the results intuitively and in a personalised way.

This project demonstrates that data science not only predicts and analyses, but also empowers decisions and accelerates the transition towards a more sustainable energy future.