Software Open Access
Barton-Henry, Kelsey; Wenz, Leonie; Levermann, Anders
This repository contains core codes and data underlying the analyses and figures from: Barton-Henry, Wenz, and Levermann (2021).The following provides a brief description of the codes and data included.
final_merged.csv - This file contains the core dataset used the all results and figures. This dataset is a result of the aggregation of the following publicly available datasets:
Code included, in relevant order:
figure_1.py - This script produces Figure 1, a map showing the geographic area of analysis along with the geolocations of solar panels, addresses, as well as examples of several radii over which panel density is calculated.
figure_2.py - This script produces Figure 2, as well as outputs several dataframes with the normalized panel density variables used in the further analysis of the feature importances scores.
figure_3.py - Figure 3 is produced, as well as several .csvs containing dataframes with varying panel density radii, constructed with the normalized panel density at one radius subtracted from that of the previous.
figure_4.py - Produces Figure 4, an analysis of the influence of household income. Figures S15 and S17 of the Supplementary Information section are also created.
models.py - This script builds the three different models tested, and calculates the feature importances scores as well as performance metrics for each.
confusion_matrices.py - This script creates figures of the confusion matrices created from the performance output for each of the tested models, as well as the model for which panel density is omitted. These are Figures S2, S4, S6, and S7.
ols.py - This script produces the estimates contained in Tables S7, S8, and S9, which are the results of the OLS analysis.
tract_ave_plot.py - Figures S8 and S9 are produced, showing changes in the feature importances when panel density is averaged over census tract.
households_all.py - Analysis of the influence of density based on the number of households in each tract, resulting in Figures S11 and S12.
tract_area_all.py - Creates Figures S13 and S14, providing the analysis of the influence of density across census tracts of varying area sizes.
hhval_all.py - The analysis of the influence of household value is conducted, and Figure S16 is produced.