Tackling Kaggle Tasks: Descriptive Analytics on Solar Panel Sites in India
By: Daniel Benson
Tags: Kaggle, Data Science, Awesomeness, My Journey, Descriptive Analytics

Part 2 — In depth data exploration

With some of the more basic observations finished my next goal is to go into a more in depth exploration of each of the dataframes I created. Here I will be looking into and solving problems such as the mean value of the daily yield, the total amount of irradiation per day, ambient and module temperature explorations, some inverter explorations, and AC/DC power explorations.

I started out by finding the mean value of the daily yield. I created two new dataframes and included only the instances recorded during the last 15 minutes of any given day. Because the “DAILY_YIELD” column is a summation of daily yield throughout the day, this should give me the total daily yield for any given day. I found the following:

The output of calculating the mean daily power yield for each plant (bottom) and its corresponding code (top)

Next I determined the total irradiation of each plant site per day. To do this I seperated the plant_sensor dataframes into data from the month of May and data from the month of June. I then calculated the total number of days by taking the length of the value counts of each of the dataframes separated by month and adding them together based on plant site, giving me a count of 34 days — this information was provided to me by the author of the dataset, however I chose to approach it as if it had not been given to me. I then summed up all of the irradiation recordings from the main plant_generation dataframes because this column is not a summation of irradiation after each passing 15-minute interval, but the amount of irradiation recorded since the previous recording. Using these sums I divided them into the calculated total number of days accounted for in each dataframe coming up with the following irradiation per day calculations:

the output of calculating the total irradiation per day of each plant (bottom) and its corresponding code (top)

To explore the ambient and module temperatures I chose to find the max of each and do a comparison. I approached this in two ways: first I created a series of four graphs comparing ambient temperature and module temperature with the day of the month for each plant dataframe. I split this up further by separating the data by month.

Graphic representation of Ambient and Module temperature compared to the time of day and month.

I then quantified these observations by simply finding the max value of each of the dataframes at the “AMBIENT_TEMPERATURE” then “MODULE_TEMPERATURE” columns.

The max ambient and module temperatures recorded for each plant (bottom) and its corresponding code (top)

Each plant site has specific number of inverters hooked up to rows of modules, or solar panels. I wanted to find how many inverters each plant site contained. For this I found all the unique values in each plant_generation dataframe, then I found the length of that list giving me a total of 22 inverters for each plant site.

Number of inverters for each plant (bottom) and the source code for calculating them (top)

The next few explorations were a bit more time consuming. First I wanted to find the maximum power yield generated in a daily time interval. I used a series of python graphs (dictionaries) and for loops to split the last_daily_recording dataframes I had created earlier by month and create key-value pairs in the form of “day” - “daily_yield_sum” pairs.

Source code for separating last_daily_recording dataframes into dictionaries holding “day” as a key and the data frame’s “DAILY_YIELD” sum as the value

To find the max daily sum by month I took the above results and used a for loop, comparing the current iteration to what was set to the max value, eventually ending with a group of four variables holding the max values for each plant for the months May and June.

The max daily power yield of each plant site by month and its corresponding code.

Finally I used these final results to calculate the absolute max daily power yield for each plant site. I ended this exploration by looking at these results graphically.

Absolute max daily yield for each plant site and its corresponding code.

A graphical representation of max daily yields for each Plant site by month.

Now earlier I had calculated how many inverters each plant contained. I decided that would be useful for exploring each of the inverter’s AC/DC power yields. I started by sorting the dataframes by unique “SOURCE_KEY” values and through a series of python graphs (dictionaries) and for loops found the sum daily yield for each inverter. Using these results I used more for loops to find which inverter yielded the most power and what its corresponding power value was for each plant site.

The source code for seperating the data by inverter ids and their daily yield sums

The inverters with the greatest max yield for each plant along with their yield values (bottom) and the source code for the calculation (top)

Finally, I organized the inverters for each plant in order of max daily yield to minimum daily yield.

Source code for ordering inverters by max daily power yield

Ordered list of best daily yield for each inverter in both plant sites

I finished things up by taking a closer look at why one of our data frames appears to contain data for months other than May and June. I looked at the “day” value counts for that data frame, only including the months that were less than 5 (May) and greater than 6 (June). I then looked at only the data that landed in the month of May and then only the data that landed in the month of June. I was able to ascertain that data was gathered on the 6th day of every month of the year at plan site 1, but only for the generation calculations, and the only months in which data was obtained outside of that 6th day were the months May and June. I determined that this could have been for testing purposes, perhaps a year-long research for that particular plant, or even a monthly required inspection used to determined the plant’s productivity.

Thank you for coming along with me on this very long and arduous journey. I hope you did enjoy at least some of the analysis and I hope that you will continue on with me to the next installation where I will use this same dataset to extend our exploration to several visualizations and graphs. Until next time, brave reader. Keep on reppin’ on and happy coding.