Published
Edited
Jan 11, 2021
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
unit_count = {
var unit_count_map = {"Single Family-1 Conversion": 2, "Single Family-2 Conversion": 3, "Single Family-3 Conversion": 4, "Duplex": 2, "Triplex": 3, "Quadplex": 4, "Three-Level Split": 3, "Four-Level Split": 4, "Apartments":100000, "Rooming House":1};
var parcel_unit_map = {
"1017 GROVE ST": 8,
"212 5TH ST SW": 9,
"1020 CHERRY AVE": 8,
"517 RIDGE ST": 9,
}
var data = _.clone(filter.parcels.features)
console.log( Object.keys(unit_count_map))
data.filter(d=> Object.keys(unit_count_map).indexOf(getUseCode(d,true, false)) !== -1)
var red = data.reduce((acc, d) => {
var use = getUseCode(d,true, false);
if(use in unit_count_map){
if(typeof use !== 'undefined' && use.indexOf("Apartments") !== -1){console.log("Apartments!", d.properties.StreetNumber, d.properties.StreetName)}
if(unit_count_map[use] > 1000){console.log('check', use, d)}
return acc+unit_count_map[use];
}
return acc+1
},0)
console.log(red)
console.log(_.groupBy(data, (d)=> {
return getUseCode(d,true,false)
}))
console.log(data)
return data
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more