Mapping Activity

Open Street Maps : Jenna Vasington

Following up on my work from last week I was interested in mapping Boston neighborhoods by percentage of activity (Individual or Institutional) in the Open Street Maps dataset. To do this I took my new aggregated dataset and mapped the percentage of Institutional activity across the Boston neighborhoods. I started by getting the shape file for the Boston tracts.

tracts_geo < st_read (“/Users/jennav14/Desktop/Tracts_Boston_2010_BARI/Tracts_BostonBARI.shp”)
str(tracts_geo)
plot(st_geometry(tracts_geo))

Next I merged by dataset with the shape file by the neighborhood data to plot with tmap.

st_crs(tracts_geo)
View(osm_boston)

rateofbatch
tracts_geo<-merge(tracts_geo,rateofbatch,by=’ISD_Nbhd’,all.x=TRUE)
View(tracts_geo)

require(tmap)
require(ggmap)

tmap_mode(“view”)

test<- tm_shape(tracts_geo) + tm_polygons(“ifBatch”)

The light colored shading shows neighborhoods with the most individual activity in the dataset and the darker neighborhoods such as Mattapan show the neighborhoods with more Institutional activity.

From this map it looks like the smaller neighborhoods have more individual input such as the North End, Back Bay, Beacon Hill, Fenway and Allston/Brighton. The larger neighborhoods such as East Boston, South Boston, South End, Mattapan and Hyde Park have more institutional data. I wonder if this means the smaller neighborhoods have more of a community/neighborhood feel that makes people feel more likely to map in Open Street Maps. Another theory is that the larger neighborhoods are harder to map as an individual because of the size so there is more Institutional Data.

My next steps are to work with the new dataset and further delve into user data. I started this work this week by exporting our dataset from Open Street Maps with the user data and attribution data from Overpass Turbo.

[out:csv(::user,::lon,::lat,attribution)];

(
nodeamenity;
nodebuilding;
nodecraft;
nodeemergency;
nodehistoric;
nodeleisure;
nodeman_made;
nodeoffice;
nodeshop;
);
out meta;

I combined this user and attribution data with our new dataset. There are 4 institutional batch inputs that are listed under attribution ; MassGIS, Mass Emergency Management Agency, Commonwealth of Mass Executive Office of Environmental Affairs and massDOT. All of the data that was input under these headings is Insitutitional activity and I gave it a YES for Batch Input.

for (i in 1:nrow(osm2_1)){

if(!is.na(osm2_1[i,”Attribution”])){
if(osm2_1[i,”Attribution”]==”Office of Geographic and Environmental Information (MassGIS)”) osm2_1[i,”Batch Input”] <-“Y”
if(osm2_1[i,”Attribution”]==”Office of Geographic and Environmental Information (MassGIS), Massachusetts Emergency Management Agency”) osm2_1[i,”Batch Input”] <-“Y”
if(osm2_1[i,”Attribution”]==”Office of Geographic and Environmental Information (MassGIS), Commonwealth of Massachusetts Executive Office of Environmental Affairs”) osm2_1[i,”Batch Input”] <-“Y”
if(osm2_1[i,”Attribution”]==”massDOT”) osm2_1[i,”Batch Input”] <-“Y”
}

I also realized that sometimes the usernames such as wambag will appear under MassGIS input data but there are other entries that are missing the Attribution data. I am assuming that any username that appears with an Institutional Attribution is always entering data for that instiution so I ran a script to take all of the user names that overlap with the 4 institutions above and always appear as Yes.

if(!is.na(osm2_1[i,”Batch Input”])){
if(osm2_1[i,”Batch Input”]==”Y”){
batchUsers<- make.unique(append(batchUsers, as.character(osm2_1[i,”User Name”])))
}

My next steps include further defining the Yes and No data and then seeing if the map above changes with this new information and new dataset.

Stay tuned!


Leave a comment