A.2 Publicly-Owned King County Parcels

Description

A dataset of publicly-owned parcels within King County, Washington. These records were derived from the Real Property Account dataset by selecting taxpayer names that indicate the parcel is publically owned (non-empty values in the KCTP_NAME field). The dataset is intended to help users more easily display public land information and use it in analyses.

According to the metadata provide at the time the file was downloaded, this data reflects the King County Assessor records as of July 27, 2017.

Summary

Processing Steps

Summary
  1. Create pub: a tibble containing real property account data for publicly-owned parcels.
  2. Clean/process the dataset: pub_ready
    • Load present_use and jurisdiction for transforming coded features into descriptive text.
  3. Upload to Drive
Step 1
pub_fp <- root_file("./1-data/2-external/public_parcels_shp_20170727")

pub_load <- 
  make_or_read(pub_fp,
               {
                 dr_id <- as_id("0B5Pp4V6eCkhrZ2tfS3d6YzZ0aXM")
                 
                 zip_dir <- root_file("./1-data/2-external")
                 
                 target_name <- "public_parcels_shp_20170727"
                 
                 drive_read_zip(dr_id = dr_id,
                                .tempdir = FALSE,
                                dir_path = zip_dir,
                                read_fun = st_read,
                                target_name = target_name,
                                layer = "public_parcels", 
                                stringsAsFactors = FALSE)
                 
               },
               {st_read(pub_fp, layer = "public_parcels", stringsAsFactors = FALSE)})

pub <-
  pub_load %>% 
  st_drop_geometry() %>% 
  rename_all(to_screaming_snake_case)

rm(pub_load)
gc(verbose = FALSE)
Step 2
pu_fp <- root_file("./1-data/3-interim/kc-present-use.rds")

present_use <- 
  make_or_read(pu_fp,
               {
                 dr_id <- as_id("0B5Pp4V6eCkhrYjhCenFqQktHTTg")
                 
                 drive_read(dr_id = dr_id,
                            .tempfile = FALSE,
                            path = pu_fp,
                            read_fun = read_rds)
                 
               },
               {read_rds(pu_fp)})

juris_fp <- root_file("./1-data/3-interim/kc-jurisdictions.rds")

jurisdiction <- 
  make_or_read(juris_fp,
               {
                 dr_id <- as_id("0B5Pp4V6eCkhrTU9Kd3hVVVkyZjQ")
                 
                 drive_read(dr_id = dr_id,
                            .tempfile = FALSE,
                            path = juris_fp,
                            read_fun = read_rds)
                 
               },
               {read_rds(juris_fp)})

pub_ready <- 
  pub %>% 
  select(PIN,
         TYPE,
         PRESENTUSE,
         LOT_SQFT = LOTSQFT,
         APPR_LAND_VAL = APPRLNDVAL,
         APPR_IMPR_VAL = APPR_IMPR,
         KCTP_NAME,
         JURISDICTION = JURIS,
         ADDR_FULL,
         ZIP_5,
         POSTAL_CTY_NAME = POSTALCTYN,
         LAT,
         LON) %>% 
  mutate(PRESENTUSE = present_use[as.character(PRESENTUSE)],
         JURISDICTION = jurisdiction[JURISDICTION],
         DATE = ymd(20170727)
  )
Step 3
tmp <- tempfile()

write_rds(pub_ready, tmp)

drive_folder <- as_id("0B5Pp4V6eCkhrZ3NHOEE0Sl9FbWc")

drive_upload(tmp, path = drive_folder,name = "public_parcels_20170727.rds")