San Francisco or Dublin?
While I am interested in the entrepreneurial environment of the Bay area, the cost of living concerns me. Dublin on the other hand is beautiful, I’m already a citizen, and have family there, but I’m concerned about ample business oppotunities. I need more information to make a decision.
Teleport API has 17 metrics with which to compare cities, each one rated on a scale of 1-10
# San Francisco data
res <- GET("https://api.teleport.org/api/urban_areas/slug:san-francisco-bay-area/scores/")
SanFran <- fromJSON(rawToChar(res$content))
# Dublin data
res <- GET("https://api.teleport.org/api/urban_areas/slug:dublin/scores/")
Dublin <- fromJSON(rawToChar(res$content))
## [1] 6.543632
## [1] 6.251289
If you compare the mean scores of San Francisco (~6.54) to Dublin (~6.25), SF has a slight lead. But the mean isn’t a great statistic to compare all 17 areas. Plus, some areas, such as ‘Housing’ and ‘Outdoors’ are more important to me than other areas.
I need to be able to compare the two cities on an individual basis.
radarchart(both_cities, axistype = 1, seg = 5, title = "Spider Chart comparing SF and Dublin",
pcol=colors_border,
pfcol=colors_in,
plwd=4,
plty=1,
cglcol="grey",
cglty=1,
axislabcol="grey",
caxislabels=seq(0,10,2),
cglwd=0.8,
vlcex=0.8)
legend(x = 0.7, y = 1.3, legend = rownames(both_cities[-c(1,2),]), bty = "n", pch=20, col=colors_in, text.col = "black", cex=1.2, pt.cex=3)
With this graph, I am now better equipped with comparative information to make an informed decision.