Does Open Data Exist on Somerville’s Concrete-Block Garages?

Author

corey

I started looking for data on Somerville’s concrete-block garages at the Somerville Historical Commission. These structures define Somerville for me because they seem to stick out behind or next to or beneath every house in the city. The Historical Commission assured me that the city didn’t have any data on the detached garages. Instead, they recommended I look at the Library of Congress’ archive of Sanborn Fire Insurance maps.

Before I did that, however, I thought I’d look into the open data that the city publishes: * buildings * tax parcels * impervious surfaces

Buildings

library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.5.1     ✔ tibble    3.2.1
✔ lubridate 1.9.3     ✔ tidyr     1.3.1
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(sf)
Linking to GEOS 3.10.2, GDAL 3.4.3, PROJ 8.2.0; sf_use_s2() is TRUE
library(gt)
temp <- tempfile()
tdir <- tempdir()
download.file("https://data.somervillema.gov/download/uzdd-gyjv/application%2Fx-zip-compressed", temp)
unzip(temp, exdir = tdir)
buildings <- st_read(paste0(tdir, "/Buildings.shp"))
Reading layer `Buildings' from data source `/tmp/RtmpuifDii/Buildings.shp' using driver `ESRI Shapefile'
Simple feature collection with 16711 features and 12 fields
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: 754967.7 ymin: 2961075 xmax: 771515.1 ymax: 2977384
Projected CRS: NAD83 / Massachusetts Mainland (ftUS)
head(buildings)
Simple feature collection with 6 features and 12 fields
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: 756085.7 ymin: 2976719 xmax: 757082.8 ymax: 2977322
Projected CRS: NAD83 / Massachusetts Mainland (ftUS)
   AddNum             Street AddNum2 Street2 AddNum3 Street3 Name Name2 Owner
1     600 MYSTIC VALLEY PKWY    <NA>    <NA>    <NA>    <NA> <NA>  <NA>  <NA>
2    2151 MYSTIC VALLEY PKWY    <NA>    <NA>    <NA>    <NA> <NA>  <NA>  <NA>
3     166         BOSTON AVE    <NA>    <NA>    <NA>    <NA> <NA>  <NA>  <NA>
4     196         BOSTON AVE    <NA>    <NA>    <NA>    <NA> <NA>  <NA>  <NA>
5 509-511 MYSTIC VALLEY PKWY    <NA>    <NA>    <NA>    <NA> <NA>  <NA>  <NA>
6 179-181         BOSTON AVE    <NA>    <NA>    <NA>    <NA> <NA>  <NA>  <NA>
  UpdateStat Shape_Leng Shape_Area                       geometry
