An ongoing visual exploration of residential solar panel adoption.
- How does the US generate its solar energy?
- Do sunny states generate more solar energy?
- Which states have the most solar panels?
- How have states' tax incentives correlated with solar panel adoption?
- How have other factors impacting adoption changed?
A list of R packages used in this project, sorted by purpose:
- Data Analysis
tidyverse
for everythingmagrittr
for extended pipe functionalitylubridate
for dealing with date objectshere
for OS-agnostic filepathsreadxl
for reading Excel files
- Visualization
ggrepel
for neater text labelsgghighlight
for simpler highlightinggeofacet
for arranging facets in the shape of the USggridges
for plotting distributions over timeextrafont
for... extra fontsgridExtra
for combining plots
- Geospatial tools and data
sf
for geospatial data structures and operationszipcode
for geocoding by zipcodenoncensus
for geocoding by state and county FIPSrnaturalearth
for US state-level shapefilesrnaturalearthdata
for high-res versions of above
Note: Datasets are omitted from repo due to large file sizes, but are all publicly available and fairly straightforward to reassemble from the links. Assembly steps are laid out in the section below.
Dataset | Source | Description | Unit of Observation | Last downloaded | URL |
---|---|---|---|---|---|
State Energy Data Systems (SEDS) | U.S. Energy Information Administration | Data on solar photovoltaic energy generated by all U.S. sources (utility, commercial, industrial and residential sectors). Data available for 1960 - 2016. | State-year | Jan 28, 2019 | Link to site |
OpenPV Project | National Renewable Energy Laboratory (NREL) | Database of public data for photovoltaic system (i.e. solar panel) installations in the US. Core dataset from the Lawrence Berkeley National Laboratories (LBL). Data available for 1969 - 2018. | Solar panel installation | Jan 19, 2019 | Link to site |
Solar Summaries | National Renewable Energy Laboratory (NREL) | Average solar irradiation data by state and zipcode. Data available for 1998 - 2009 | Zipcode-month | Jan 19, 2019 | Link to site |
Database of State Incentives for Renewables & Efficiency (DSIRE) | NC Clean Energy Technology Center, North Carolina State University | Database of incentives and policies that support renewables and energy efficiency in the US. Data available for 1975 - 2018. | Incentive or policy | Feb 6, 2019 | Link to site |
U.S. Population Data | National Cancer Institute | Aggregate dataset of Census data and annual decennial estimates of population by state, race, age, and other characteristics. Data available for 1969 - 2016. | State-year | Jan 19, 2019 | Link to site |
Cartographic Boundary Shapefiles - Counties | U.S. Census Bureau | County-level shapefiles at 500km resolution for all census tracts in the U.S. as of 2017. | County | Feb 6, 2019 | Link to site |
- Raw data is downloaded from the public sources above and organized in the
/data
directory by category like so:
data
├── data-population-estimates
│ └── us.1969_2016.19ages.adjusted.txt
├── data-power-generation
│ ├── Codes_and_Descriptions.xlsx
│ └── Complete_SEDS.csv
├── data-solar-irradiance
│ └── solarsummaries.xlsx
├── data-solar-panels
│ └── openpv_all.csv
├── data-state-policies
│ └── dsire-2019-01
└── shapefiles-usa
├── cb_2017_us_county_500k
└── cb_2017_us_zcta510_500k
-
data-import.R
file in/scripts
directory takes the raw data in/data
and outputs an.RData
file namedsolar_data_master.RData
. -
solar_with_commentary.Rmd
loads the.RData
file accordingly. The primary output is thesolar_with_commentary.nb.html
file that is rendered here, and.png
images of each chart is saved to/output
.