http://asbcllc.com/asbc_projects/project_accumulator/previews/mapdeck/index.html" /> https://i.imgur.com/KucCWQM.jpg" /> Project Accumulator Meets Mapdeck

This is the first in a series of Project Accumulator demonstrations showcasing the power and importance of linking nycRealEstateR with other useful packages in R to achieve superior insights.

library(tidyverse)
library(mapdeck)
library(nycRealEstateR)

Mapdeck

Mapdeck is a state-of-the-art wrapper of deck.gl an incredible mapping tool that was recently opensourced by Uber.

Example - B or C Class Buildings in Manhattan with Less than 10 Units

This is a demonstration of to build an informative and powerful map in 2 function calls.

Import and Filter the Data

df_input <-
  import_pluto() %>%
  filter(letterClass %in% c("B", "C"),
         idBorough == 1,
         countUnitsResidential <= 10) 

That was easy now time to build the map,

map <- mapdeck(
    token = key,
    style = 'mapbox://styles/mapbox/dark-v9',
    location = c(-73.96616, 40.78494),
    zoom = 10,
    pitch = 45
  ) %>%
  add_scatterplot(
    data = df_input,,
    lat = "latitudeBBLBuilding",
    lon = "longitudeBBLBuilding",
    radius = 12,
    fill_colour = "classBuilding",
    layer_id = "scatter_layer",
    tooltip = "htmlTooltip",
    auto_highlight = T,
    palette = viridis::inferno
  )

Here she is…