1   Complete   870.5403  41386.681 MULTIPOLYGON (((756465.9 29...
2   Complete   820.1479  34099.297 MULTIPOLYGON (((756885.2 29...
3   Complete   260.8333   2349.236 MULTIPOLYGON (((756357.5 29...
4   Complete   512.5156  10876.224 MULTIPOLYGON (((756692 2976...
5   Complete   249.6032   2143.816 MULTIPOLYGON (((756133.6 29...
6   Complete   171.7559   1503.733 MULTIPOLYGON (((756454.4 29...
plot(st_geometry(buildings[c(1:50),]))

Tax parcels

temp <- tempfile()
tdir <- tempdir()
download.file("https://data.somervillema.gov/download/gw4w-w7cw/application%2Fx-zip-compressed", temp)
unzip(temp, exdir = tdir)
parcels_data_source <- paste0(tdir, "/M274_parcels_CY23_FY24_sde.gdb")
st_layers(parcels_data_source)
Driver: OpenFileGDB 
Available layers:
  layer_name geometry_type features fields                       crs_name
1 M274TaxPar Multi Polygon    13418     12 NAD83 / Massachusetts Mainland
2 M274Assess            NA    20408     37                           <NA>
3   M274_LUT            NA       16      4                           <NA>
4 M274OthLeg Multi Polygon     1838      9 NAD83 / Massachusetts Mainland
5 M274UC_LUT            NA      658      3                           <NA>
6   M274Misc Multi Polygon       38      4 NAD83 / Massachusetts Mainland

First, let’s try M274TaxPar; that’s what this dataset should be about, though I know that the assessment data can be more fully featured.

parcels <- st_read(parcels_data_source)
Multiple layers are present in data source /tmp/RtmpuifDii/M274_parcels_CY23_FY24_sde.gdb, reading layer `M274TaxPar'.
Use `st_layers' to list all layer names and their type in a data source.
Set the `layer' argument in `st_read' to read a particular layer.
Warning in CPL_read_ogr(dsn, layer, query, as.character(options), quiet, :
automatically selected the first layer in a data source containing more than
one.
Reading layer `M274TaxPar' from data source 
  `/tmp/RtmpuifDii/M274_parcels_CY23_FY24_sde.gdb' using driver `OpenFileGDB'
Simple feature collection with 13418 features and 12 fields
Geometry type: GEOMETRY
Dimension:     XY
Bounding box:  xmin: 230077.5 ymin: 902536.3 xmax: 235201.5 ymax: 907580.1
Projected CRS: NAD83 / Massachusetts Mainland
head(parcels)
Simple feature collection with 6 features and 12 fields
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: 230363.2 ymin: 907036.4 xmax: 230473.7 ymax: 907112.6
Projected CRS: NAD83 / Massachusetts Mainland
  SHAPE_Length SHAPE_Area MAP_PAR_ID           LOC_ID POLY_TYPE MAP_NO SOURCE
1    114.06276   708.9892       <NA> F_756022_2976013       TAX      2 ASSESS
2    174.09026  1613.4629      3-C-1 F_755832_2975949       FEE      3 ASSESS
3    104.13431   476.8848     2-A-25 F_756054_2975989       FEE      2 ASSESS
4    108.11048   523.7462     2-A-24 F_756086_2975965       FEE      2 ASSESS
5     72.43331   292.9181      3-C-2 F_755906_2975924       FEE      3 ASSESS
6     72.20770   291.5284      3-C-3 F_755937_2975898       FEE      3 ASSESS
  PLAN_ID LAST_EDIT BND_CHK NO_MATCH TOWN_ID                          SHAPE
1    <NA>  20120527    <NA>        N     274 MULTIPOLYGON (((230453.3 90...
2    <NA>  20120527    <NA>        N     274 MULTIPOLYGON (((230403.4 90...
3    <NA>  20120527    <NA>        N     274 MULTIPOLYGON (((230463.2 90...
4    <NA>  20120527    <NA>        N     274 MULTIPOLYGON (((230473.7 90...
5    <NA>  20120527    <NA>        N     274 MULTIPOLYGON (((230412.8 90...
6    <NA>  20120527    <NA>        N     274 MULTIPOLYGON (((230422.2 90...
plot(parcels)
Warning: plotting the first 9 out of 12 attributes; use max.plot = 12 to plot
all

Okay, it looks like this contains distinct buildings, which is good. What’s not so good is that it doesn’t tell us what material a building is made of. Maybe the assessment data will tell that story:

assess <- st_read(parcels_data_source, layer = "M274Assess")
Reading layer `M274Assess' from data source 
  `/tmp/RtmpuifDii/M274_parcels_CY23_FY24_sde.gdb' using driver `OpenFileGDB'
Warning: no simple feature geometries present: returning a data.frame or tbl_df
gt(head(assess))
PROP_ID LOC_ID BLDG_VAL LAND_VAL OTHER_VAL TOTAL_VAL FY LOT_SIZE LS_DATE LS_PRICE USE_CODE SITE_ADDR ADDR_NUM FULL_STR LOCATION CITY ZIP OWNER1 OWN_ADDR OWN_CITY OWN_STATE OWN_ZIP OWN_CO LS_BOOK LS_PAGE REG_ID ZONING YEAR_BUILT BLD_AREA UNITS RES_AREA STYLE STORIES NUM_ROOMS LOT_UNITS CAMA_ID TOWN_ID
100_A_1 F_770865_2967765 0 17294100 0 17294100 2024 9.7452 NA 0 972V 0 FOLEY ST 0 FOLEY ST NA SOMERVILLE NA MBTA 10 PARK PLAZA SUITE 5720 BOSTON MA 02116 USA NA NA NA CI NA 0 0 0 Vacant Land 0 0 A 15118 274
100_A_2 F_770888_2967247 0 3177700 0 3177700 2024 1.7906 NA 0 920V 0 FOLEY ST 0 FOLEY ST NA SOMERVILLE NA COMM OF MASS ONE ASHBURTON PL 15TH FL BOSTON MA 02108 USA NA NA NA CI NA 0 0 0 Vacant Land 0 0 A 15300 274
101_A_10 F_769985_2966800 604200 1937000 21600 2562800 2024 0.4520 20160516 1 3160 53 MYSTIC AVE 53 MYSTIC AVE NA SOMERVILLE NA MMCDM 53-55 MYSTIC LLC 7 DRIFTWOOD LN LYNNFIELD MA 01940 NA 1489 90 NA ASMD 1900 16248 0 13008 Warehouse 1 0 A 1660 274
101_A_4 F_770103_2966827 251900 920100 3400 1175400 2024 0.1804 20000919 316000 4022 20 NORTH UNION ST 20 NORTH UNION ST NA SOMERVILLE NA ECO LLC 20 ASSEMBLY SQ DRIVE SOMERVILLE MA 02145 USA 31836 423 NA ASMD 1900 882 0 882 Warehouse 1 0 A 1657 274
101_A_8 F_770059_2966656 179000 1360000 4100 1543100 2024 0.2385 20120321 10 3380 37 MYSTIC AVE 37 MYSTIC AVE NA SOMERVILLE NA DAVIDIAN JAMES C & LAURA H TRS 10 SECOND AVE BURLINGTON MA 01803 USA 58720 598 NA ASMD 1920 1600 0 1168 Office Bldg 1 0 A 1658 274
101_A_9 F_770012_2966704 247700 1215000 0 1462700 2024 0.1983 19990428 100 3320 45 MYSTIC AVE 45 MYSTIC AVE NA SOMERVILLE NA TRUST ILLUSION REALTY 599 E. BROADWAY BOSTON MA 02127 USA 30098 282 NA ASMD 1976 5616 0 4656 Service Shop 1 0 A 1659 274

Jackpot. Note the grain of this file: it’s each building within each parcel. This grain is important because it allows us to distinguish (detached) garages from the main buildings in tax parcels.