I started this research project in late July 2024. The first idea was to do a benefit-cost analysis of specialty crop agrivoltaics (AV). After preliminary analysis, we realized that the crop is compensating solar to make AV profitable. Yet, AV will be adopted only if it is more profitable than the crop or solar alone. This is where we started to think about incentives for AV and The Rural Energy for America Program (REAP) came into the picture. The rest is in the paper. In this blog post, I will discuss information, skills, and tools not reflected in the paper. I will briefly discuss the third crop we excluded in the paper and a decision support tool using this data.
The entire simulation and analysis were done using Quarto in R. Quarto is an advanced version of R Markdown which supports multiple programming languages such as R, Python, Julia, and Observable JavaScript. Quarto is very helpful to integrate multiple programming languages to overcome shortcomings of one or the other languages. Quarto can generate high-quality PDF, word files, html, Jupyter notebooks, containing paragraphs, codes, figures, data tables, and charts and integrate multiple programming languages overcoming several limitations of R Markdown.
I synchronized this project in the GitHub repository. I used Git Desktop and Terminal/PowerShell to establish communication between the local file and the online repository. There are several benefits of using GitHub for the project. I am highlighting a few benefits I leveraged for this project. First, you can back up your project online while working offline on your local computer. It helps to save storage in local computers by reducing the need to create a backup file every time you make changes. Simply push changes to the online repository, and the progress is saved for a lifetime. You can track the history to the origin of every file. Second, it helps in version control in case you have to revert to past steps after messing up with the projects. Third, This is helpful especially when a massive project requires active collaboration and multiple people accessing the same file from different locations. Git precisely tracks changes made by each collaborator. I certainly felt that I under-utilized the power of Git because email communication was sufficient for my project most of the time.
Another aspect of this paper is a massively big dataset. I simulated AV profit outcomes for three crops (the third crop to be discussed later) and two REAP scenarios per crop. I generated 814,968 AV configurations and profits per simulation. There are six CSV files with such massive data. I don’t accurately remember the file size of the CSV files, but I can safely say each file required me to have Git Large File Storage (LFS) to push them into GitHub repositories. I used two approaches to solve this issue. First, I use LFS. However, six files took up space in my local computer and one drive. So, I used the arrow package in R, which reduces file size significantly by saving data in “.feather” format. The feather format encrypts the original data into random texts and symbols, lowering privacy vulnerabilities. This solves my big data problem.
The analysis was completed in two steps. I produced the big data I discussed earlier in the first step and shaped the results in the presentable format in the second step. The computation time in the first step increased exponentially, so I could not generate any results in two days. The second step was not that bad but was still computationally inefficient. Later, I change my simulation approach to reduce the total time in the first step to about a minute. In the second step, I converted the data frame to data.table using setDT(), which improved computation efficiency. Now, the second step takes longer than the first step. However, computing efficiency significantly improved. I did not feel the need to bring it down further. Detailed code and reports can be found in the project’s GitHub repository.
Summer Squash AV was excluded from the paper even though I wanted to include it. This plan shifted after we started exploring REAP and its role in AV profitability. So, I dropped summer squash. The complete analysis for all three crops is available on GitHub.
Finally, I also developed a Shiny App. This app facilitates filtering profits from all three crop AVs based on system configurations described in the paper and calculates summary statistics. I plan to deploy this as an online decision support tool. I am exploring free, open-source, flexible, and dynamic platforms to deploy this tool. This project is simple but highly policy-relevant work in the Southeastern US. I believe this work will benefit Alabama producers exploring options to develop AVs on their farms.
Original paper citation: Mishra B., Miao R., Musa N., Brothers D., Khanna M.,. Rabinowitz A., Mwebaze P., McCall J. 2025. “Specialty Crop Agrivoltaics in the Southeastern USA: Profitability and the Role of Rural Energy for America Program”. Available Online at https://www.choicesmagazine.org/choices-magazine/submitted-articles/specialty-crop-agrivoltaics-in-the-southeastern-usa-profitability-and-the-role-of-rural-energy-for-america-program