library(dplyr)
library(ggplot2)
library(sjPlot)
library(plotly)
library(stargazer)
<- read.csv("suburb_final_clean_data.csv") completedData_2
Case Notes
Case Selection
Here I will make a number of interactive plots to help identify cases that are either on the line or off the line.
I will use the suburb_final_clean_data.csv
for the analysis. This is the cleaned-up data file that can be found in the cloud_16Jan_2019
R project file.
Plots
These plots are based on the analysis done in the cloud_16Jan_2019.Rproj
project file. That project contains the suburb_final.R
file which brings in and cleans all of the various data sets. That file also explains the data sources.
The following code loads the libraries and brings in the data file.
Regression Table
Here is the logit table. For the first column, I remove the total storm damage variable. In the larger model it had a coefficient of zero, but was significant.
<- glm(susplanv ~ per_bach + per_carb + per_walk + hh_income + X_mean + pop_dens + totalstormdamage + per_bike + carbonnum + per_dem + sprawlindex, data = completedData_2, family = "binomial")
mylogit3 <- glm(susplanv ~ per_bach + per_carb + per_walk + hh_income + X_mean + pop_dens + per_bike + carbonnum + per_dem + sprawlindex, data = completedData_2, family = "binomial")
mylogit2 stargazer(mylogit2, mylogit3, type='text')
==============================================
Dependent variable:
----------------------------
susplanv
(1) (2)
----------------------------------------------
per_bach 5.020*** 5.055***
(0.510) (0.514)
per_carb 0.799 0.703
(0.856) (0.870)
per_walk 0.425 0.373
(1.159) (1.162)
hh_income -0.00002*** -0.00002***
(0.00000) (0.00000)
X_mean -0.243*** -0.264***
(0.084) (0.085)
pop_dens -0.00001 -0.00001
(0.00001) (0.00001)
totalstormdamage 0.000***
(0.000)
per_bike 5.384* 5.506*
(3.022) (3.031)
carbonnum -0.000 -0.000
(0.000) (0.000)
per_dem 2.771*** 2.834***
(0.435) (0.439)
sprawlindex 0.035*** 0.034***
(0.004) (0.004)
Constant -6.236*** -6.158***
(0.662) (0.669)
----------------------------------------------
Observations 4,317 4,317
Log Likelihood -1,202.885 -1,185.333
Akaike Inf. Crit. 2,427.769 2,394.667
==============================================
Note: *p<0.1; **p<0.05; ***p<0.01
Bachelor Degree
Here is a plot of percentage bachelor to whether or not it is a sustainable suburb.
The following code will take the bottom ten, middle ten, and top ten observations that are sustainable suburbs based on their score on the percent bachelor variable.
per_bach Geo_NAME
1 0.05184244 South Bay city, Florida
2 0.06592644 South Roxana village, Illinois
3 0.08819715 New Fairview city, Texas
4 0.10380082 Taylor city, Michigan
5 0.10499914 Rialto city, California
6 0.11058981 New Egypt CDP, New Jersey
7 0.11168272 Hemet city, California
8 0.11170881 Lawrence city, Massachusetts
9 0.11216281 San Bernardino city, California
10 0.11415477 El Monte city, California
per_bach Geo_NAME
218 0.4137664 Plantation city, Florida
219 0.4138825 Oswego village, Illinois
220 0.4185120 Huntington Beach city, California
221 0.4219368 Palm Beach Shores town, Florida
222 0.4219997 Treasure Island city, Florida
223 0.4229670 Fredericksburg city, Virginia
224 0.4233959 Hypoluxo town, Florida
225 0.4235446 Wilton Manors city, Florida
226 0.4243268 Gilbert town, Arizona
227 0.4248867 Laguna Woods city, California
228 0.4250861 Elburn village, Illinois
per_bach Geo_NAME
437 0.7956312 Atherton town, California
438 0.7964970 Lexington CDP, Massachusetts
439 0.8019802 Garrett Park town, Maryland
440 0.8021012 Falls Church city, Virginia
441 0.8110563 Wilmette village, Illinois
442 0.8236776 Yarrow Point town, Washington
443 0.8383137 Wellesley CDP, Massachusetts
444 0.8410842 Larchmont village, New York
445 0.8444735 Piedmont city, California
446 0.8942857 Chevy Chase Village town, Maryland
Household Income
Here is a plot of household income to whether or not it is a sustainable suburb.
The following code will take the bottom ten, middle ten, and top ten observations that are sustainable suburbs based on their score on the household income.
hh_income Geo_NAME
1 23609 Hamtramck city, Michigan
2 28895 Gary city, Indiana
3 29405 South Bay city, Florida
4 29817 Hialeah city, Florida
5 31805 Lapeer city, Michigan
6 32750 Millbourne borough, Pennsylvania
7 32894 Lauderdale Lakes city, Florida
8 33025 Newark city, New Jersey
9 33486 Clarkston city, Georgia
10 33741 Sweetwater city, Florida
hh_income Geo_NAME
218 71477 Concord city, California
219 71653 Homewood village, Illinois
220 71724 Villa Park village, Illinois
221 72222 Marlborough city, Massachusetts
222 72225 Miami Lakes town, Florida
223 72266 Surfside town, Florida
224 72422 Morningside town, Maryland
225 72805 Palm Beach Gardens city, Florida
226 72832 Chino city, California
227 72903 Brentwood city, Missouri
228 73029 Pasadena city, California
hh_income Geo_NAME
437 175586 Bedford CDP, New York
438 175625 Sunfish Lake city, Minnesota
439 193516 Clyde Hill city, Washington
440 202083 Piedmont city, California
441 213750 Yarrow Point town, Washington
442 216292 Hillsborough town, California
443 232981 Portola Valley town, California
444 250001 Atherton town, California
445 250001 Chevy Chase Village town, Maryland
446 250001 Westlake town, Texas
Change in Temperature
In the model, X_Mean
is the projected change in temperature by the end of the century. Data is available from: the Localized Constructed Analogs (LOCA) data set.
Here is a plot of projected temperature change and sustainable suburbs.
The following code will take the bottom ten, middle ten, and top ten observations that are sustainable suburbs based on their score on the projected temperature change.
X_mean Geo_NAME
1 3.210552 Colma town, California
2 3.216598 Pacifica city, California
3 3.217127 South San Francisco city, California
4 3.217459 San Bruno city, California
5 3.220000 Millbrae city, California
6 3.226127 Daly City city, California
7 3.232469 Burlingame city, California
8 3.302624 Half Moon Bay city, California
9 3.345316 Alameda city, California
10 3.409678 Imperial Beach city, California
X_mean Geo_NAME
218 4.746975 Hoboken city, New Jersey
219 4.748092 Richardson city, Texas
220 4.749009 Kearny town, New Jersey
221 4.750957 Rialto city, California
222 4.753524 Budd Lake CDP, New Jersey
223 4.754000 Plano city, Texas
224 4.760000 Pasadena city, California
225 4.762303 Haworth borough, New Jersey
226 4.764286 Peoria city, Arizona
227 4.766913 Ocean Gate borough, New Jersey
228 4.767357 Montebello village, New York
X_mean Geo_NAME
437 6.230196 Mahtomedi city, Minnesota
438 6.230229 Edina city, Minnesota
439 6.230305 Falcon Heights city, Minnesota
440 6.239338 Maplewood city, Minnesota
441 6.253333 Bloomington city, Minnesota
442 6.279131 Brooklyn Center city, Minnesota
443 6.286440 White Bear Lake city, Minnesota
444 6.287017 Golden Valley city, Minnesota
445 6.297393 Crystal city, Minnesota
446 6.310860 Roseville city, Minnesota
Bike Commuting
Here is a plot of the percentage of bike commuters to whether or not it is a sustainable suburb.
The following code will take the bottom ten, middle ten, and top ten observations that are sustainable suburbs based on their score on the percentage of commuters by bike.
per_bike Geo_NAME
1 0 Colma town, California
2 0 Malibu city, California
3 0 Laguna Woods city, California
4 0 El Cerrito CDP, California
5 0 Surfside town, Florida
6 0 Miami Lakes town, Florida
7 0 Parkland city, Florida
8 0 Pembroke Park town, Florida
9 0 South Bay city, Florida
10 0 Hypoluxo town, Florida
per_bike Geo_NAME
218 0.003907053 Martinez city, California
219 0.003908512 West Park city, Florida
220 0.003934639 Elmhurst city, Illinois
221 0.003972225 Jersey City city, New Jersey
222 0.003972402 San Gabriel city, California
223 0.003979526 Bellevue city, Washington
224 0.004027097 Chino city, California
225 0.004035698 San Bernardino city, California
226 0.004043863 Margate city, Florida
227 0.004081633 Island Heights borough, New Jersey
228 0.004126831 Northbrook village, Illinois
per_bike Geo_NAME
437 0.04044444 Bradley Beach borough, New Jersey
438 0.04071920 Miami Beach city, Florida
439 0.04246101 New Egypt CDP, New Jersey
440 0.04765396 University Park town, Maryland
441 0.04886364 Fairfax town, California
442 0.05911918 Somerville city, Massachusetts
443 0.06963374 Cambridge city, Massachusetts
444 0.07324188 Menlo Park city, California
445 0.08214105 Berkeley city, California
446 0.08837454 Avalon city, California
Percentage Democratic Vote
This is the plot of the percentage Democratic vote in the 2016 presidential election in the sustainable suburb’s county.
The following code will take the bottom ten, middle ten, and top ten observations that are sustainable suburbs based on their score on the percentage of Democratic votes in the 2016 presidential election.
per_dem Geo_NAME
1 0.1383561 New Fairview city, Texas
2 0.2274126 Woodstock city, Georgia
3 0.2821877 Lapeer city, Michigan
4 0.2864548 Sykesville town, Maryland
5 0.3152832 Beachwood borough, New Jersey
6 0.3152832 Island Heights borough, New Jersey
7 0.3152832 Ocean Gate borough, New Jersey
8 0.3152832 Pine Beach borough, New Jersey
9 0.3152832 Point Pleasant Beach borough, New Jersey
10 0.3152832 Manahawkin CDP, New Jersey
per_dem Geo_NAME
218 0.6365843 Doral city, Florida
219 0.6365843 Miami Lakes town, Florida
220 0.6365843 Miami Gardens city, Florida
221 0.6365843 Aventura city, Florida
222 0.6365843 Coral Gables city, Florida
223 0.6365843 Hialeah city, Florida
224 0.6365843 Miami Beach city, Florida
225 0.6365843 North Miami city, Florida
226 0.6365843 Pinecrest village, Florida
227 0.6365843 Key Biscayne village, Florida
228 0.6365843 South Miami city, Florida
per_dem Geo_NAME
437 0.8082272 Clarkston city, Georgia
438 0.8082272 Decatur city, Georgia
439 0.8544454 Baltimore city, Maryland
440 0.8932926 Edmonston town, Maryland
441 0.8932926 College Park city, Maryland
442 0.8932926 Laurel city, Maryland
443 0.8932926 Morningside town, Maryland
444 0.8932926 Mount Rainier city, Maryland
445 0.8932926 University Park town, Maryland
446 0.8932926 Greenbelt city, Maryland
Sprawl Index
The Sprawl Index was conceived by Reid Ewing and looks at a host of factors such as street connectivity, population density, and walkability.
The following code will take the bottom ten, middle ten, and top ten observations that are sustainable suburbs based on their Sprawl Index score.
sprawlindex Geo_NAME
1 54.56647 Carnation city, Washington
2 57.55441 New Fairview city, Texas
3 57.89487 Shepherdstown town, West Virginia
4 63.41778 New Egypt CDP, New Jersey
5 64.43708 Lapeer city, Michigan
6 66.05973 Elburn village, Illinois
7 66.46660 Bedford CDP, New York
8 66.93511 Oxford borough, Pennsylvania
9 68.00392 Manhattan village, Illinois
10 68.42103 Minooka village, Illinois
sprawlindex Geo_NAME
218 102.3784 Westmont village, Illinois
219 102.4400 Irvington village, New York
220 102.5036 Tarrytown village, New York
221 102.5454 Coral Springs city, Florida
222 102.5806 Edina city, Minnesota
223 102.6272 Garland city, Texas
224 102.7009 Solana Beach city, California
225 102.7727 Glen Cove city, New York
226 102.8085 San Anselmo town, California
227 102.9082 College Park city, Maryland
228 102.9293 Coconut Creek city, Florida
sprawlindex Geo_NAME
437 131.0415 Emeryville city, California
438 131.9931 Oak Park village, Illinois
439 132.6910 Asbury Park city, New Jersey
440 134.6577 Jersey City city, New Jersey
441 134.9241 Manhattan Beach city, California
442 135.8661 Bradley Beach borough, New Jersey
443 137.5558 Hermosa Beach city, California
444 146.8084 West New York town, New Jersey
445 148.1846 Hoboken city, New Jersey
446 151.7703 Union City city, New Jersey