Solar Energy Potential Analysis Tool

Client: Cantucky
Industry: Energy
URL: http://amatan.pythonanywhere.com/
Languages: Python 3, Flask, Javascript, Chart.js, SQLite

This system conveniently graphically displays the average monthly solar radiation (energy received per day) at various US locations for various solar panel arrangements. It can also display average weather data. This is particularly useful for those contemplating installation of grid-tied solar power systems in figuring out the amount of energy (revenue) that can be produced under different conditions and cost structures.

Data source: “30-Year Average of Monthly Solar Radiation, 1961-1990” (ZIP) from the The Solar Radiation Data Manual for Flat-Plate and Concentrating Collectors (HTML).

Nerdy aside:

The ZIP file containing CSV data files for each location sampled was downloaded and unzipped. The CSV file names correspond to the location’s WBAN number. But their structure isn’t just one nice table, so a Python Extract-Transform-Load (ETL) script iterated over each file in the folder, extracted the desired data (location, solar, weather), adapted it, and stored it in a reasonably normalized SQLite database of three tables (location data, solar data, weather data). SQLite was selected because it was included by default with Python 3 and thus respects the “break one thing at a time” rule.

Originally the data was displayed on desktop using the MatPlotLib library, again following the “break one thing at a time” rule by not introducing a web front end right away. A web front end was then developed and communication with the Python script established using Flask. To reduce latency, server demand, and improve usability, a Chart.js graph was implemented in parallel. As features were added and additional communication was required, support for MatPlotLib was reduced as supporting it really served no purpose to the application.

Eventually, an optimization regime was implemented on the back-end to model best-case seasonal tilt adjustment to fixed and 1-axis (East-West) tracking panels. Additional functionality includes one-button generation of selected comparative graph combinations (tracking, tilts, min/ave/max, temperature ranges).