I noticed Ari Lamstein’s call for submissions to the R Shapefile Contest with interest. Commonly, we see spatial data in R used for visualization - e.g. choropleth maps. However, R has a massive ecosystem available to use spatial data in a wide variety of analyses that leverage its geographic properties. I commonly read posts about whether spatial data is “special” or not - we geographers tend to say yes (see here: https://www.
This week, Emily Badger and Darla Cameron at The Washington Post’s Wonkblog published an article (linked here) discussing data from the Federal Housing Finance Agency that suggest that the greatest increase in house prices in large metropolitan areas tend to be found in urban rather than suburban areas. Wonkblog published a series of maps illustrating this for Washington DC, Portland OR, Houston TX, Denver CO, and Minneapolis-St. Paul, MN. I was particularly impressed by the visuals produced by the Wonkblog team, but wanted to see if the trend is replicated in my metropolitan area, Dallas-Fort Worth.
Mapbox recently announced that map styles designed in the new Mapbox Studio are now available as basemaps in other platforms, such as Tableau, CartoDB, and ArcGIS Online: https://www.mapbox.com/blog/use-studio-styles-in-gis-tools/. Previously, this wasn’t possible due to these tools’ incompatibility with the GL-based vector tiles produced by Studio. However, Mapbox now translates GL vector tiles to tiles that are compatible with these products, as well as Leaflet.js, with its Tiles API: https://www.mapbox.com/blog/mapbox-studio-tiles-static/. This means that beautiful maps designed in Studio are accessible to R users as well!
It’s been a while since I last posted here - but I’ve been working on a new R package that I’m quite excited about, and I thought this would be the right place to post. My new package, idbr, is an R interface to the United States Census Bureau’s International Data Base API. The IDB includes a host of international demographic indicators - including historical data and projections to 2050. I use IDB data all of the time for my teaching - and idbr makes the process of getting the data much easier!
I use data from the US Census Bureau’s American Community Survey all of the time. I also use R all of the time. Naturally, this means that I often use ACS data in R - which is pertinent given last week’s release of the new 2010-2014 ACS estimates. I wanted easy access to the data to facilitate my on-going research on demographic trends in US metros, and work at the TCU Center for Urban Studies; as such, I wrote a small R package to provide quick access to the data, acs14lite (https://github.
There are three functions available in the tigris package (https://github.com/walkerke/tigris) to fetch road data. primary_roads() loads all interstates for the entire US; primary_secondary_roads() gets you interstates and US/state/county highways, by state; and roads() gets you all road segments for a given county within a state. In this example, we’ll use the primary_secondary_roads() function to get our data for Route 1 in California. library(tigris) library(leaflet) library(rgdal) library(geojsonio) library(widgetframe) ca <- primary_secondary_roads(state = 'California') rt1 <- ca[ca$FULLNAME == 'State Rte 1', ] We can then plot with the leaflet package:
In this document, I will demonstrate how I created an interactive CartoDB state squares map of obesity in the United States for 2013. Credit is due to Bill Dollins for sharing a state squares file in GeoJSON format. You can access the file from his GitHub repository. The data processing is done in R, and the visualization is done with the CartoDB web GUI. The workflow below uses the kwgeo R package to upload data directly to CartoDB.
Web: http://personal.tcu.edu/kylewalker Twitter: https://twitter.com/kyle_e_walker Yesterday, I posted to Twitter an interactive map using the classic John Snow Cholera dataset and tiles made from Snow’s map, which attracted a fair share of interest. Interactive Snow cholera map w/@LeafletJS, #rstats, @rstudio: http://t.co/vKYnx6lSxT Thx @lincolnmullen @abresler pic.twitter.com/1zkq7UiyKr — Kyle Walker (@kyle_e_walker) March 9, 2015 I was inspired to try this by Lincoln Mullen’s tweet that custom historical tiles could be used in an RStudio Leaflet map.
Before coming to TCU, I worked as a data analyst for the Church Pension Group, which manages the retirement funds and provides other financial services for the Episcopal Church. I was part of a small research group that completed both internal and public-facing studies using the company’s data. You can take a look at some of the studies I worked on here. While I was at CPG, I developed an interest in the sociology of religion, as changing rates of religious adherence were of critical importance to CPG’s work, as they impact the overall viability of parishes (and in turn the fiscal health of the Church).