call us now : : 347-649-4219

PL : PLUMBING, MH : MECHANICAL, BL : BOILER, FB : FUEL BURNING

FS : FUEL STORAGE, ST PIPE : STANDPIPE, SP : SPRINKLER

FA : FIRE ALARM, EQ : EQUIPMENT, FSP : FIRE SUPPRESSION, CC : CURB CUT

var urlParams = new URLSearchParams(window.location.search);

var bin = urlParams.get('bin');

var source_url= 'https://data.cityofnewyork.us/resource/rvhx-8trz.json?';

var full_api_url = source_url+"bin__="+bin;

var counter_num = 0;

var five_year_cost_PL = 0;

var five_year_cost_OTHER = 0;

var ten_year_cost_PL = 0;

var ten_year_cost_OTHER = 0;

var five_year_cost_MH = 0;

var five_year_cost_BL = 0;

var five_year_cost_FB = 0;

var five_year_cost_FS = 0;

var five_year_cost_ST_PIPE = 0;

var five_year_cost_SP = 0;

var five_year_cost_FA = 0;

var five_year_cost_EQ = 0;

var five_year_cost_FSP = 0;

var five_year_cost_CC = 0;

var ten_year_cost_MH = 0;

var ten_year_cost_BL = 0;

var ten_year_cost_FB = 0;

var ten_year_cost_FS = 0;

var ten_year_cost_ST_PIPE = 0;

var ten_year_cost_SP = 0;

var ten_year_cost_FA = 0;

var ten_year_cost_EQ = 0;

var ten_year_cost_FSP = 0;

var ten_year_cost_CC = 0;

var jobs = [];

$.getJSON(full_api_url, function(result){

$.each(result, function(i, field){

jobs[i] = field.job__;

});

var uniq = jobs .map((job) => { return {count: 1, job: job} }) .reduce((a, b) => { a[b.job] = (a[b.job] || 0) + b.count return a }, {})

var sorted_jobs = Object.keys(uniq).sort((a, b) => uniq[a] = today_date1) {

if(field.plumbing == 'X') { five_year_cost_PL = five_year_cost_PL + initial_cost; } if(field.other == 'X') { five_year_cost_OTHER = five_year_cost_OTHER + initial_cost; } if(field.mechanical == 'X') { five_year_cost_MH = five_year_cost_MH + initial_cost; } if(field.boiler == 'X') { five_year_cost_BL = five_year_cost_BL + initial_cost; } if(field.fuel_burning == 'X') { five_year_cost_FB = five_year_cost_FB + initial_cost; } if(field.fuel_storage == 'X') { five_year_cost_FS = five_year_cost_FS + initial_cost; } if(field.standpipe == 'X') { five_year_cost_ST_PIPE = five_year_cost_ST_PIPE + initial_cost; } if(field.sprinkler == 'X') { five_year_cost_SP = five_year_cost_SP + initial_cost; } if(field.fire_alarm == 'X') { five_year_cost_FA = five_year_cost_FA + initial_cost; } if(field.equipment == 'X') { five_year_cost_EQ = five_year_cost_EQ + initial_cost; } if(field.fire_suppression == 'X') { five_year_cost_FSP = five_year_cost_FSP + initial_cost; } if(field.curb_cut == 'X') { five_year_cost_CC = five_year_cost_CC + initial_cost; }

}

//if(latest_date >= today_date2) {

if(field.plumbing == 'X') { ten_year_cost_PL = ten_year_cost_PL + initial_cost; } if(field.other == 'X') { ten_year_cost_OTHER = ten_year_cost_OTHER + initial_cost; } if(field.mechanical == 'X') { ten_year_cost_MH = ten_year_cost_MH + initial_cost; } if(field.boiler == 'X') { ten_year_cost_BL = ten_year_cost_BL + initial_cost; } if(field.fuel_burning == 'X') { ten_year_cost_FB = ten_year_cost_FB + initial_cost; } if(field.fuel_storage == 'X') { ten_year_cost_FS = ten_year_cost_FS + initial_cost; } if(field.standpipe == 'X') { ten_year_cost_ST_PIPE = ten_year_cost_ST_PIPE + initial_cost; } if(field.sprinkler == 'X') { ten_year_cost_SP = ten_year_cost_SP + initial_cost; } if(field.fire_alarm == 'X') { ten_year_cost_FA = ten_year_cost_FA + initial_cost; } if(field.equipment == 'X') { ten_year_cost_EQ = ten_year_cost_EQ + initial_cost; } if(field.fire_suppression == 'X') { ten_year_cost_FSP = ten_year_cost_FSP + initial_cost; } if(field.curb_cut == 'X') { ten_year_cost_CC = ten_year_cost_CC + initial_cost; }

}

$("#vionumcount").append("

" + "

" + "

" + "

" + "

" + "

" + "

"+ "

" +"

" + "

" + "

"+ "

" + "

"+ "

"+"

")

if(c==1) { return false; }

c = c+1;

});

if(counter_num == (sorted_length - 1))

{

$("#vionumcount1").append("

"+"

" + "

" + "

" +"

"+ "

"+"

" + "

" + "

" +"

" + "

"+"

" + "

" + "

" +"

"+ "

"+"

" + "

" + "

" +"

"+ "

"+"

" + "

" + "

" +"

" + "

"+"

" + "

" + "

" +"

"+ "

"+"

" + "

" + "

" +"

"+

"

"+"

" + "

" + "

" +"

"+ "

"+"

" + "

" + "

" +"

" + "

"+"

" + "

" + "

" +"

"+ "

"+"

" + "

" + "

" +"

"+ "

"+"

" + "

" + "

" +"

")

}

counter_num++;

});

}

});

DESC DATE ESTIMATED COST PL MH BL FB FS ST PIPE SP FA EQ FSP CC OTHER
"+ field.job_description+ " " + field.pre__filing_date + " "+ field.initial_cost+ " "+ plumbing + " "+ mechanical + " " + boiler + " "+ fuel_burning+ " "+ fuel_storage + " "+ standpipe + " "+ sprinkler+ " " + fire_alarm+ " "+ equipment+ " "+ fire_suppression+ " "+ curb_cut+ " "+ other_description+ "
"+ "PL" + " "+ five_year_cost_PL + " "+ ten_year_cost_PL + "
"+ "MH" + " " + five_year_cost_MH + " "+ ten_year_cost_MH + "
"+ "BL" + " "+ five_year_cost_BL + " "+ ten_year_cost_BL + "
"+ "FB" + " " + five_year_cost_FB + " "+ ten_year_cost_FB + "
"+ "FS" + " " + five_year_cost_FS + " "+ ten_year_cost_FS + "
"+ "ST PIPE" + " "+ five_year_cost_ST_PIPE + " "+ ten_year_cost_ST_PIPE + "
"+ "SP" + " " + five_year_cost_SP + " "+ ten_year_cost_SP + "
"+ "FA" + " "+ five_year_cost_FA + " "+ ten_year_cost_FA + "
"+ "EQ" + " " + five_year_cost_EQ + " "+ ten_year_cost_EQ + "
"+ "FSP" + " "+ five_year_cost_FSP + " "+ ten_year_cost_FSP + "
"+ "CC" + " " + five_year_cost_CC + " "+ ten_year_cost_CC + "
"+ "OTHER" + " " + five_year_cost_OTHER + " "+ ten_year_cost_OTHER + "

 

ITEM $ SPENT IN LAST 5 YEARS $ SPENT IN LAST 10 + YEARS

 

Visitor Statistics



web counter



View Full
Stats