How to use median method in Best

Best JavaScript code snippet using best

borough_renting_data.py

Source:borough_renting_data.py Github

copy

Full Screen

1# BBC 2019 https://www.bbc.co.uk/news/business-23234033...

Full Screen

Full Screen

config.py

Source:config.py Github

copy

Full Screen

1#!/usr/bin/env python32# -*- coding: utf-8 -*-3"""4######5Config6######7*Created on Mon Jun 12 14:10 2017 by A. Pahl*8Configuration variables, e.g. the list of parameters from which to generate the Activity Profile.."""9# Parameters from parameters_0.0005_0.025_773_0.90_307.txt (24-Aug-2017)10# #Parameters11# relevant_parameters(ctrls_std_rel_min=0.0005, ctrls_std_rel_max=0.0025): 77312# correlation_filter_var(cutoff=0.90): 30713ACT_PROF_PARAMETERS = [14 "Median_Cells_AreaShape_Area",15 "Median_Cells_AreaShape_MaximumRadius",16 "Median_Cells_AreaShape_MedianRadius",17 "Median_Cells_AreaShape_MinFeretDiameter",18 "Median_Cells_AreaShape_MinorAxisLength",19 "Median_Cells_Correlation_Correlation_ER_Ph_golgi",20 "Median_Cells_Correlation_Correlation_ER_Syto",21 "Median_Cells_Correlation_Correlation_Hoechst_ER",22 "Median_Cells_Correlation_Correlation_Hoechst_Mito",23 "Median_Cells_Correlation_Correlation_Hoechst_Ph_golgi",24 "Median_Cells_Correlation_Correlation_Hoechst_Syto",25 "Median_Cells_Correlation_Correlation_Mito_Ph_golgi",26 "Median_Cells_Correlation_Correlation_Mito_Syto",27 "Median_Cells_Correlation_Correlation_Syto_Ph_golgi",28 "Median_Cells_Correlation_K_ER_Syto",29 "Median_Cells_Correlation_K_Mito_Hoechst",30 "Median_Cells_Correlation_K_Ph_golgi_Syto",31 "Median_Cells_Correlation_K_Syto_ER",32 "Median_Cells_Correlation_K_Syto_Hoechst",33 "Median_Cells_Correlation_K_Syto_Ph_golgi",34 "Median_Cells_Correlation_Manders_ER_Syto",35 "Median_Cells_Correlation_Manders_Mito_Syto",36 "Median_Cells_Correlation_Overlap_ER_Syto",37 "Median_Cells_Correlation_Overlap_Hoechst_ER",38 "Median_Cells_Correlation_Overlap_Hoechst_Mito",39 "Median_Cells_Correlation_Overlap_Hoechst_Ph_golgi",40 "Median_Cells_Correlation_Overlap_Hoechst_Syto",41 "Median_Cells_Correlation_Overlap_Mito_Ph_golgi",42 "Median_Cells_Correlation_Overlap_Mito_Syto",43 "Median_Cells_Correlation_Overlap_Syto_Ph_golgi",44 "Median_Cells_Correlation_RWC_ER_Ph_golgi",45 "Median_Cells_Correlation_RWC_Hoechst_Mito",46 "Median_Cells_Correlation_RWC_Hoechst_Syto",47 "Median_Cells_Correlation_RWC_Mito_Ph_golgi",48 "Median_Cells_Correlation_RWC_Mito_Syto",49 "Median_Cells_Correlation_RWC_Ph_golgi_Mito",50 "Median_Cells_Correlation_RWC_Ph_golgi_Syto",51 "Median_Cells_Correlation_RWC_Syto_Mito",52 "Median_Cells_Correlation_RWC_Syto_Ph_golgi",53 "Median_Cells_Granularity_1_Mito",54 "Median_Cells_Granularity_2_Mito",55 "Median_Cells_Granularity_2_Ph_golgi",56 "Median_Cells_Granularity_3_Mito",57 "Median_Cells_Granularity_3_Ph_golgi",58 "Median_Cells_Granularity_4_Mito",59 "Median_Cells_Granularity_4_Syto",60 "Median_Cells_Granularity_5_Mito",61 "Median_Cells_Granularity_5_Ph_golgi",62 "Median_Cells_Granularity_5_Syto",63 "Median_Cells_Intensity_IntegratedIntensityEdge_Mito",64 "Median_Cells_Intensity_IntegratedIntensityEdge_Syto",65 "Median_Cells_Intensity_IntegratedIntensity_Mito",66 "Median_Cells_Intensity_IntegratedIntensity_Syto",67 "Median_Cells_Intensity_LowerQuartileIntensity_Mito",68 "Median_Cells_Intensity_MADIntensity_Syto",69 "Median_Cells_Intensity_MassDisplacement_Mito",70 "Median_Cells_Intensity_MassDisplacement_Ph_golgi",71 "Median_Cells_Intensity_MaxIntensityEdge_Mito",72 "Median_Cells_Intensity_MaxIntensityEdge_Syto",73 "Median_Cells_Intensity_MaxIntensity_Hoechst",74 "Median_Cells_Intensity_MaxIntensity_Mito",75 "Median_Cells_Intensity_MaxIntensity_Ph_golgi",76 "Median_Cells_Intensity_MaxIntensity_Syto",77 "Median_Cells_Intensity_MeanIntensityEdge_Mito",78 "Median_Cells_Intensity_MeanIntensityEdge_Syto",79 "Median_Cells_Intensity_MeanIntensity_Mito",80 "Median_Cells_Intensity_MeanIntensity_Syto",81 "Median_Cells_Intensity_MedianIntensity_Mito",82 "Median_Cells_Intensity_MedianIntensity_Syto",83 "Median_Cells_Intensity_MinIntensityEdge_Mito",84 "Median_Cells_Intensity_MinIntensity_Mito",85 "Median_Cells_Intensity_StdIntensityEdge_Syto",86 "Median_Cells_Intensity_StdIntensity_Hoechst",87 "Median_Cells_Intensity_StdIntensity_Ph_golgi",88 "Median_Cells_Intensity_UpperQuartileIntensity_Syto",89 "Median_Cells_RadialDistribution_FracAtD_ER_1of4",90 "Median_Cells_RadialDistribution_FracAtD_ER_2of4",91 "Median_Cells_RadialDistribution_FracAtD_Mito_1of4",92 "Median_Cells_RadialDistribution_FracAtD_Mito_2of4",93 "Median_Cells_RadialDistribution_FracAtD_Mito_3of4",94 "Median_Cells_RadialDistribution_FracAtD_Mito_4of4",95 "Median_Cells_RadialDistribution_FracAtD_Ph_golgi_1of4",96 "Median_Cells_RadialDistribution_FracAtD_Ph_golgi_2of4",97 "Median_Cells_RadialDistribution_FracAtD_Ph_golgi_3of4",98 "Median_Cells_RadialDistribution_FracAtD_Ph_golgi_4of4",99 "Median_Cells_RadialDistribution_FracAtD_Syto_1of4",100 "Median_Cells_RadialDistribution_FracAtD_Syto_2of4",101 "Median_Cells_RadialDistribution_FracAtD_Syto_4of4",102 "Median_Cells_RadialDistribution_MeanFrac_Mito_1of4",103 "Median_Cells_RadialDistribution_MeanFrac_Mito_2of4",104 "Median_Cells_RadialDistribution_MeanFrac_Mito_3of4",105 "Median_Cells_RadialDistribution_MeanFrac_Mito_4of4",106 "Median_Cells_RadialDistribution_MeanFrac_Ph_golgi_1of4",107 "Median_Cells_RadialDistribution_MeanFrac_Ph_golgi_2of4",108 "Median_Cells_RadialDistribution_MeanFrac_Ph_golgi_3of4",109 "Median_Cells_RadialDistribution_MeanFrac_Ph_golgi_4of4",110 "Median_Cells_RadialDistribution_MeanFrac_Syto_1of4",111 "Median_Cells_RadialDistribution_MeanFrac_Syto_2of4",112 "Median_Cells_RadialDistribution_RadialCV_Mito_2of4",113 "Median_Cells_RadialDistribution_RadialCV_Mito_3of4",114 "Median_Cells_RadialDistribution_RadialCV_Mito_4of4",115 "Median_Cells_RadialDistribution_RadialCV_Ph_golgi_1of4",116 "Median_Cells_RadialDistribution_RadialCV_Ph_golgi_2of4",117 "Median_Cells_RadialDistribution_RadialCV_Ph_golgi_3of4",118 "Median_Cells_RadialDistribution_RadialCV_Syto_1of4",119 "Median_Cells_RadialDistribution_RadialCV_Syto_2of4",120 "Median_Cells_Texture_AngularSecondMoment_Mito_10_00",121 "Median_Cells_Texture_AngularSecondMoment_Mito_3_00",122 "Median_Cells_Texture_AngularSecondMoment_Mito_5_00",123 "Median_Cells_Texture_Contrast_Hoechst_10_00",124 "Median_Cells_Texture_Contrast_Hoechst_3_00",125 "Median_Cells_Texture_Contrast_Hoechst_5_00",126 "Median_Cells_Texture_Contrast_Mito_3_00",127 "Median_Cells_Texture_Contrast_Ph_golgi_10_00",128 "Median_Cells_Texture_Contrast_Ph_golgi_3_00",129 "Median_Cells_Texture_Contrast_Ph_golgi_5_00",130 "Median_Cells_Texture_Contrast_Syto_10_00",131 "Median_Cells_Texture_Correlation_ER_10_00",132 "Median_Cells_Texture_Correlation_ER_3_00",133 "Median_Cells_Texture_Correlation_ER_5_00",134 "Median_Cells_Texture_Correlation_Mito_10_00",135 "Median_Cells_Texture_Correlation_Ph_golgi_10_00",136 "Median_Cells_Texture_Correlation_Ph_golgi_3_00",137 "Median_Cells_Texture_Correlation_Ph_golgi_5_00",138 "Median_Cells_Texture_Correlation_Syto_10_00",139 "Median_Cells_Texture_Correlation_Syto_3_00",140 "Median_Cells_Texture_Correlation_Syto_5_00",141 "Median_Cells_Texture_DifferenceEntropy_Hoechst_10_00",142 "Median_Cells_Texture_DifferenceEntropy_Hoechst_3_00",143 "Median_Cells_Texture_DifferenceEntropy_Hoechst_5_00",144 "Median_Cells_Texture_DifferenceEntropy_Mito_3_00",145 "Median_Cells_Texture_DifferenceEntropy_Mito_5_00",146 "Median_Cells_Texture_DifferenceEntropy_Ph_golgi_10_00",147 "Median_Cells_Texture_DifferenceEntropy_Ph_golgi_3_00",148 "Median_Cells_Texture_DifferenceEntropy_Ph_golgi_5_00",149 "Median_Cells_Texture_DifferenceEntropy_Syto_10_00",150 "Median_Cells_Texture_DifferenceEntropy_Syto_3_00",151 "Median_Cells_Texture_DifferenceEntropy_Syto_5_00",152 "Median_Cells_Texture_DifferenceVariance_Hoechst_10_00",153 "Median_Cells_Texture_DifferenceVariance_Hoechst_3_00",154 "Median_Cells_Texture_DifferenceVariance_Hoechst_5_00",155 "Median_Cells_Texture_DifferenceVariance_Mito_10_00",156 "Median_Cells_Texture_DifferenceVariance_Mito_3_00",157 "Median_Cells_Texture_DifferenceVariance_Mito_5_00",158 "Median_Cells_Texture_DifferenceVariance_Ph_golgi_10_00",159 "Median_Cells_Texture_DifferenceVariance_Ph_golgi_3_00",160 "Median_Cells_Texture_DifferenceVariance_Ph_golgi_5_00",161 "Median_Cells_Texture_DifferenceVariance_Syto_10_00",162 "Median_Cells_Texture_DifferenceVariance_Syto_3_00",163 "Median_Cells_Texture_DifferenceVariance_Syto_5_00",164 "Median_Cells_Texture_Entropy_Hoechst_10_00",165 "Median_Cells_Texture_Entropy_Hoechst_3_00",166 "Median_Cells_Texture_Entropy_Hoechst_5_00",167 "Median_Cells_Texture_Entropy_Ph_golgi_10_00",168 "Median_Cells_Texture_Entropy_Ph_golgi_3_00",169 "Median_Cells_Texture_Entropy_Ph_golgi_5_00",170 "Median_Cells_Texture_Entropy_Syto_10_00",171 "Median_Cells_Texture_Entropy_Syto_3_00",172 "Median_Cells_Texture_Entropy_Syto_5_00",173 "Median_Cells_Texture_InfoMeas2_Ph_golgi_10_00",174 "Median_Cells_Texture_InfoMeas2_Ph_golgi_3_00",175 "Median_Cells_Texture_InfoMeas2_Ph_golgi_5_00",176 "Median_Cells_Texture_InfoMeas2_Syto_3_00",177 "Median_Cells_Texture_InfoMeas2_Syto_5_00",178 "Median_Cells_Texture_InverseDifferenceMoment_ER_3_00",179 "Median_Cells_Texture_InverseDifferenceMoment_ER_5_00",180 "Median_Cells_Texture_InverseDifferenceMoment_Hoechst_10_00",181 "Median_Cells_Texture_InverseDifferenceMoment_Hoechst_3_00",182 "Median_Cells_Texture_InverseDifferenceMoment_Hoechst_5_00",183 "Median_Cells_Texture_InverseDifferenceMoment_Mito_10_00",184 "Median_Cells_Texture_InverseDifferenceMoment_Mito_3_00",185 "Median_Cells_Texture_InverseDifferenceMoment_Mito_5_00",186 "Median_Cells_Texture_InverseDifferenceMoment_Ph_golgi_10_00",187 "Median_Cells_Texture_InverseDifferenceMoment_Ph_golgi_3_00",188 "Median_Cells_Texture_InverseDifferenceMoment_Ph_golgi_5_00",189 "Median_Cells_Texture_InverseDifferenceMoment_Syto_10_00",190 "Median_Cells_Texture_InverseDifferenceMoment_Syto_3_00",191 "Median_Cells_Texture_InverseDifferenceMoment_Syto_5_00",192 "Median_Cells_Texture_SumAverage_Mito_3_00",193 "Median_Cells_Texture_SumAverage_Mito_5_00",194 "Median_Cells_Texture_SumAverage_Syto_10_00",195 "Median_Cells_Texture_SumAverage_Syto_3_00",196 "Median_Cells_Texture_SumAverage_Syto_5_00",197 "Median_Cells_Texture_SumEntropy_Hoechst_10_00",198 "Median_Cells_Texture_SumEntropy_Hoechst_3_00",199 "Median_Cells_Texture_SumEntropy_Hoechst_5_00",200 "Median_Cells_Texture_SumEntropy_Ph_golgi_10_00",201 "Median_Cells_Texture_SumEntropy_Ph_golgi_3_00",202 "Median_Cells_Texture_SumEntropy_Ph_golgi_5_00",203 "Median_Cells_Texture_SumEntropy_Syto_3_00",204 "Median_Cells_Texture_SumEntropy_Syto_5_00",205 "Median_Cells_Texture_SumVariance_Hoechst_10_00",206 "Median_Cells_Texture_SumVariance_Hoechst_3_00",207 "Median_Cells_Texture_SumVariance_Hoechst_5_00",208 "Median_Cells_Texture_SumVariance_Ph_golgi_10_00",209 "Median_Cells_Texture_SumVariance_Ph_golgi_3_00",210 "Median_Cells_Texture_SumVariance_Ph_golgi_5_00",211 "Median_Cells_Texture_Variance_Hoechst_10_00",212 "Median_Cells_Texture_Variance_Hoechst_3_00",213 "Median_Cells_Texture_Variance_Hoechst_5_00",214 "Median_Cells_Texture_Variance_Ph_golgi_10_00",215 "Median_Cells_Texture_Variance_Ph_golgi_3_00",216 "Median_Cells_Texture_Variance_Ph_golgi_5_00",217 "Median_Cytoplasm_AreaShape_MinFeretDiameter",218 "Median_Cytoplasm_AreaShape_MinorAxisLength",219 "Median_Cytoplasm_AreaShape_Perimeter",220 "Median_Cytoplasm_Correlation_Correlation_ER_Ph_golgi",221 "Median_Cytoplasm_Correlation_Correlation_ER_Syto",222 "Median_Cytoplasm_Correlation_Correlation_Hoechst_Mito",223 "Median_Cytoplasm_Correlation_Correlation_Hoechst_Ph_golgi",224 "Median_Cytoplasm_Correlation_Correlation_Hoechst_Syto",225 "Median_Cytoplasm_Correlation_Correlation_Mito_Ph_golgi",226 "Median_Cytoplasm_Correlation_Correlation_Mito_Syto",227 "Median_Cytoplasm_Correlation_Correlation_Syto_Ph_golgi",228 "Median_Cytoplasm_Correlation_K_ER_Syto",229 "Median_Cytoplasm_Correlation_K_Hoechst_Mito",230 "Median_Cytoplasm_Correlation_K_Hoechst_Ph_golgi",231 "Median_Cytoplasm_Correlation_K_Hoechst_Syto",232 "Median_Cytoplasm_Correlation_K_Mito_Hoechst",233 "Median_Cytoplasm_Correlation_K_Ph_golgi_Hoechst",234 "Median_Cytoplasm_Correlation_K_Ph_golgi_Syto",235 "Median_Cytoplasm_Correlation_K_Syto_ER",236 "Median_Cytoplasm_Correlation_K_Syto_Hoechst",237 "Median_Cytoplasm_Correlation_K_Syto_Ph_golgi",238 "Median_Cytoplasm_Correlation_Manders_ER_Hoechst",239 "Median_Cytoplasm_Correlation_Manders_Mito_Hoechst",240 "Median_Cytoplasm_Correlation_Manders_Syto_Hoechst",241 "Median_Cytoplasm_Correlation_Overlap_ER_Syto",242 "Median_Cytoplasm_Correlation_Overlap_Hoechst_ER",243 "Median_Cytoplasm_Correlation_Overlap_Hoechst_Mito",244 "Median_Cytoplasm_Correlation_Overlap_Hoechst_Ph_golgi",245 "Median_Cytoplasm_Correlation_Overlap_Mito_Ph_golgi",246 "Median_Cytoplasm_Correlation_Overlap_Mito_Syto",247 "Median_Cytoplasm_Correlation_Overlap_Syto_Ph_golgi",248 "Median_Cytoplasm_Correlation_RWC_ER_Hoechst",249 "Median_Cytoplasm_Correlation_RWC_Hoechst_Mito",250 "Median_Cytoplasm_Correlation_RWC_Hoechst_Ph_golgi",251 "Median_Cytoplasm_Correlation_RWC_Hoechst_Syto",252 "Median_Cytoplasm_Correlation_RWC_Mito_Ph_golgi",253 "Median_Cytoplasm_Correlation_RWC_Ph_golgi_Mito",254 "Median_Cytoplasm_Correlation_RWC_Ph_golgi_Syto",255 "Median_Cytoplasm_Correlation_RWC_Syto_Mito",256 "Median_Cytoplasm_Correlation_RWC_Syto_Ph_golgi",257 "Median_Cytoplasm_Granularity_1_Mito",258 "Median_Cytoplasm_Granularity_2_Mito",259 "Median_Cytoplasm_Granularity_2_Ph_golgi",260 "Median_Cytoplasm_Granularity_3_Mito",261 "Median_Cytoplasm_Granularity_3_Ph_golgi",262 "Median_Cytoplasm_Granularity_3_Syto",263 "Median_Cytoplasm_Granularity_4_Mito",264 "Median_Cytoplasm_Granularity_5_Mito",265 "Median_Cytoplasm_Granularity_5_Ph_golgi",266 "Median_Cytoplasm_Intensity_IntegratedIntensityEdge_Mito",267 "Median_Cytoplasm_Intensity_IntegratedIntensityEdge_Syto",268 "Median_Cytoplasm_Intensity_IntegratedIntensity_Mito",269 "Median_Cytoplasm_Intensity_IntegratedIntensity_Syto",270 "Median_Cytoplasm_Intensity_LowerQuartileIntensity_Mito",271 "Median_Cytoplasm_Intensity_MADIntensity_ER",272 "Median_Cytoplasm_Intensity_MADIntensity_Ph_golgi",273 "Median_Cytoplasm_Intensity_MADIntensity_Syto",274 "Median_Cytoplasm_Intensity_MassDisplacement_Mito",275 "Median_Cytoplasm_Intensity_MaxIntensityEdge_Hoechst",276 "Median_Cytoplasm_Intensity_MaxIntensityEdge_Syto",277 "Median_Cytoplasm_Intensity_MaxIntensity_Hoechst",278 "Median_Cytoplasm_Intensity_MaxIntensity_Mito",279 "Median_Cytoplasm_Intensity_MaxIntensity_Ph_golgi",280 "Median_Cytoplasm_Intensity_MaxIntensity_Syto",281 "Median_Cytoplasm_Intensity_MeanIntensityEdge_Mito",282 "Median_Cytoplasm_Intensity_MeanIntensityEdge_Syto",283 "Median_Cytoplasm_Intensity_MeanIntensity_Mito",284 "Median_Cytoplasm_Intensity_MeanIntensity_Syto",285 "Median_Cytoplasm_Intensity_MedianIntensity_Mito",286 "Median_Cytoplasm_Intensity_MedianIntensity_Syto",287 "Median_Cytoplasm_Intensity_MinIntensityEdge_Mito",288 "Median_Cytoplasm_Intensity_MinIntensity_Mito",289 "Median_Cytoplasm_Intensity_StdIntensityEdge_Hoechst",290 "Median_Cytoplasm_Intensity_StdIntensityEdge_Ph_golgi",291 "Median_Cytoplasm_Intensity_StdIntensityEdge_Syto",292 "Median_Cytoplasm_Intensity_StdIntensity_Hoechst",293 "Median_Cytoplasm_Intensity_StdIntensity_Ph_golgi",294 "Median_Cytoplasm_Intensity_StdIntensity_Syto",295 "Median_Cytoplasm_Intensity_UpperQuartileIntensity_Mito",296 "Median_Cytoplasm_Intensity_UpperQuartileIntensity_Syto",297 "Median_Cytoplasm_RadialDistribution_MeanFrac_ER_1of4",298 "Median_Cytoplasm_RadialDistribution_MeanFrac_ER_2of4",299 "Median_Cytoplasm_RadialDistribution_MeanFrac_ER_4of4",300 "Median_Cytoplasm_RadialDistribution_MeanFrac_Mito_1of4",301 "Median_Cytoplasm_RadialDistribution_MeanFrac_Mito_2of4",302 "Median_Cytoplasm_RadialDistribution_MeanFrac_Mito_3of4",303 "Median_Cytoplasm_RadialDistribution_MeanFrac_Mito_4of4",304 "Median_Cytoplasm_RadialDistribution_MeanFrac_Ph_golgi_1of4",305 "Median_Cytoplasm_RadialDistribution_MeanFrac_Ph_golgi_2of4",306 "Median_Cytoplasm_RadialDistribution_MeanFrac_Ph_golgi_3of4",307 "Median_Cytoplasm_RadialDistribution_MeanFrac_Ph_golgi_4of4",308 "Median_Cytoplasm_RadialDistribution_MeanFrac_Syto_1of4",309 "Median_Cytoplasm_RadialDistribution_RadialCV_Mito_1of4",310 "Median_Cytoplasm_RadialDistribution_RadialCV_Mito_2of4",311 "Median_Cytoplasm_RadialDistribution_RadialCV_Mito_3of4",312 "Median_Cytoplasm_RadialDistribution_RadialCV_Mito_4of4",313 "Median_Cytoplasm_RadialDistribution_RadialCV_Ph_golgi_1of4",314 "Median_Cytoplasm_RadialDistribution_RadialCV_Ph_golgi_2of4",315 "Median_Cytoplasm_RadialDistribution_RadialCV_Ph_golgi_3of4",316 "Median_Cytoplasm_RadialDistribution_RadialCV_Ph_golgi_4of4",317 "Median_Cytoplasm_RadialDistribution_RadialCV_Syto_1of4",318 "Median_Cytoplasm_Texture_AngularSecondMoment_ER_3_00",319 "Median_Cytoplasm_Texture_AngularSecondMoment_ER_5_00",320 "Median_Cytoplasm_Texture_AngularSecondMoment_Mito_10_00",321 "Median_Cytoplasm_Texture_AngularSecondMoment_Mito_3_00",322 "Median_Cytoplasm_Texture_AngularSecondMoment_Mito_5_00",323 "Median_Cytoplasm_Texture_Contrast_Hoechst_10_00",324 "Median_Cytoplasm_Texture_Contrast_Hoechst_3_00",325 "Median_Cytoplasm_Texture_Contrast_Hoechst_5_00",326 "Median_Cytoplasm_Texture_Contrast_Mito_3_00",327 "Median_Cytoplasm_Texture_Contrast_Ph_golgi_10_00",328 "Median_Cytoplasm_Texture_Contrast_Ph_golgi_3_00",329 "Median_Cytoplasm_Texture_Contrast_Ph_golgi_5_00",330 "Median_Cytoplasm_Texture_Correlation_Ph_golgi_3_00",331 "Median_Cytoplasm_Texture_Correlation_Ph_golgi_5_00",332 "Median_Cytoplasm_Texture_DifferenceEntropy_Hoechst_10_00",333 "Median_Cytoplasm_Texture_DifferenceEntropy_Hoechst_3_00",334 "Median_Cytoplasm_Texture_DifferenceEntropy_Hoechst_5_00",335 "Median_Cytoplasm_Texture_DifferenceEntropy_Mito_10_00",336 "Median_Cytoplasm_Texture_DifferenceEntropy_Mito_3_00",337 "Median_Cytoplasm_Texture_DifferenceEntropy_Mito_5_00",338 "Median_Cytoplasm_Texture_DifferenceEntropy_Ph_golgi_10_00",339 "Median_Cytoplasm_Texture_DifferenceEntropy_Ph_golgi_3_00",340 "Median_Cytoplasm_Texture_DifferenceEntropy_Ph_golgi_5_00",341 "Median_Cytoplasm_Texture_DifferenceEntropy_Syto_10_00",342 "Median_Cytoplasm_Texture_DifferenceEntropy_Syto_3_00",343 "Median_Cytoplasm_Texture_DifferenceEntropy_Syto_5_00",344 "Median_Cytoplasm_Texture_DifferenceVariance_Hoechst_10_00",345 "Median_Cytoplasm_Texture_DifferenceVariance_Hoechst_3_00",346 "Median_Cytoplasm_Texture_DifferenceVariance_Hoechst_5_00",347 "Median_Cytoplasm_Texture_DifferenceVariance_Mito_10_00",348 "Median_Cytoplasm_Texture_DifferenceVariance_Mito_3_00",349 "Median_Cytoplasm_Texture_DifferenceVariance_Mito_5_00",350 "Median_Cytoplasm_Texture_DifferenceVariance_Ph_golgi_10_00",351 "Median_Cytoplasm_Texture_DifferenceVariance_Ph_golgi_3_00",352 "Median_Cytoplasm_Texture_DifferenceVariance_Ph_golgi_5_00",353 "Median_Cytoplasm_Texture_Entropy_ER_3_00",354 "Median_Cytoplasm_Texture_Entropy_Hoechst_10_00",355 "Median_Cytoplasm_Texture_Entropy_Hoechst_3_00",356 "Median_Cytoplasm_Texture_Entropy_Hoechst_5_00",357 "Median_Cytoplasm_Texture_Entropy_Mito_10_00",358 "Median_Cytoplasm_Texture_Entropy_Mito_3_00",359 "Median_Cytoplasm_Texture_Entropy_Mito_5_00",360 "Median_Cytoplasm_Texture_Entropy_Ph_golgi_10_00",361 "Median_Cytoplasm_Texture_Entropy_Ph_golgi_3_00",362 "Median_Cytoplasm_Texture_Entropy_Ph_golgi_5_00",363 "Median_Cytoplasm_Texture_Entropy_Syto_10_00",364 "Median_Cytoplasm_Texture_Entropy_Syto_3_00",365 "Median_Cytoplasm_Texture_Entropy_Syto_5_00",366 "Median_Cytoplasm_Texture_InverseDifferenceMoment_ER_10_00",367 "Median_Cytoplasm_Texture_InverseDifferenceMoment_ER_3_00",368 "Median_Cytoplasm_Texture_InverseDifferenceMoment_ER_5_00",369 "Median_Cytoplasm_Texture_InverseDifferenceMoment_Hoechst_10_00",370 "Median_Cytoplasm_Texture_InverseDifferenceMoment_Hoechst_5_00",371 "Median_Cytoplasm_Texture_InverseDifferenceMoment_Mito_10_00",372 "Median_Cytoplasm_Texture_InverseDifferenceMoment_Mito_3_00",373 "Median_Cytoplasm_Texture_InverseDifferenceMoment_Mito_5_00",374 "Median_Cytoplasm_Texture_InverseDifferenceMoment_Ph_golgi_10_00",375 "Median_Cytoplasm_Texture_InverseDifferenceMoment_Ph_golgi_3_00",376 "Median_Cytoplasm_Texture_InverseDifferenceMoment_Ph_golgi_5_00",377 "Median_Cytoplasm_Texture_InverseDifferenceMoment_Syto_10_00",378 "Median_Cytoplasm_Texture_InverseDifferenceMoment_Syto_3_00",379 "Median_Cytoplasm_Texture_InverseDifferenceMoment_Syto_5_00",380 "Median_Cytoplasm_Texture_SumAverage_Mito_10_00",381 "Median_Cytoplasm_Texture_SumAverage_Mito_3_00",382 "Median_Cytoplasm_Texture_SumAverage_Mito_5_00",383 "Median_Cytoplasm_Texture_SumAverage_Syto_10_00",384 "Median_Cytoplasm_Texture_SumAverage_Syto_3_00",385 "Median_Cytoplasm_Texture_SumAverage_Syto_5_00",386 "Median_Cytoplasm_Texture_SumEntropy_Hoechst_10_00",387 "Median_Cytoplasm_Texture_SumEntropy_Ph_golgi_10_00",388 "Median_Cytoplasm_Texture_SumEntropy_Ph_golgi_3_00",389 "Median_Cytoplasm_Texture_SumEntropy_Ph_golgi_5_00",390 "Median_Cytoplasm_Texture_SumEntropy_Syto_10_00",391 "Median_Cytoplasm_Texture_SumEntropy_Syto_3_00",392 "Median_Cytoplasm_Texture_SumEntropy_Syto_5_00",393 "Median_Cytoplasm_Texture_SumVariance_Hoechst_10_00",394 "Median_Cytoplasm_Texture_SumVariance_Hoechst_3_00",395 "Median_Cytoplasm_Texture_SumVariance_Hoechst_5_00",396 "Median_Cytoplasm_Texture_SumVariance_Ph_golgi_10_00",397 "Median_Cytoplasm_Texture_SumVariance_Ph_golgi_3_00",398 "Median_Cytoplasm_Texture_SumVariance_Ph_golgi_5_00",399 "Median_Cytoplasm_Texture_Variance_Hoechst_10_00",400 "Median_Cytoplasm_Texture_Variance_Hoechst_3_00",401 "Median_Cytoplasm_Texture_Variance_Hoechst_5_00",402 "Median_Cytoplasm_Texture_Variance_Ph_golgi_10_00",403 "Median_Cytoplasm_Texture_Variance_Ph_golgi_3_00",404 "Median_Cytoplasm_Texture_Variance_Ph_golgi_5_00",405 "Median_Nuclei_AreaShape_Area",406 "Median_Nuclei_AreaShape_FormFactor",407 "Median_Nuclei_AreaShape_MajorAxisLength",408 "Median_Nuclei_AreaShape_MaxFeretDiameter",409 "Median_Nuclei_AreaShape_MaximumRadius",410 "Median_Nuclei_AreaShape_MeanRadius",411 "Median_Nuclei_AreaShape_MinorAxisLength",412 "Median_Nuclei_AreaShape_Perimeter",413 "Median_Nuclei_AreaShape_Solidity",414 "Median_Nuclei_AreaShape_Zernike_2_2",415 "Median_Nuclei_Correlation_Correlation_ER_Ph_golgi",416 "Median_Nuclei_Correlation_Correlation_Hoechst_Syto",417 "Median_Nuclei_Correlation_Correlation_Mito_Syto",418 "Median_Nuclei_Correlation_Correlation_Syto_Ph_golgi",419 "Median_Nuclei_Correlation_Overlap_ER_Syto",420 "Median_Nuclei_Correlation_Overlap_Hoechst_Ph_golgi",421 "Median_Nuclei_Correlation_Overlap_Hoechst_Syto",422 "Median_Nuclei_Correlation_Overlap_Mito_Syto",423 "Median_Nuclei_Correlation_Overlap_Syto_Ph_golgi",424 "Median_Nuclei_Correlation_RWC_Hoechst_Ph_golgi",425 "Median_Nuclei_Correlation_RWC_Hoechst_Syto",426 "Median_Nuclei_Correlation_RWC_Mito_Syto",427 "Median_Nuclei_Correlation_RWC_Ph_golgi_Hoechst",428 "Median_Nuclei_Correlation_RWC_Ph_golgi_Syto",429 "Median_Nuclei_Correlation_RWC_Syto_Hoechst",430 "Median_Nuclei_Correlation_RWC_Syto_Mito",431 "Median_Nuclei_Correlation_RWC_Syto_Ph_golgi",432 "Median_Nuclei_Granularity_1_Hoechst",433 "Median_Nuclei_Granularity_1_Mito",434 "Median_Nuclei_Granularity_2_Hoechst",435 "Median_Nuclei_Granularity_3_Mito",436 "Median_Nuclei_Granularity_3_Ph_golgi",437 "Median_Nuclei_Granularity_3_Syto",438 "Median_Nuclei_Granularity_4_Mito",439 "Median_Nuclei_Granularity_5_Hoechst",440 "Median_Nuclei_Granularity_5_Mito",441 "Median_Nuclei_Granularity_5_Ph_golgi",442 "Median_Nuclei_Intensity_LowerQuartileIntensity_Hoechst",443 "Median_Nuclei_Intensity_MADIntensity_Hoechst",444 "Median_Nuclei_Intensity_MADIntensity_Ph_golgi",445 "Median_Nuclei_Intensity_MassDisplacement_Mito",446 "Median_Nuclei_Intensity_MaxIntensityEdge_Hoechst",447 "Median_Nuclei_Intensity_MaxIntensityEdge_Syto",448 "Median_Nuclei_Intensity_MaxIntensity_Hoechst",449 "Median_Nuclei_Intensity_MaxIntensity_Ph_golgi",450 "Median_Nuclei_Intensity_MeanIntensityEdge_Hoechst",451 "Median_Nuclei_Intensity_MeanIntensity_Hoechst",452 "Median_Nuclei_Intensity_MedianIntensity_Hoechst",453 "Median_Nuclei_Intensity_MinIntensityEdge_Hoechst",454 "Median_Nuclei_Intensity_MinIntensity_Hoechst",455 "Median_Nuclei_Intensity_StdIntensityEdge_Ph_golgi",456 "Median_Nuclei_Intensity_StdIntensityEdge_Syto",457 "Median_Nuclei_Intensity_StdIntensity_Hoechst",458 "Median_Nuclei_Intensity_StdIntensity_Ph_golgi",459 "Median_Nuclei_Intensity_StdIntensity_Syto",460 "Median_Nuclei_Intensity_UpperQuartileIntensity_Hoechst",461 "Median_Nuclei_RadialDistribution_FracAtD_Mito_3of4",462 "Median_Nuclei_RadialDistribution_FracAtD_Mito_4of4",463 "Median_Nuclei_RadialDistribution_FracAtD_Ph_golgi_3of4",464 "Median_Nuclei_RadialDistribution_FracAtD_Ph_golgi_4of4",465 "Median_Nuclei_RadialDistribution_FracAtD_Syto_3of4",466 "Median_Nuclei_RadialDistribution_MeanFrac_Mito_1of4",467 "Median_Nuclei_RadialDistribution_MeanFrac_Mito_2of4",468 "Median_Nuclei_RadialDistribution_MeanFrac_Mito_3of4",469 "Median_Nuclei_RadialDistribution_MeanFrac_Mito_4of4",470 "Median_Nuclei_RadialDistribution_MeanFrac_Ph_golgi_1of4",471 "Median_Nuclei_RadialDistribution_MeanFrac_Ph_golgi_2of4",472 "Median_Nuclei_RadialDistribution_MeanFrac_Ph_golgi_3of4",473 "Median_Nuclei_RadialDistribution_MeanFrac_Ph_golgi_4of4",474 "Median_Nuclei_RadialDistribution_MeanFrac_Syto_3of4",475 "Median_Nuclei_RadialDistribution_RadialCV_Mito_2of4",476 "Median_Nuclei_RadialDistribution_RadialCV_Mito_3of4",477 "Median_Nuclei_RadialDistribution_RadialCV_Mito_4of4",478 "Median_Nuclei_RadialDistribution_RadialCV_Syto_1of4",479 "Median_Nuclei_RadialDistribution_RadialCV_Syto_2of4",480 "Median_Nuclei_RadialDistribution_RadialCV_Syto_3of4",481 "Median_Nuclei_Texture_AngularSecondMoment_Hoechst_10_00",482 "Median_Nuclei_Texture_AngularSecondMoment_Hoechst_3_00",483 "Median_Nuclei_Texture_AngularSecondMoment_Hoechst_5_00",484 "Median_Nuclei_Texture_AngularSecondMoment_Ph_golgi_10_00",485 "Median_Nuclei_Texture_AngularSecondMoment_Ph_golgi_3_00",486 "Median_Nuclei_Texture_AngularSecondMoment_Ph_golgi_5_00",487 "Median_Nuclei_Texture_Contrast_Hoechst_10_00",488 "Median_Nuclei_Texture_Contrast_Hoechst_3_00",489 "Median_Nuclei_Texture_Contrast_Hoechst_5_00",490 "Median_Nuclei_Texture_Contrast_Ph_golgi_10_00",491 "Median_Nuclei_Texture_Contrast_Ph_golgi_3_00",492 "Median_Nuclei_Texture_Contrast_Ph_golgi_5_00",493 "Median_Nuclei_Texture_Contrast_Syto_10_00",494 "Median_Nuclei_Texture_Contrast_Syto_3_00",495 "Median_Nuclei_Texture_Contrast_Syto_5_00",496 "Median_Nuclei_Texture_Correlation_Hoechst_3_00",497 "Median_Nuclei_Texture_Correlation_Ph_golgi_3_00",498 "Median_Nuclei_Texture_Correlation_Ph_golgi_5_00",499 "Median_Nuclei_Texture_Correlation_Syto_3_00",500 "Median_Nuclei_Texture_Correlation_Syto_5_00",501 "Median_Nuclei_Texture_DifferenceEntropy_Hoechst_10_00",502 "Median_Nuclei_Texture_DifferenceEntropy_Hoechst_3_00",503 "Median_Nuclei_Texture_DifferenceEntropy_Hoechst_5_00",504 "Median_Nuclei_Texture_DifferenceEntropy_Syto_10_00",505 "Median_Nuclei_Texture_DifferenceEntropy_Syto_3_00",506 "Median_Nuclei_Texture_DifferenceEntropy_Syto_5_00",507 "Median_Nuclei_Texture_DifferenceVariance_Hoechst_10_00",508 "Median_Nuclei_Texture_DifferenceVariance_Hoechst_3_00",509 "Median_Nuclei_Texture_DifferenceVariance_Hoechst_5_00",510 "Median_Nuclei_Texture_DifferenceVariance_Mito_3_00",511 "Median_Nuclei_Texture_DifferenceVariance_Ph_golgi_5_00",512 "Median_Nuclei_Texture_DifferenceVariance_Syto_3_00",513 "Median_Nuclei_Texture_DifferenceVariance_Syto_5_00",514 "Median_Nuclei_Texture_Entropy_Hoechst_10_00",515 "Median_Nuclei_Texture_Entropy_Hoechst_3_00",516 "Median_Nuclei_Texture_Entropy_Hoechst_5_00",517 "Median_Nuclei_Texture_Entropy_Ph_golgi_10_00",518 "Median_Nuclei_Texture_Entropy_Ph_golgi_3_00",519 "Median_Nuclei_Texture_Entropy_Ph_golgi_5_00",520 "Median_Nuclei_Texture_InfoMeas2_Hoechst_10_00",521 "Median_Nuclei_Texture_InfoMeas2_Hoechst_5_00",522 "Median_Nuclei_Texture_InfoMeas2_Ph_golgi_10_00",523 "Median_Nuclei_Texture_InfoMeas2_Ph_golgi_3_00",524 "Median_Nuclei_Texture_InfoMeas2_Ph_golgi_5_00",525 "Median_Nuclei_Texture_InverseDifferenceMoment_Hoechst_10_00",526 "Median_Nuclei_Texture_InverseDifferenceMoment_Hoechst_3_00",527 "Median_Nuclei_Texture_InverseDifferenceMoment_Hoechst_5_00",528 "Median_Nuclei_Texture_InverseDifferenceMoment_Ph_golgi_10_00",529 "Median_Nuclei_Texture_InverseDifferenceMoment_Ph_golgi_3_00",530 "Median_Nuclei_Texture_InverseDifferenceMoment_Ph_golgi_5_00",531 "Median_Nuclei_Texture_InverseDifferenceMoment_Syto_3_00",532 "Median_Nuclei_Texture_SumAverage_Hoechst_10_00",533 "Median_Nuclei_Texture_SumAverage_Hoechst_3_00",534 "Median_Nuclei_Texture_SumAverage_Hoechst_5_00",535 "Median_Nuclei_Texture_SumEntropy_Hoechst_3_00",536 "Median_Nuclei_Texture_SumEntropy_Hoechst_5_00",537 "Median_Nuclei_Texture_SumEntropy_Ph_golgi_10_00",538 "Median_Nuclei_Texture_SumEntropy_Ph_golgi_3_00",539 "Median_Nuclei_Texture_SumEntropy_Ph_golgi_5_00",540 "Median_Nuclei_Texture_SumEntropy_Syto_10_00",541 "Median_Nuclei_Texture_SumVariance_Hoechst_10_00",542 "Median_Nuclei_Texture_SumVariance_Hoechst_3_00",543 "Median_Nuclei_Texture_SumVariance_Hoechst_5_00",544 "Median_Nuclei_Texture_SumVariance_Ph_golgi_10_00",545 "Median_Nuclei_Texture_SumVariance_Ph_golgi_5_00",546 "Median_Nuclei_Texture_SumVariance_Syto_10_00",547 "Median_Nuclei_Texture_SumVariance_Syto_3_00",548 "Median_Nuclei_Texture_SumVariance_Syto_5_00",549 "Median_Nuclei_Texture_Variance_Hoechst_10_00",550 "Median_Nuclei_Texture_Variance_Hoechst_3_00",551 "Median_Nuclei_Texture_Variance_Hoechst_5_00",552 "Median_Nuclei_Texture_Variance_Ph_golgi_10_00",553 "Median_Nuclei_Texture_Variance_Ph_golgi_3_00",554 "Median_Nuclei_Texture_Variance_Ph_golgi_5_00",555 "Median_Nuclei_Texture_Variance_Syto_10_00",556 "Median_Nuclei_Texture_Variance_Syto_3_00",557 "Median_Nuclei_Texture_Variance_Syto_5_00"558]559PARAMETER_HELP = {560 "AreaShape": "MeasureObjectSizeShape",561 "Correlation": "MeasureCorrelation",562 "Granularity": "MeasureGranularity",563 "Intensity": "MeasureObjectIntensity",564 "Neighbors": "MeasureObjectNeighbors",565 "RadialDistribution": "MeasureObjectRadialDistribution",566 "Texture": "MeasureTexture"567}568# ACT_CUTOFF = int(0.033 * len(ACT_PROF_PARAMETERS))569ACT_CUTOFF_PERC = 0.5570ACT_CUTOFF_PERC_REF = 0.5571LIMIT_CELL_COUNT_H = 75572LIMIT_CELL_COUNT_L = 50573LIMIT_ACTIVITY_H = 25574LIMIT_ACTIVITY_L = 5.0575LIMIT_SIMILARITY_H = 75...

Full Screen

Full Screen

script.js

Source:script.js Github

copy

Full Screen

1mapboxgl.accessToken = 'pk.eyJ1Ijoid2lsbGVtZGVoYWVzIiwiYSI6ImNqbmdqZ2hnYzAzb3ozd3F0aHcxM29idTkifQ.KCJrgwzjDOeW19ps9wyW2Q';2const map = new mapboxgl.Map({3 container: 'map',4 style: 'mapbox://styles/willemdehaes/cjnro3cjp25wm2spbjt8tabc9',5 center: [-73.897638, 40.713492],6 zoom: 10.07});8var hoveredZip = null;9map.on('load', function () {10 // Create a popup, but don't add it to the map yet.11 var popup = new mapboxgl.Popup({12 closeButton: false,13 closeOnClick: false14 });15 var zipCodesRTC = [11216, 11221, 11225, 10457, 10467, 10468, 10026, 10025, 10027, 11433, 11434, 11373, 10302, 10303, 10314].map(x => x.toString());16 var zipCodeStats = {17 "10001": {18 "borough": "Manhattan",19 "evictions": 46,20 "population": 21102,21 "medianHouseholdIncome": 8516822 },23 "10002": {24 "borough": "Manhattan",25 "evictions": 77,26 "population": 81410,27 "medianHouseholdIncome": 3559428 },29 "10003": {30 "borough": "Manhattan",31 "evictions": 42,32 "population": 56024,33 "medianHouseholdIncome": 10079134 },35 "10004": {36 "borough": "Manhattan",37 "evictions": 3,38 "population": 3089,39 "medianHouseholdIncome": 12305640 },41 "10005": {42 "borough": "Manhattan",43 "evictions": 14,44 "population": 7135,45 "medianHouseholdIncome": 13011646 },47 "10006": {48 "borough": "Manhattan",49 "evictions": 7,50 "population": 3011,51 "medianHouseholdIncome": 12536452 },53 "10007": {54 "borough": "Manhattan",55 "evictions": 5,56 "population": 6988,57 "medianHouseholdIncome": 23495858 },59 "10009": {60 "borough": "Manhattan",61 "evictions": 102,62 "population": 61347,63 "medianHouseholdIncome": 6078864 },65 "10010": {66 "borough": "Manhattan",67 "evictions": 23,68 "population": 31834,69 "medianHouseholdIncome": 11014270 },71 "10011": {72 "borough": "Manhattan",73 "evictions": 43,74 "population": 50984,75 "medianHouseholdIncome": 11413476 },77 "10012": {78 "borough": "Manhattan",79 "evictions": 25,80 "population": 24090,81 "medianHouseholdIncome": 10181582 },83 "10013": {84 "borough": "Manhattan",85 "evictions": 24,86 "population": 27700,87 "medianHouseholdIncome": 10416788 },89 "10014": {90 "borough": "Manhattan",91 "evictions": 29,92 "population": 31959,93 "medianHouseholdIncome": 11902694 },95 "10016": {96 "borough": "Manhattan",97 "evictions": 54,98 "population": 54183,99 "medianHouseholdIncome": 102703100 },101 "10017": {102 "borough": "Manhattan",103 "evictions": 23,104 "population": 16575,105 "medianHouseholdIncome": 106795106 },107 "10018": {108 "borough": "Manhattan",109 "evictions": 11,110 "population": 5229,111 "medianHouseholdIncome": 105479112 },113 "10019": {114 "borough": "Manhattan",115 "evictions": 95,116 "population": 42870,117 "medianHouseholdIncome": 94477118 },119 "10020": {120 "borough": "Manhattan",121 "evictions": 0,122 "population": 0123 },124 "10021": {125 "borough": "Manhattan",126 "evictions": 40,127 "population": 43631,128 "medianHouseholdIncome": 115681129 },130 "10022": {131 "borough": "Manhattan",132 "evictions": 33,133 "population": 31924,134 "medianHouseholdIncome": 123693135 },136 "10023": {137 "borough": "Manhattan",138 "evictions": 37,139 "population": 60998,140 "medianHouseholdIncome": 115080141 },142 "10024": {143 "borough": "Manhattan",144 "evictions": 32,145 "population": 59283,146 "medianHouseholdIncome": 118594147 },148 "10025": {149 "borough": "Manhattan",150 "evictions": 115,151 "population": 94600,152 "medianHouseholdIncome": 80025153 },154 "10026": {155 "borough": "Manhattan",156 "evictions": 104,157 "population": 34003,158 "medianHouseholdIncome": 52082159 },160 "10027": {161 "borough": "Manhattan",162 "evictions": 129,163 "population": 59707,164 "medianHouseholdIncome": 42754165 },166 "10028": {167 "borough": "Manhattan",168 "evictions": 36,169 "population": 45141,170 "medianHouseholdIncome": 111302171 },172 "10029": {173 "borough": "Manhattan",174 "evictions": 175,175 "population": 76003,176 "medianHouseholdIncome": 32500177 },178 "10030": {179 "borough": "Manhattan",180 "evictions": 129,181 "population": 26999,182 "medianHouseholdIncome": 33720183 },184 "10031": {185 "borough": "Manhattan",186 "evictions": 189,187 "population": 56438,188 "medianHouseholdIncome": 41848189 },190 "10032": {191 "borough": "Manhattan",192 "evictions": 167,193 "population": 57331,194 "medianHouseholdIncome": 40054195 },196 "10033": {197 "borough": "Manhattan",198 "evictions": 154,199 "population": 53926,200 "medianHouseholdIncome": 46349201 },202 "10034": {203 "borough": "Manhattan",204 "evictions": 112,205 "population": 38908,206 "medianHouseholdIncome": 45643207 },208 "10035": {209 "borough": "Manhattan",210 "evictions": 139,211 "population": 33969,212 "medianHouseholdIncome": 26893213 },214 "10036": {215 "borough": "Manhattan",216 "evictions": 93,217 "population": 24711,218 "medianHouseholdIncome": 83812219 },220 "10037": {221 "borough": "Manhattan",222 "evictions": 121,223 "population": 17416,224 "medianHouseholdIncome": 39463225 },226 "10038": {227 "borough": "Manhattan",228 "evictions": 20,229 "population": 20300,230 "medianHouseholdIncome": 82910231 },232 "10039": {233 "borough": "Manhattan",234 "evictions": 120,235 "population": 24527,236 "medianHouseholdIncome": 32257237 },238 "10040": {239 "borough": "Manhattan",240 "evictions": 113,241 "population": 41905,242 "medianHouseholdIncome": 45811243 },244 "10044": {245 "borough": "Manhattan",246 "evictions": 15,247 "population": 11661,248 "medianHouseholdIncome": 86483249 },250 "10065": {251 "borough": "Manhattan",252 "evictions": 35,253 "population": 32270,254 "medianHouseholdIncome": 118310255 },256 "10069": {257 "borough": "Manhattan",258 "evictions": 7,259 "population": 5199,260 "medianHouseholdIncome": 155702261 },262 "10075": {263 "borough": "Manhattan",264 "evictions": 9,265 "population": 26121,266 "medianHouseholdIncome": 114481267 },268 "10103": {269 "borough": "Manhattan",270 "evictions": 0,271 "population": 3272 },273 "10110": {274 "borough": "Manhattan",275 "evictions": 0,276 "population": 0277 },278 "10111": {279 "borough": "Manhattan",280 "evictions": 0,281 "population": 0282 },283 "10112": {284 "borough": "Manhattan",285 "evictions": 0,286 "population": 0287 },288 "10115": {289 "borough": "Manhattan",290 "evictions": 0,291 "population": 0292 },293 "10119": {294 "borough": "Manhattan",295 "evictions": 0,296 "population": 92297 },298 "10128": {299 "borough": "Manhattan",300 "evictions": 57,301 "population": 60453,302 "medianHouseholdIncome": 103817303 },304 "10152": {305 "borough": "Manhattan",306 "evictions": 0,307 "population": 0308 },309 "10153": {310 "borough": "Manhattan",311 "evictions": 0,312 "population": 0313 },314 "10154": {315 "borough": "Manhattan",316 "evictions": 0,317 "population": 0318 },319 "10162": {320 "borough": "Manhattan",321 "evictions": 0,322 "population": 1685,323 "medianHouseholdIncome": 178822324 },325 "10165": {326 "borough": "Manhattan",327 "evictions": 0,328 "population": 2329 },330 "10167": {331 "borough": "Manhattan",332 "evictions": 0,333 "population": 0334 },335 "10168": {336 "borough": "Manhattan",337 "evictions": 0,338 "population": 0339 },340 "10169": {341 "borough": "Manhattan",342 "evictions": 0,343 "population": 0344 },345 "10170": {346 "borough": "Manhattan",347 "evictions": 0,348 "population": 2349 },350 "10171": {351 "borough": "Manhattan",352 "evictions": 0,353 "population": 0354 },355 "10172": {356 "borough": "Manhattan",357 "evictions": 0,358 "population": 0359 },360 "10173": {361 "borough": "Manhattan",362 "evictions": 0,363 "population": 2364 },365 "10174": {366 "borough": "Manhattan",367 "evictions": 0,368 "population": 0369 },370 "10177": {371 "borough": "Manhattan",372 "evictions": 0,373 "population": 0374 },375 "10199": {376 "borough": "Manhattan",377 "evictions": 0,378 "population": 9379 },380 "10271": {381 "borough": "Manhattan",382 "evictions": 0,383 "population": 0384 },385 "10278": {386 "borough": "Manhattan",387 "evictions": 0,388 "population": 0389 },390 "10279": {391 "borough": "Manhattan",392 "evictions": 0,393 "population": 0394 },395 "10280": {396 "borough": "Manhattan",397 "evictions": 9,398 "population": 7853,399 "medianHouseholdIncome": 146875400 },401 "10301": {402 "borough": "Staten Island",403 "evictions": 121,404 "population": 39706,405 "medianHouseholdIncome": 55700406 },407 "10302": {408 "borough": "Staten Island",409 "evictions": 36,410 "population": 19088,411 "medianHouseholdIncome": 55864412 },413 "10303": {414 "borough": "Staten Island",415 "evictions": 86,416 "population": 26337,417 "medianHouseholdIncome": 55198418 },419 "10304": {420 "borough": "Staten Island",421 "evictions": 131,422 "population": 42193,423 "medianHouseholdIncome": 53843424 },425 "10305": {426 "borough": "Staten Island",427 "evictions": 58,428 "population": 41749,429 "medianHouseholdIncome": 74063430 },431 "10306": {432 "borough": "Staten Island",433 "evictions": 57,434 "population": 55909,435 "medianHouseholdIncome": 78745436 },437 "10307": {438 "borough": "Staten Island",439 "evictions": 9,440 "population": 14096,441 "medianHouseholdIncome": 77278442 },443 "10308": {444 "borough": "Staten Island",445 "evictions": 13,446 "population": 27357,447 "medianHouseholdIncome": 87493448 },449 "10309": {450 "borough": "Staten Island",451 "evictions": 21,452 "population": 32519,453 "medianHouseholdIncome": 93248454 },455 "10310": {456 "borough": "Staten Island",457 "evictions": 63,458 "population": 24962,459 "medianHouseholdIncome": 69201460 },461 "10311": {462 "borough": "Staten Island",463 "evictions": 0,464 "population": 0465 },466 "10312": {467 "borough": "Staten Island",468 "evictions": 30,469 "population": 59304,470 "medianHouseholdIncome": 88567471 },472 "10314": {473 "borough": "Staten Island",474 "evictions": 67,475 "population": 85510,476 "medianHouseholdIncome": 77761477 },478 "10451": {479 "borough": "Bronx",480 "evictions": 264,481 "population": 45713,482 "medianHouseholdIncome": 26419483 },484 "10452": {485 "borough": "Bronx",486 "evictions": 433,487 "population": 75371,488 "medianHouseholdIncome": 25771489 },490 "10453": {491 "borough": "Bronx",492 "evictions": 579,493 "population": 78309,494 "medianHouseholdIncome": 22914495 },496 "10454": {497 "borough": "Bronx",498 "evictions": 142,499 "population": 37337,500 "medianHouseholdIncome": 21553501 },502 "10455": {503 "borough": "Bronx",504 "evictions": 220,505 "population": 39665,506 "medianHouseholdIncome": 23962507 },508 "10456": {509 "borough": "Bronx",510 "evictions": 536,511 "population": 86547,512 "medianHouseholdIncome": 25868513 },514 "10457": {515 "borough": "Bronx",516 "evictions": 526,517 "population": 70496,518 "medianHouseholdIncome": 25967519 },520 "10458": {521 "borough": "Bronx",522 "evictions": 669,523 "population": 79492,524 "medianHouseholdIncome": 30339525 },526 "10459": {527 "borough": "Bronx",528 "evictions": 335,529 "population": 47308,530 "medianHouseholdIncome": 24805531 },532 "10460": {533 "borough": "Bronx",534 "evictions": 470,535 "population": 57311,536 "medianHouseholdIncome": 24086537 },538 "10461": {539 "borough": "Bronx",540 "evictions": 128,541 "population": 50502,542 "medianHouseholdIncome": 55332543 },544 "10462": {545 "borough": "Bronx",546 "evictions": 336,547 "population": 75784,548 "medianHouseholdIncome": 48315549 },550 "10463": {551 "borough": "Bronx",552 "evictions": 205,553 "population": 67970,554 "medianHouseholdIncome": 56568555 },556 "10464": {557 "borough": "Bronx",558 "evictions": 12,559 "population": 4534,560 "medianHouseholdIncome": 76917561 },562 "10465": {563 "borough": "Bronx",564 "evictions": 51,565 "population": 42230,566 "medianHouseholdIncome": 73068567 },568 "10466": {569 "borough": "Bronx",570 "evictions": 362,571 "population": 67813,572 "medianHouseholdIncome": 44354573 },574 "10467": {575 "borough": "Bronx",576 "evictions": 615,577 "population": 97060,578 "medianHouseholdIncome": 34964579 },580 "10468": {581 "borough": "Bronx",582 "evictions": 532,583 "population": 76103,584 "medianHouseholdIncome": 34988585 },586 "10469": {587 "borough": "Bronx",588 "evictions": 207,589 "population": 66631,590 "medianHouseholdIncome": 57124591 },592 "10470": {593 "borough": "Bronx",594 "evictions": 86,595 "population": 15293,596 "medianHouseholdIncome": 58839597 },598 "10471": {599 "borough": "Bronx",600 "evictions": 46,601 "population": 22922,602 "medianHouseholdIncome": 81594603 },604 "10472": {605 "borough": "Bronx",606 "evictions": 329,607 "population": 66358,608 "medianHouseholdIncome": 29934609 },610 "10473": {611 "borough": "Bronx",612 "evictions": 173,613 "population": 58519,614 "medianHouseholdIncome": 36686615 },616 "10474": {617 "borough": "Bronx",618 "evictions": 79,619 "population": 12281,620 "medianHouseholdIncome": 26901621 },622 "10475": {623 "borough": "Bronx",624 "evictions": 81,625 "population": 40931,626 "medianHouseholdIncome": 46340627 },628 "11004": {629 "borough": "Queens",630 "evictions": 6,631 "population": 14016,632 "medianHouseholdIncome": 91226633 },634 "11005": {635 "borough": "Queens",636 "evictions": 0,637 "population": 1806,638 "medianHouseholdIncome": 63368639 },640 "11101": {641 "borough": "Queens",642 "evictions": 53,643 "population": 25484,644 "medianHouseholdIncome": 51964645 },646 "11102": {647 "borough": "Queens",648 "evictions": 44,649 "population": 34133,650 "medianHouseholdIncome": 56674651 },652 "11103": {653 "borough": "Queens",654 "evictions": 52,655 "population": 38780,656 "medianHouseholdIncome": 62775657 },658 "11104": {659 "borough": "Queens",660 "evictions": 42,661 "population": 27232,662 "medianHouseholdIncome": 57155663 },664 "11105": {665 "borough": "Queens",666 "evictions": 44,667 "population": 36688,668 "medianHouseholdIncome": 62841669 },670 "11106": {671 "borough": "Queens",672 "evictions": 53,673 "population": 38875,674 "medianHouseholdIncome": 56442675 },676 "11109": {677 "borough": "Queens",678 "evictions": 10,679 "population": 3523,680 "medianHouseholdIncome": 133070681 },682 "11201": {683 "borough": "Brooklyn",684 "evictions": 56,685 "population": 51128,686 "medianHouseholdIncome": 109472687 },688 "11203": {689 "borough": "Brooklyn",690 "evictions": 317,691 "population": 76174,692 "medianHouseholdIncome": 46971693 },694 "11204": {695 "borough": "Brooklyn",696 "evictions": 69,697 "population": 78134,698 "medianHouseholdIncome": 47135699 },700 "11205": {701 "borough": "Brooklyn",702 "evictions": 79,703 "population": 40366,704 "medianHouseholdIncome": 47437705 },706 "11206": {707 "borough": "Brooklyn",708 "evictions": 135,709 "population": 81677,710 "medianHouseholdIncome": 31549711 },712 "11207": {713 "borough": "Brooklyn",714 "evictions": 406,715 "population": 93386,716 "medianHouseholdIncome": 35849717 },718 "11208": {719 "borough": "Brooklyn",720 "evictions": 417,721 "population": 94469,722 "medianHouseholdIncome": 37640723 },724 "11209": {725 "borough": "Brooklyn",726 "evictions": 112,727 "population": 68853,728 "medianHouseholdIncome": 65181729 },730 "11210": {731 "borough": "Brooklyn",732 "evictions": 217,733 "population": 62008,734 "medianHouseholdIncome": 59520735 },736 "11211": {737 "borough": "Brooklyn",738 "evictions": 56,739 "population": 90117,740 "medianHouseholdIncome": 59190741 },742 "11212": {743 "borough": "Brooklyn",744 "evictions": 468,745 "population": 84500,746 "medianHouseholdIncome": 28495747 },748 "11213": {749 "borough": "Brooklyn",750 "evictions": 290,751 "population": 63767,752 "medianHouseholdIncome": 37556753 },754 "11214": {755 "borough": "Brooklyn",756 "evictions": 111,757 "population": 88630,758 "medianHouseholdIncome": 52119759 },760 "11215": {761 "borough": "Brooklyn",762 "evictions": 16,763 "population": 63488,764 "medianHouseholdIncome": 108178765 },766 "11216": {767 "borough": "Brooklyn",768 "evictions": 162,769 "population": 54316,770 "medianHouseholdIncome": 52239771 },772 "11217": {773 "borough": "Brooklyn",774 "evictions": 36,775 "population": 35881,776 "medianHouseholdIncome": 94970777 },778 "11218": {779 "borough": "Brooklyn",780 "evictions": 82,781 "population": 75220,782 "medianHouseholdIncome": 60821783 },784 "11219": {785 "borough": "Brooklyn",786 "evictions": 59,787 "population": 92221,788 "medianHouseholdIncome": 36573789 },790 "11220": {791 "borough": "Brooklyn",792 "evictions": 88,793 "population": 99598,794 "medianHouseholdIncome": 40576795 },796 "11221": {797 "borough": "Brooklyn",798 "evictions": 284,799 "population": 78895,800 "medianHouseholdIncome": 43361801 },802 "11222": {803 "borough": "Brooklyn",804 "evictions": 37,805 "population": 36934,806 "medianHouseholdIncome": 73391807 },808 "11223": {809 "borough": "Brooklyn",810 "evictions": 87,811 "population": 78731,812 "medianHouseholdIncome": 44647813 },814 "11224": {815 "borough": "Brooklyn",816 "evictions": 107,817 "population": 47621,818 "medianHouseholdIncome": 31371819 },820 "11225": {821 "borough": "Brooklyn",822 "evictions": 223,823 "population": 56829,824 "medianHouseholdIncome": 48597825 },826 "11226": {827 "borough": "Brooklyn",828 "evictions": 487,829 "population": 101572,830 "medianHouseholdIncome": 45031831 },832 "11228": {833 "borough": "Brooklyn",834 "evictions": 33,835 "population": 41788,836 "medianHouseholdIncome": 63641837 },838 "11229": {839 "borough": "Brooklyn",840 "evictions": 90,841 "population": 80018,842 "medianHouseholdIncome": 55187843 },844 "11230": {845 "borough": "Brooklyn",846 "evictions": 122,847 "population": 86408,848 "medianHouseholdIncome": 43344849 },850 "11231": {851 "borough": "Brooklyn",852 "evictions": 29,853 "population": 33336,854 "medianHouseholdIncome": 84223855 },856 "11232": {857 "borough": "Brooklyn",858 "evictions": 31,859 "population": 28265,860 "medianHouseholdIncome": 47785861 },862 "11233": {863 "borough": "Brooklyn",864 "evictions": 368,865 "population": 67053,866 "medianHouseholdIncome": 35686867 },868 "11234": {869 "borough": "Brooklyn",870 "evictions": 139,871 "population": 87757,872 "medianHouseholdIncome": 75362873 },874 "11235": {875 "borough": "Brooklyn",876 "evictions": 132,877 "population": 79132,878 "medianHouseholdIncome": 45578879 },880 "11236": {881 "borough": "Brooklyn",882 "evictions": 251,883 "population": 93877,884 "medianHouseholdIncome": 60885885 },886 "11237": {887 "borough": "Brooklyn",888 "evictions": 77,889 "population": 49896,890 "medianHouseholdIncome": 46351891 },892 "11238": {893 "borough": "Brooklyn",894 "evictions": 102,895 "population": 49262,896 "medianHouseholdIncome": 75757897 },898 "11239": {899 "borough": "Brooklyn",900 "evictions": 88,901 "population": 13393,902 "medianHouseholdIncome": 24610903 },904 "11351": {905 "borough": "Queens",906 "evictions": 0,907 "population": 0908 },909 "11354": {910 "borough": "Queens",911 "evictions": 63,912 "population": 54878,913 "medianHouseholdIncome": 43660914 },915 "11355": {916 "borough": "Queens",917 "evictions": 91,918 "population": 85871,919 "medianHouseholdIncome": 38451920 },921 "11356": {922 "borough": "Queens",923 "evictions": 57,924 "population": 23438,925 "medianHouseholdIncome": 57849926 },927 "11357": {928 "borough": "Queens",929 "evictions": 19,930 "population": 39150,931 "medianHouseholdIncome": 74255932 },933 "11358": {934 "borough": "Queens",935 "evictions": 22,936 "population": 37546,937 "medianHouseholdIncome": 66173938 },939 "11359": {940 "borough": "Queens",941 "evictions": 2,942 "population": 0943 },944 "11360": {945 "borough": "Queens",946 "evictions": 14,947 "population": 18884,948 "medianHouseholdIncome": 82982949 },950 "11361": {951 "borough": "Queens",952 "evictions": 23,953 "population": 28606,954 "medianHouseholdIncome": 81846955 },956 "11362": {957 "borough": "Queens",958 "evictions": 6,959 "population": 17823,960 "medianHouseholdIncome": 82827961 },962 "11363": {963 "borough": "Queens",964 "evictions": 3,965 "population": 6988,966 "medianHouseholdIncome": 90443967 },968 "11364": {969 "borough": "Queens",970 "evictions": 16,971 "population": 34555,972 "medianHouseholdIncome": 70408973 },974 "11365": {975 "borough": "Queens",976 "evictions": 65,977 "population": 42252,978 "medianHouseholdIncome": 62509979 },980 "11366": {981 "borough": "Queens",982 "evictions": 8,983 "population": 13532,984 "medianHouseholdIncome": 78223985 },986 "11367": {987 "borough": "Queens",988 "evictions": 74,989 "population": 41047,990 "medianHouseholdIncome": 57310991 },992 "11368": {993 "borough": "Queens",994 "evictions": 231,995 "population": 109931,996 "medianHouseholdIncome": 45980997 },998 "11369": {999 "borough": "Queens",1000 "evictions": 38,1001 "population": 38615,1002 "medianHouseholdIncome": 518641003 },1004 "11370": {1005 "borough": "Queens",1006 "evictions": 27,1007 "population": 39688,1008 "medianHouseholdIncome": 532931009 },1010 "11371": {1011 "borough": "Queens",1012 "evictions": 0,1013 "population": 01014 },1015 "11372": {1016 "borough": "Queens",1017 "evictions": 124,1018 "population": 66636,1019 "medianHouseholdIncome": 527921020 },1021 "11373": {1022 "borough": "Queens",1023 "evictions": 123,1024 "population": 100820,1025 "medianHouseholdIncome": 456771026 },1027 "11374": {1028 "borough": "Queens",1029 "evictions": 68,1030 "population": 43600,1031 "medianHouseholdIncome": 555501032 },1033 "11375": {1034 "borough": "Queens",1035 "evictions": 67,1036 "population": 68733,1037 "medianHouseholdIncome": 729821038 },1039 "11377": {1040 "borough": "Queens",1041 "evictions": 88,1042 "population": 89830,1043 "medianHouseholdIncome": 516751044 },1045 "11378": {1046 "borough": "Queens",1047 "evictions": 47,1048 "population": 34981,1049 "medianHouseholdIncome": 616311050 },1051 "11379": {1052 "borough": "Queens",1053 "evictions": 28,1054 "population": 34821,1055 "medianHouseholdIncome": 753201056 },1057 "11385": {1058 "borough": "Queens",1059 "evictions": 193,1060 "population": 98592,1061 "medianHouseholdIncome": 605261062 },1063 "11411": {1064 "borough": "Queens",1065 "evictions": 21,1066 "population": 18556,1067 "medianHouseholdIncome": 816781068 },1069 "11412": {1070 "borough": "Queens",1071 "evictions": 82,1072 "population": 34882,1073 "medianHouseholdIncome": 719951074 },1075 "11413": {1076 "borough": "Queens",1077 "evictions": 101,1078 "population": 38912,1079 "medianHouseholdIncome": 807581080 },1081 "11414": {1082 "borough": "Queens",1083 "evictions": 28,1084 "population": 26148,1085 "medianHouseholdIncome": 704901086 },1087 "11415": {1088 "borough": "Queens",1089 "evictions": 45,1090 "population": 19341,1091 "medianHouseholdIncome": 640551092 },1093 "11416": {1094 "borough": "Queens",1095 "evictions": 57,1096 "population": 24861,1097 "medianHouseholdIncome": 590921098 },1099 "11417": {1100 "borough": "Queens",1101 "evictions": 39,1102 "population": 28967,1103 "medianHouseholdIncome": 669781104 },1105 "11418": {1106 "borough": "Queens",1107 "evictions": 79,1108 "population": 36256,1109 "medianHouseholdIncome": 630791110 },1111 "11419": {1112 "borough": "Queens",1113 "evictions": 74,1114 "population": 47211,1115 "medianHouseholdIncome": 620141116 },1117 "11420": {1118 "borough": "Queens",1119 "evictions": 87,1120 "population": 44354,1121 "medianHouseholdIncome": 614841122 },1123 "11421": {1124 "borough": "Queens",1125 "evictions": 56,1126 "population": 39127,1127 "medianHouseholdIncome": 645441128 },1129 "11422": {1130 "borough": "Queens",1131 "evictions": 74,1132 "population": 30425,1133 "medianHouseholdIncome": 854361134 },1135 "11423": {1136 "borough": "Queens",1137 "evictions": 79,1138 "population": 29987,1139 "medianHouseholdIncome": 660701140 },1141 "11424": {1142 "borough": "Queens",1143 "evictions": 0,1144 "population": 01145 },1146 "11425": {1147 "borough": "Brooklyn",1148 "evictions": 0,1149 "population": 01150 },1151 "11426": {1152 "borough": "Queens",1153 "evictions": 12,1154 "population": 17590,1155 "medianHouseholdIncome": 774871156 },1157 "11427": {1158 "borough": "Queens",1159 "evictions": 40,1160 "population": 23593,1161 "medianHouseholdIncome": 654941162 },1163 "11428": {1164 "borough": "Queens",1165 "evictions": 42,1166 "population": 19168,1167 "medianHouseholdIncome": 686751168 },1169 "11429": {1170 "borough": "Queens",1171 "evictions": 55,1172 "population": 25105,1173 "medianHouseholdIncome": 770371174 },1175 "11430": {1176 "borough": "Queens",1177 "evictions": 0,1178 "population": 1841179 },1180 "11432": {1181 "borough": "Queens",1182 "evictions": 171,1183 "population": 60809,1184 "medianHouseholdIncome": 522771185 },1186 "11433": {1187 "borough": "Queens",1188 "evictions": 157,1189 "population": 32687,1190 "medianHouseholdIncome": 458201191 },1192 "11434": {1193 "borough": "Queens",1194 "evictions": 159,1195 "population": 59129,1196 "medianHouseholdIncome": 574541197 },1198 "11435": {1199 "borough": "Queens",1200 "evictions": 155,1201 "population": 53687,1202 "medianHouseholdIncome": 552681203 },1204 "11436": {1205 "borough": "Queens",1206 "evictions": 45,1207 "population": 17949,1208 "medianHouseholdIncome": 668371209 },1210 "11451": {1211 "borough": "Queens",1212 "evictions": 0,1213 "population": 01214 },1215 "11691": {1216 "borough": "Queens",1217 "evictions": 289,1218 "population": 60035,1219 "medianHouseholdIncome": 411901220 },1221 "11692": {1222 "borough": "Queens",1223 "evictions": 120,1224 "population": 18540,1225 "medianHouseholdIncome": 423331226 },1227 "11693": {1228 "borough": "Queens",1229 "evictions": 33,1230 "population": 11916,1231 "medianHouseholdIncome": 538291232 },1233 "11694": {1234 "borough": "Queens",1235 "evictions": 53,1236 "population": 20408,1237 "medianHouseholdIncome": 791451238 },1239 "11697": {1240 "borough": "Queens",1241 "evictions": 0,1242 "population": 4079,1243 "medianHouseholdIncome": 1009091244 }1245 }1246var activeNeighborhood;1247map.setPaintProperty("ny-zip-codes-dilq1b", "fill-opacity", ["case", ["boolean", ["feature-state", "hover"], false], 1, 0.5]);1248map.on("mousemove", "nta", function (e) {1249 if (e.features.length > 0) {1250 activeNeighborhood = e.features[0].properties.NTAName1251 }1252})1253map.on("mousemove", "ny-zip-codes-dilq1b", function (e) {1254 if (e.features.length > 0) {1255 if (hoveredZip) {1256 var coordinates = [parseFloat(e.features[0].properties.INTPTLON10), parseFloat(e.features[0].properties.INTPTLAT10)];1257 var zipcode = e.features[0].properties.ZCTA5CE10;1258 if (zipCodeStats.hasOwnProperty(zipcode)) {1259 //Do this1260 var zipcodeRecord = zipCodeStats[zipcode];1261 var evictions = zipcodeRecord.evictions;1262 var population = zipcodeRecord.population;1263 var borough = zipcodeRecord.borough;1264 var income = zipcodeRecord.medianHouseholdIncome;1265 var rtcText = zipCodesRTC.includes(zipcode) ? "Zipcode currently eligible for Right To Counsel" : "Zipcode not yet eligible for Right To Counsel"1266 // var neighborhoodText = "Neighborhood: " + neighborhoods.find(x => x.zcta10 === zipcode).nameshort + "<br />";1267 var neighborhoodText = "Neighborhood: " + activeNeighborhood + "<br />";1268 // var neighborhoodsForZip = neighborhoods.find(x => x.zcta10 === zipcode);1269 // var neighborhoodText = "1270 // if (neighborhoodsForZip.length > 0) {1271 // neighborhoodText = "Neighborhoods: " + neighborhoodsForZip.filter(x => parseFloat(x.per_in_puma) > 0.1).map(x => x.nameshort + " (" + (x.per_in_puma * 100).toString() + "%)").join(" ") + "<br />";1272 // }1273 console.log(income);1274 if (income == undefined){1275 console.log("Hello");1276 income = " not avaliable";1277 }1278 var description = "Zip Code: " + zipcode + "<br />"1279 + "Borough: " + borough + "<br />"1280 + neighborhoodText1281 +"Eviction orders in 2017: " + evictions + "<br />"1282 + "Population: " + population.toLocaleString() + "<br />"1283 + "Median Household Income: $" + income.toLocaleString() + "<br />" +1284 rtcText + "<br />"1285 popup.setLngLat(coordinates)1286 .setHTML(description)1287 .addTo(map);1288 }1289 }1290 hoveredZip = e.features[0].properties.ZCTA5CE10;1291 }1292});1293// When the mouse leaves the state-fill layer, update the feature state of the1294// previously hovered feature.1295map.on("mouseleave", "ny-zip-codes-dilq1b", function () {1296 map.getCanvas().style.cursor = '';1297 popup.remove();1298 hoveredZip = null;1299});...

Full Screen

Full Screen

json_writer.js

Source:json_writer.js Github

copy

Full Screen

1var fs = require("fs");2var obj = require('./ny_new_york_zip_codes_geo.min');3var zipCodeStats = {4 "10001": {5 "borough": "Manhattan",6 "evictions": 46,7 "population": 21102,8 "medianHouseholdIncome": 851689 },10 "10002": {11 "borough": "Manhattan",12 "evictions": 77,13 "population": 81410,14 "medianHouseholdIncome": 3559415 },16 "10003": {17 "borough": "Manhattan",18 "evictions": 42,19 "population": 56024,20 "medianHouseholdIncome": 10079121 },22 "10004": {23 "borough": "Manhattan",24 "evictions": 3,25 "population": 3089,26 "medianHouseholdIncome": 12305627 },28 "10005": {29 "borough": "Manhattan",30 "evictions": 14,31 "population": 7135,32 "medianHouseholdIncome": 13011633 },34 "10006": {35 "borough": "Manhattan",36 "evictions": 7,37 "population": 3011,38 "medianHouseholdIncome": 12536439 },40 "10007": {41 "borough": "Manhattan",42 "evictions": 5,43 "population": 6988,44 "medianHouseholdIncome": 23495845 },46 "10009": {47 "borough": "Manhattan",48 "evictions": 102,49 "population": 61347,50 "medianHouseholdIncome": 6078851 },52 "10010": {53 "borough": "Manhattan",54 "evictions": 23,55 "population": 31834,56 "medianHouseholdIncome": 11014257 },58 "10011": {59 "borough": "Manhattan",60 "evictions": 43,61 "population": 50984,62 "medianHouseholdIncome": 11413463 },64 "10012": {65 "borough": "Manhattan",66 "evictions": 25,67 "population": 24090,68 "medianHouseholdIncome": 10181569 },70 "10013": {71 "borough": "Manhattan",72 "evictions": 24,73 "population": 27700,74 "medianHouseholdIncome": 10416775 },76 "10014": {77 "borough": "Manhattan",78 "evictions": 29,79 "population": 31959,80 "medianHouseholdIncome": 11902681 },82 "10016": {83 "borough": "Manhattan",84 "evictions": 54,85 "population": 54183,86 "medianHouseholdIncome": 10270387 },88 "10017": {89 "borough": "Manhattan",90 "evictions": 23,91 "population": 16575,92 "medianHouseholdIncome": 10679593 },94 "10018": {95 "borough": "Manhattan",96 "evictions": 11,97 "population": 5229,98 "medianHouseholdIncome": 10547999 },100 "10019": {101 "borough": "Manhattan",102 "evictions": 95,103 "population": 42870,104 "medianHouseholdIncome": 94477105 },106 "10020": {107 "borough": "Manhattan",108 "evictions": 0,109 "population": 0110 },111 "10021": {112 "borough": "Manhattan",113 "evictions": 40,114 "population": 43631,115 "medianHouseholdIncome": 115681116 },117 "10022": {118 "borough": "Manhattan",119 "evictions": 33,120 "population": 31924,121 "medianHouseholdIncome": 123693122 },123 "10023": {124 "borough": "Manhattan",125 "evictions": 37,126 "population": 60998,127 "medianHouseholdIncome": 115080128 },129 "10024": {130 "borough": "Manhattan",131 "evictions": 32,132 "population": 59283,133 "medianHouseholdIncome": 118594134 },135 "10025": {136 "borough": "Manhattan",137 "evictions": 115,138 "population": 94600,139 "medianHouseholdIncome": 80025140 },141 "10026": {142 "borough": "Manhattan",143 "evictions": 104,144 "population": 34003,145 "medianHouseholdIncome": 52082146 },147 "10027": {148 "borough": "Manhattan",149 "evictions": 129,150 "population": 59707,151 "medianHouseholdIncome": 42754152 },153 "10028": {154 "borough": "Manhattan",155 "evictions": 36,156 "population": 45141,157 "medianHouseholdIncome": 111302158 },159 "10029": {160 "borough": "Manhattan",161 "evictions": 175,162 "population": 76003,163 "medianHouseholdIncome": 32500164 },165 "10030": {166 "borough": "Manhattan",167 "evictions": 129,168 "population": 26999,169 "medianHouseholdIncome": 33720170 },171 "10031": {172 "borough": "Manhattan",173 "evictions": 189,174 "population": 56438,175 "medianHouseholdIncome": 41848176 },177 "10032": {178 "borough": "Manhattan",179 "evictions": 167,180 "population": 57331,181 "medianHouseholdIncome": 40054182 },183 "10033": {184 "borough": "Manhattan",185 "evictions": 154,186 "population": 53926,187 "medianHouseholdIncome": 46349188 },189 "10034": {190 "borough": "Manhattan",191 "evictions": 112,192 "population": 38908,193 "medianHouseholdIncome": 45643194 },195 "10035": {196 "borough": "Manhattan",197 "evictions": 139,198 "population": 33969,199 "medianHouseholdIncome": 26893200 },201 "10036": {202 "borough": "Manhattan",203 "evictions": 93,204 "population": 24711,205 "medianHouseholdIncome": 83812206 },207 "10037": {208 "borough": "Manhattan",209 "evictions": 121,210 "population": 17416,211 "medianHouseholdIncome": 39463212 },213 "10038": {214 "borough": "Manhattan",215 "evictions": 20,216 "population": 20300,217 "medianHouseholdIncome": 82910218 },219 "10039": {220 "borough": "Manhattan",221 "evictions": 120,222 "population": 24527,223 "medianHouseholdIncome": 32257224 },225 "10040": {226 "borough": "Manhattan",227 "evictions": 113,228 "population": 41905,229 "medianHouseholdIncome": 45811230 },231 "10044": {232 "borough": "Manhattan",233 "evictions": 15,234 "population": 11661,235 "medianHouseholdIncome": 86483236 },237 "10065": {238 "borough": "Manhattan",239 "evictions": 35,240 "population": 32270,241 "medianHouseholdIncome": 118310242 },243 "10069": {244 "borough": "Manhattan",245 "evictions": 7,246 "population": 5199,247 "medianHouseholdIncome": 155702248 },249 "10075": {250 "borough": "Manhattan",251 "evictions": 9,252 "population": 26121,253 "medianHouseholdIncome": 114481254 },255 "10103": {256 "borough": "Manhattan",257 "evictions": 0,258 "population": 3259 },260 "10110": {261 "borough": "Manhattan",262 "evictions": 0,263 "population": 0264 },265 "10111": {266 "borough": "Manhattan",267 "evictions": 0,268 "population": 0269 },270 "10112": {271 "borough": "Manhattan",272 "evictions": 0,273 "population": 0274 },275 "10115": {276 "borough": "Manhattan",277 "evictions": 0,278 "population": 0279 },280 "10119": {281 "borough": "Manhattan",282 "evictions": 0,283 "population": 92284 },285 "10128": {286 "borough": "Manhattan",287 "evictions": 57,288 "population": 60453,289 "medianHouseholdIncome": 103817290 },291 "10152": {292 "borough": "Manhattan",293 "evictions": 0,294 "population": 0295 },296 "10153": {297 "borough": "Manhattan",298 "evictions": 0,299 "population": 0300 },301 "10154": {302 "borough": "Manhattan",303 "evictions": 0,304 "population": 0305 },306 "10162": {307 "borough": "Manhattan",308 "evictions": 0,309 "population": 1685,310 "medianHouseholdIncome": 178822311 },312 "10165": {313 "borough": "Manhattan",314 "evictions": 0,315 "population": 2316 },317 "10167": {318 "borough": "Manhattan",319 "evictions": 0,320 "population": 0321 },322 "10168": {323 "borough": "Manhattan",324 "evictions": 0,325 "population": 0326 },327 "10169": {328 "borough": "Manhattan",329 "evictions": 0,330 "population": 0331 },332 "10170": {333 "borough": "Manhattan",334 "evictions": 0,335 "population": 2336 },337 "10171": {338 "borough": "Manhattan",339 "evictions": 0,340 "population": 0341 },342 "10172": {343 "borough": "Manhattan",344 "evictions": 0,345 "population": 0346 },347 "10173": {348 "borough": "Manhattan",349 "evictions": 0,350 "population": 2351 },352 "10174": {353 "borough": "Manhattan",354 "evictions": 0,355 "population": 0356 },357 "10177": {358 "borough": "Manhattan",359 "evictions": 0,360 "population": 0361 },362 "10199": {363 "borough": "Manhattan",364 "evictions": 0,365 "population": 9366 },367 "10271": {368 "borough": "Manhattan",369 "evictions": 0,370 "population": 0371 },372 "10278": {373 "borough": "Manhattan",374 "evictions": 0,375 "population": 0376 },377 "10279": {378 "borough": "Manhattan",379 "evictions": 0,380 "population": 0381 },382 "10280": {383 "borough": "Manhattan",384 "evictions": 9,385 "population": 7853,386 "medianHouseholdIncome": 146875387 },388 "10301": {389 "borough": "Staten Island",390 "evictions": 121,391 "population": 39706,392 "medianHouseholdIncome": 55700393 },394 "10302": {395 "borough": "Staten Island",396 "evictions": 36,397 "population": 19088,398 "medianHouseholdIncome": 55864399 },400 "10303": {401 "borough": "Staten Island",402 "evictions": 86,403 "population": 26337,404 "medianHouseholdIncome": 55198405 },406 "10304": {407 "borough": "Staten Island",408 "evictions": 131,409 "population": 42193,410 "medianHouseholdIncome": 53843411 },412 "10305": {413 "borough": "Staten Island",414 "evictions": 58,415 "population": 41749,416 "medianHouseholdIncome": 74063417 },418 "10306": {419 "borough": "Staten Island",420 "evictions": 57,421 "population": 55909,422 "medianHouseholdIncome": 78745423 },424 "10307": {425 "borough": "Staten Island",426 "evictions": 9,427 "population": 14096,428 "medianHouseholdIncome": 77278429 },430 "10308": {431 "borough": "Staten Island",432 "evictions": 13,433 "population": 27357,434 "medianHouseholdIncome": 87493435 },436 "10309": {437 "borough": "Staten Island",438 "evictions": 21,439 "population": 32519,440 "medianHouseholdIncome": 93248441 },442 "10310": {443 "borough": "Staten Island",444 "evictions": 63,445 "population": 24962,446 "medianHouseholdIncome": 69201447 },448 "10311": {449 "borough": "Staten Island",450 "evictions": 0,451 "population": 0452 },453 "10312": {454 "borough": "Staten Island",455 "evictions": 30,456 "population": 59304,457 "medianHouseholdIncome": 88567458 },459 "10314": {460 "borough": "Staten Island",461 "evictions": 67,462 "population": 85510,463 "medianHouseholdIncome": 77761464 },465 "10451": {466 "borough": "Bronx",467 "evictions": 264,468 "population": 45713,469 "medianHouseholdIncome": 26419470 },471 "10452": {472 "borough": "Bronx",473 "evictions": 433,474 "population": 75371,475 "medianHouseholdIncome": 25771476 },477 "10453": {478 "borough": "Bronx",479 "evictions": 579,480 "population": 78309,481 "medianHouseholdIncome": 22914482 },483 "10454": {484 "borough": "Bronx",485 "evictions": 142,486 "population": 37337,487 "medianHouseholdIncome": 21553488 },489 "10455": {490 "borough": "Bronx",491 "evictions": 220,492 "population": 39665,493 "medianHouseholdIncome": 23962494 },495 "10456": {496 "borough": "Bronx",497 "evictions": 536,498 "population": 86547,499 "medianHouseholdIncome": 25868500 },501 "10457": {502 "borough": "Bronx",503 "evictions": 526,504 "population": 70496,505 "medianHouseholdIncome": 25967506 },507 "10458": {508 "borough": "Bronx",509 "evictions": 669,510 "population": 79492,511 "medianHouseholdIncome": 30339512 },513 "10459": {514 "borough": "Bronx",515 "evictions": 335,516 "population": 47308,517 "medianHouseholdIncome": 24805518 },519 "10460": {520 "borough": "Bronx",521 "evictions": 470,522 "population": 57311,523 "medianHouseholdIncome": 24086524 },525 "10461": {526 "borough": "Bronx",527 "evictions": 128,528 "population": 50502,529 "medianHouseholdIncome": 55332530 },531 "10462": {532 "borough": "Bronx",533 "evictions": 336,534 "population": 75784,535 "medianHouseholdIncome": 48315536 },537 "10463": {538 "borough": "Bronx",539 "evictions": 205,540 "population": 67970,541 "medianHouseholdIncome": 56568542 },543 "10464": {544 "borough": "Bronx",545 "evictions": 12,546 "population": 4534,547 "medianHouseholdIncome": 76917548 },549 "10465": {550 "borough": "Bronx",551 "evictions": 51,552 "population": 42230,553 "medianHouseholdIncome": 73068554 },555 "10466": {556 "borough": "Bronx",557 "evictions": 362,558 "population": 67813,559 "medianHouseholdIncome": 44354560 },561 "10467": {562 "borough": "Bronx",563 "evictions": 615,564 "population": 97060,565 "medianHouseholdIncome": 34964566 },567 "10468": {568 "borough": "Bronx",569 "evictions": 532,570 "population": 76103,571 "medianHouseholdIncome": 34988572 },573 "10469": {574 "borough": "Bronx",575 "evictions": 207,576 "population": 66631,577 "medianHouseholdIncome": 57124578 },579 "10470": {580 "borough": "Bronx",581 "evictions": 86,582 "population": 15293,583 "medianHouseholdIncome": 58839584 },585 "10471": {586 "borough": "Bronx",587 "evictions": 46,588 "population": 22922,589 "medianHouseholdIncome": 81594590 },591 "10472": {592 "borough": "Bronx",593 "evictions": 329,594 "population": 66358,595 "medianHouseholdIncome": 29934596 },597 "10473": {598 "borough": "Bronx",599 "evictions": 173,600 "population": 58519,601 "medianHouseholdIncome": 36686602 },603 "10474": {604 "borough": "Bronx",605 "evictions": 79,606 "population": 12281,607 "medianHouseholdIncome": 26901608 },609 "10475": {610 "borough": "Bronx",611 "evictions": 81,612 "population": 40931,613 "medianHouseholdIncome": 46340614 },615 "11004": {616 "borough": "Queens",617 "evictions": 6,618 "population": 14016,619 "medianHouseholdIncome": 91226620 },621 "11005": {622 "borough": "Queens",623 "evictions": 0,624 "population": 1806,625 "medianHouseholdIncome": 63368626 },627 "11101": {628 "borough": "Queens",629 "evictions": 53,630 "population": 25484,631 "medianHouseholdIncome": 51964632 },633 "11102": {634 "borough": "Queens",635 "evictions": 44,636 "population": 34133,637 "medianHouseholdIncome": 56674638 },639 "11103": {640 "borough": "Queens",641 "evictions": 52,642 "population": 38780,643 "medianHouseholdIncome": 62775644 },645 "11104": {646 "borough": "Queens",647 "evictions": 42,648 "population": 27232,649 "medianHouseholdIncome": 57155650 },651 "11105": {652 "borough": "Queens",653 "evictions": 44,654 "population": 36688,655 "medianHouseholdIncome": 62841656 },657 "11106": {658 "borough": "Queens",659 "evictions": 53,660 "population": 38875,661 "medianHouseholdIncome": 56442662 },663 "11109": {664 "borough": "Queens",665 "evictions": 10,666 "population": 3523,667 "medianHouseholdIncome": 133070668 },669 "11201": {670 "borough": "Brooklyn",671 "evictions": 56,672 "population": 51128,673 "medianHouseholdIncome": 109472674 },675 "11203": {676 "borough": "Brooklyn",677 "evictions": 317,678 "population": 76174,679 "medianHouseholdIncome": 46971680 },681 "11204": {682 "borough": "Brooklyn",683 "evictions": 69,684 "population": 78134,685 "medianHouseholdIncome": 47135686 },687 "11205": {688 "borough": "Brooklyn",689 "evictions": 79,690 "population": 40366,691 "medianHouseholdIncome": 47437692 },693 "11206": {694 "borough": "Brooklyn",695 "evictions": 135,696 "population": 81677,697 "medianHouseholdIncome": 31549698 },699 "11207": {700 "borough": "Brooklyn",701 "evictions": 406,702 "population": 93386,703 "medianHouseholdIncome": 35849704 },705 "11208": {706 "borough": "Brooklyn",707 "evictions": 417,708 "population": 94469,709 "medianHouseholdIncome": 37640710 },711 "11209": {712 "borough": "Brooklyn",713 "evictions": 112,714 "population": 68853,715 "medianHouseholdIncome": 65181716 },717 "11210": {718 "borough": "Brooklyn",719 "evictions": 217,720 "population": 62008,721 "medianHouseholdIncome": 59520722 },723 "11211": {724 "borough": "Brooklyn",725 "evictions": 56,726 "population": 90117,727 "medianHouseholdIncome": 59190728 },729 "11212": {730 "borough": "Brooklyn",731 "evictions": 468,732 "population": 84500,733 "medianHouseholdIncome": 28495734 },735 "11213": {736 "borough": "Brooklyn",737 "evictions": 290,738 "population": 63767,739 "medianHouseholdIncome": 37556740 },741 "11214": {742 "borough": "Brooklyn",743 "evictions": 111,744 "population": 88630,745 "medianHouseholdIncome": 52119746 },747 "11215": {748 "borough": "Brooklyn",749 "evictions": 16,750 "population": 63488,751 "medianHouseholdIncome": 108178752 },753 "11216": {754 "borough": "Brooklyn",755 "evictions": 162,756 "population": 54316,757 "medianHouseholdIncome": 52239758 },759 "11217": {760 "borough": "Brooklyn",761 "evictions": 36,762 "population": 35881,763 "medianHouseholdIncome": 94970764 },765 "11218": {766 "borough": "Brooklyn",767 "evictions": 82,768 "population": 75220,769 "medianHouseholdIncome": 60821770 },771 "11219": {772 "borough": "Brooklyn",773 "evictions": 59,774 "population": 92221,775 "medianHouseholdIncome": 36573776 },777 "11220": {778 "borough": "Brooklyn",779 "evictions": 88,780 "population": 99598,781 "medianHouseholdIncome": 40576782 },783 "11221": {784 "borough": "Brooklyn",785 "evictions": 284,786 "population": 78895,787 "medianHouseholdIncome": 43361788 },789 "11222": {790 "borough": "Brooklyn",791 "evictions": 37,792 "population": 36934,793 "medianHouseholdIncome": 73391794 },795 "11223": {796 "borough": "Brooklyn",797 "evictions": 87,798 "population": 78731,799 "medianHouseholdIncome": 44647800 },801 "11224": {802 "borough": "Brooklyn",803 "evictions": 107,804 "population": 47621,805 "medianHouseholdIncome": 31371806 },807 "11225": {808 "borough": "Brooklyn",809 "evictions": 223,810 "population": 56829,811 "medianHouseholdIncome": 48597812 },813 "11226": {814 "borough": "Brooklyn",815 "evictions": 487,816 "population": 101572,817 "medianHouseholdIncome": 45031818 },819 "11228": {820 "borough": "Brooklyn",821 "evictions": 33,822 "population": 41788,823 "medianHouseholdIncome": 63641824 },825 "11229": {826 "borough": "Brooklyn",827 "evictions": 90,828 "population": 80018,829 "medianHouseholdIncome": 55187830 },831 "11230": {832 "borough": "Brooklyn",833 "evictions": 122,834 "population": 86408,835 "medianHouseholdIncome": 43344836 },837 "11231": {838 "borough": "Brooklyn",839 "evictions": 29,840 "population": 33336,841 "medianHouseholdIncome": 84223842 },843 "11232": {844 "borough": "Brooklyn",845 "evictions": 31,846 "population": 28265,847 "medianHouseholdIncome": 47785848 },849 "11233": {850 "borough": "Brooklyn",851 "evictions": 368,852 "population": 67053,853 "medianHouseholdIncome": 35686854 },855 "11234": {856 "borough": "Brooklyn",857 "evictions": 139,858 "population": 87757,859 "medianHouseholdIncome": 75362860 },861 "11235": {862 "borough": "Brooklyn",863 "evictions": 132,864 "population": 79132,865 "medianHouseholdIncome": 45578866 },867 "11236": {868 "borough": "Brooklyn",869 "evictions": 251,870 "population": 93877,871 "medianHouseholdIncome": 60885872 },873 "11237": {874 "borough": "Brooklyn",875 "evictions": 77,876 "population": 49896,877 "medianHouseholdIncome": 46351878 },879 "11238": {880 "borough": "Brooklyn",881 "evictions": 102,882 "population": 49262,883 "medianHouseholdIncome": 75757884 },885 "11239": {886 "borough": "Brooklyn",887 "evictions": 88,888 "population": 13393,889 "medianHouseholdIncome": 24610890 },891 "11351": {892 "borough": "Queens",893 "evictions": 0,894 "population": 0895 },896 "11354": {897 "borough": "Queens",898 "evictions": 63,899 "population": 54878,900 "medianHouseholdIncome": 43660901 },902 "11355": {903 "borough": "Queens",904 "evictions": 91,905 "population": 85871,906 "medianHouseholdIncome": 38451907 },908 "11356": {909 "borough": "Queens",910 "evictions": 57,911 "population": 23438,912 "medianHouseholdIncome": 57849913 },914 "11357": {915 "borough": "Queens",916 "evictions": 19,917 "population": 39150,918 "medianHouseholdIncome": 74255919 },920 "11358": {921 "borough": "Queens",922 "evictions": 22,923 "population": 37546,924 "medianHouseholdIncome": 66173925 },926 "11359": {927 "borough": "Queens",928 "evictions": 2,929 "population": 0930 },931 "11360": {932 "borough": "Queens",933 "evictions": 14,934 "population": 18884,935 "medianHouseholdIncome": 82982936 },937 "11361": {938 "borough": "Queens",939 "evictions": 23,940 "population": 28606,941 "medianHouseholdIncome": 81846942 },943 "11362": {944 "borough": "Queens",945 "evictions": 6,946 "population": 17823,947 "medianHouseholdIncome": 82827948 },949 "11363": {950 "borough": "Queens",951 "evictions": 3,952 "population": 6988,953 "medianHouseholdIncome": 90443954 },955 "11364": {956 "borough": "Queens",957 "evictions": 16,958 "population": 34555,959 "medianHouseholdIncome": 70408960 },961 "11365": {962 "borough": "Queens",963 "evictions": 65,964 "population": 42252,965 "medianHouseholdIncome": 62509966 },967 "11366": {968 "borough": "Queens",969 "evictions": 8,970 "population": 13532,971 "medianHouseholdIncome": 78223972 },973 "11367": {974 "borough": "Queens",975 "evictions": 74,976 "population": 41047,977 "medianHouseholdIncome": 57310978 },979 "11368": {980 "borough": "Queens",981 "evictions": 231,982 "population": 109931,983 "medianHouseholdIncome": 45980984 },985 "11369": {986 "borough": "Queens",987 "evictions": 38,988 "population": 38615,989 "medianHouseholdIncome": 51864990 },991 "11370": {992 "borough": "Queens",993 "evictions": 27,994 "population": 39688,995 "medianHouseholdIncome": 53293996 },997 "11371": {998 "borough": "Queens",999 "evictions": 0,1000 "population": 01001 },1002 "11372": {1003 "borough": "Queens",1004 "evictions": 124,1005 "population": 66636,1006 "medianHouseholdIncome": 527921007 },1008 "11373": {1009 "borough": "Queens",1010 "evictions": 123,1011 "population": 100820,1012 "medianHouseholdIncome": 456771013 },1014 "11374": {1015 "borough": "Queens",1016 "evictions": 68,1017 "population": 43600,1018 "medianHouseholdIncome": 555501019 },1020 "11375": {1021 "borough": "Queens",1022 "evictions": 67,1023 "population": 68733,1024 "medianHouseholdIncome": 729821025 },1026 "11377": {1027 "borough": "Queens",1028 "evictions": 88,1029 "population": 89830,1030 "medianHouseholdIncome": 516751031 },1032 "11378": {1033 "borough": "Queens",1034 "evictions": 47,1035 "population": 34981,1036 "medianHouseholdIncome": 616311037 },1038 "11379": {1039 "borough": "Queens",1040 "evictions": 28,1041 "population": 34821,1042 "medianHouseholdIncome": 753201043 },1044 "11385": {1045 "borough": "Queens",1046 "evictions": 193,1047 "population": 98592,1048 "medianHouseholdIncome": 605261049 },1050 "11411": {1051 "borough": "Queens",1052 "evictions": 21,1053 "population": 18556,1054 "medianHouseholdIncome": 816781055 },1056 "11412": {1057 "borough": "Queens",1058 "evictions": 82,1059 "population": 34882,1060 "medianHouseholdIncome": 719951061 },1062 "11413": {1063 "borough": "Queens",1064 "evictions": 101,1065 "population": 38912,1066 "medianHouseholdIncome": 807581067 },1068 "11414": {1069 "borough": "Queens",1070 "evictions": 28,1071 "population": 26148,1072 "medianHouseholdIncome": 704901073 },1074 "11415": {1075 "borough": "Queens",1076 "evictions": 45,1077 "population": 19341,1078 "medianHouseholdIncome": 640551079 },1080 "11416": {1081 "borough": "Queens",1082 "evictions": 57,1083 "population": 24861,1084 "medianHouseholdIncome": 590921085 },1086 "11417": {1087 "borough": "Queens",1088 "evictions": 39,1089 "population": 28967,1090 "medianHouseholdIncome": 669781091 },1092 "11418": {1093 "borough": "Queens",1094 "evictions": 79,1095 "population": 36256,1096 "medianHouseholdIncome": 630791097 },1098 "11419": {1099 "borough": "Queens",1100 "evictions": 74,1101 "population": 47211,1102 "medianHouseholdIncome": 620141103 },1104 "11420": {1105 "borough": "Queens",1106 "evictions": 87,1107 "population": 44354,1108 "medianHouseholdIncome": 614841109 },1110 "11421": {1111 "borough": "Queens",1112 "evictions": 56,1113 "population": 39127,1114 "medianHouseholdIncome": 645441115 },1116 "11422": {1117 "borough": "Queens",1118 "evictions": 74,1119 "population": 30425,1120 "medianHouseholdIncome": 854361121 },1122 "11423": {1123 "borough": "Queens",1124 "evictions": 79,1125 "population": 29987,1126 "medianHouseholdIncome": 660701127 },1128 "11424": {1129 "borough": "Queens",1130 "evictions": 0,1131 "population": 01132 },1133 "11425": {1134 "borough": "Brooklyn",1135 "evictions": 0,1136 "population": 01137 },1138 "11426": {1139 "borough": "Queens",1140 "evictions": 12,1141 "population": 17590,1142 "medianHouseholdIncome": 774871143 },1144 "11427": {1145 "borough": "Queens",1146 "evictions": 40,1147 "population": 23593,1148 "medianHouseholdIncome": 654941149 },1150 "11428": {1151 "borough": "Queens",1152 "evictions": 42,1153 "population": 19168,1154 "medianHouseholdIncome": 686751155 },1156 "11429": {1157 "borough": "Queens",1158 "evictions": 55,1159 "population": 25105,1160 "medianHouseholdIncome": 770371161 },1162 "11430": {1163 "borough": "Queens",1164 "evictions": 0,1165 "population": 1841166 },1167 "11432": {1168 "borough": "Queens",1169 "evictions": 171,1170 "population": 60809,1171 "medianHouseholdIncome": 522771172 },1173 "11433": {1174 "borough": "Queens",1175 "evictions": 157,1176 "population": 32687,1177 "medianHouseholdIncome": 458201178 },1179 "11434": {1180 "borough": "Queens",1181 "evictions": 159,1182 "population": 59129,1183 "medianHouseholdIncome": 574541184 },1185 "11435": {1186 "borough": "Queens",1187 "evictions": 155,1188 "population": 53687,1189 "medianHouseholdIncome": 552681190 },1191 "11436": {1192 "borough": "Queens",1193 "evictions": 45,1194 "population": 17949,1195 "medianHouseholdIncome": 668371196 },1197 "11451": {1198 "borough": "Queens",1199 "evictions": 0,1200 "population": 01201 },1202 "11691": {1203 "borough": "Queens",1204 "evictions": 289,1205 "population": 60035,1206 "medianHouseholdIncome": 411901207 },1208 "11692": {1209 "borough": "Queens",1210 "evictions": 120,1211 "population": 18540,1212 "medianHouseholdIncome": 423331213 },1214 "11693": {1215 "borough": "Queens",1216 "evictions": 33,1217 "population": 11916,1218 "medianHouseholdIncome": 538291219 },1220 "11694": {1221 "borough": "Queens",1222 "evictions": 53,1223 "population": 20408,1224 "medianHouseholdIncome": 791451225 },1226 "11697": {1227 "borough": "Queens",1228 "evictions": 0,1229 "population": 4079,1230 "medianHouseholdIncome": 1009091231 }1232}1233var zipCodeList = Object.keys(zipCodeStats);1234var filteredZips = obj["features"].filter(x => zipCodeList.includes(x.properties.ZCTA5CE10));1235obj["features"] = filteredZips;1236fs.writeFile("./ny_zip_codes.json", JSON.stringify(obj), (err) => {1237 if (err) {1238 console.error(err);1239 return;1240 };1241 console.log("File has been created");1242});1243var zipCodesRTC = [11216, 11221, 11225, 10457, 10467, 10468, 10026, 10025, 10027, 11433, 11434, 11373, 10302, 10303, 10314].map(x => x.toString());1244var filteredZips = obj["features"].filter(x => zipCodesRTC.includes(x.properties.ZCTA5CE10));1245obj["features"] = filteredZips;1246fs.writeFile("./ny_zip_codes_rtc.json", JSON.stringify(obj), (err) => {1247 if (err) {1248 console.error(err);1249 return;1250 };1251 console.log("File has been created");...

Full Screen

Full Screen

groupby.py

Source:groupby.py Github

copy

Full Screen

12#https://zhuanlan.zhihu.com/p/365830023#先跑一轮,把特征固化到硬盘内。第二轮只是读取硬盘里的特征数据,做特征拼接来减少内存的消耗。4#这个特征可以引入DataSupport里面最为一个卖点5GROUPBY_AGGREGATIONS = [6 {'groupby': ["ip"], 'select': 'app', 'agg': 'nunique'}, 7 {'groupby': ["ip"], 'select': 'app', 'agg': 'count'}, 8 ] 910def get_global_feature(feature):11 print ("get global feat")12 data = pd.concat([get_basic_data(day=8),get_basic_data(day=9),get_basic_data(day=10)])13 for spec in tqdm(GROUPBY_AGGREGATIONS):14 new_feature = '{}_{}_{}'.format('_'.join(spec['groupby']), spec['agg'], spec['select'])15 result_path = cache_path + new_feature + '%s.hdf'%(data.shape[0])16 if os.path.exists(result_path):17 result = pd.read_hdf(result_path, 'w')18 result[new_feature] = result[new_feature].astype("float32")19 else: 20 print("Grouping by {}, and aggregating {} with {}".format(spec['groupby'], spec['select'], agg_name))21 all_features = list(set(spec['groupby'] + [spec['select']]))22 result = data[all_features].groupby(spec['groupby'],as_index=False)[spec['select']].agg({new_feature:spec['agg']})23 result[new_feature] = result[new_feature].astype("float32")24 result.to_hdf(result_path, 'w', complib='blosc', complevel=5) 25 feature = feature.merge(result, on=spec['groupby'], how='left',copy=False)26 return feature 27282930# Define all the groupby transformations31GROUPBY_AGGREGATIONS = [32 33 # V1 - GroupBy Features #34 ######################### 35 # Variance in day, for ip-app-channel36 {'groupby': ['ip','app','channel'], 'select': 'day', 'agg': 'var'},37 # Variance in hour, for ip-app-os38 {'groupby': ['ip','app','os'], 'select': 'hour', 'agg': 'var'},39 # Variance in hour, for ip-day-channel40 {'groupby': ['ip','day','channel'], 'select': 'hour', 'agg': 'var'},41 # Count, for ip-day-hour42 {'groupby': ['ip','day','hour'], 'select': 'channel', 'agg': 'count'},43 # Count, for ip-app44 {'groupby': ['ip', 'app'], 'select': 'channel', 'agg': 'count'}, 45 # Count, for ip-app-os46 {'groupby': ['ip', 'app', 'os'], 'select': 'channel', 'agg': 'count'},47 # Count, for ip-app-day-hour48 {'groupby': ['ip','app','day','hour'], 'select': 'channel', 'agg': 'count'},49 # Mean hour, for ip-app-channel50 {'groupby': ['ip','app','channel'], 'select': 'hour', 'agg': 'mean'}, 51 52 # V2 - GroupBy Features #53 #########################54 # Average clicks on app by distinct users; is it an app they return to?55 {'groupby': ['app'], 56 'select': 'ip', 57 'agg': lambda x: float(len(x)) / len(x.unique()), 58 'agg_name': 'AvgViewPerDistinct'59 },60 # How popular is the app or channel?61 {'groupby': ['app'], 'select': 'channel', 'agg': 'count'},62 {'groupby': ['channel'], 'select': 'app', 'agg': 'count'},63 64 # V3 - GroupBy Features #65 # https://www.kaggle.com/bk0000/non-blending-lightgbm-model-lb-0-977 #66 ###################################################################### 67 {'groupby': ['ip'], 'select': 'channel', 'agg': 'nunique'}, 68 {'groupby': ['ip'], 'select': 'app', 'agg': 'nunique'}, 69 {'groupby': ['ip','day'], 'select': 'hour', 'agg': 'nunique'}, 70 {'groupby': ['ip','app'], 'select': 'os', 'agg': 'nunique'}, 71 {'groupby': ['ip'], 'select': 'device', 'agg': 'nunique'}, 72 {'groupby': ['app'], 'select': 'channel', 'agg': 'nunique'}, 73 {'groupby': ['ip', 'device', 'os'], 'select': 'app', 'agg': 'nunique'}, 74 {'groupby': ['ip','device','os'], 'select': 'app', 'agg': 'cumcount'}, 75 {'groupby': ['ip'], 'select': 'app', 'agg': 'cumcount'}, 76 {'groupby': ['ip'], 'select': 'os', 'agg': 'cumcount'}, 77 {'groupby': ['ip','day','channel'], 'select': 'hour', 'agg': 'var'} 78]7980# Apply all the groupby transformations81for spec in GROUPBY_AGGREGATIONS:82 83 # Name of the aggregation we're applying84 agg_name = spec['agg_name'] if 'agg_name' in spec else spec['agg']85 86 # Name of new feature87 new_feature = '{}_{}_{}'.format('_'.join(spec['groupby']), agg_name, spec['select'])88 89 # Info90 print("Grouping by {}, and aggregating {} with {}".format(91 spec['groupby'], spec['select'], agg_name92 ))93 94 # Unique list of features to select95 all_features = list(set(spec['groupby'] + [spec['select']]))96 97 # Perform the groupby98 gp = X_train[all_features]. \99 groupby(spec['groupby'])[spec['select']]. \100 agg(spec['agg']). \101 reset_index(). \102 rename(index=str, columns={spec['select']: new_feature})103 104 # Merge back to X_total105 if 'cumcount' == spec['agg']:106 X_train[new_feature] = gp[0].values107 else:108 X_train = X_train.merge(gp, on=spec['groupby'], how='left')109 110 # Clear memory111 del gp112 gc.collect()113114X_train.head()115#############################################################################116 NEW_AGGREGATION_RECIPIES = [117 (["CODE_GENDER",118 "NAME_EDUCATION_TYPE"], [("AMT_ANNUITY", "max"),119 ("AMT_CREDIT", "max"),120 ("EXT_SOURCE_1", "median"),121 ("EXT_SOURCE_2", "median"),122 ("OWN_CAR_AGE", "max"),123 ("OWN_CAR_AGE", "sum"),124 ("NEW_CREDIT_TO_ANNUITY_RATIO", "median"),125 ("NEW_SOURCES_MEAN", "median"),126 ("NEW_CREDIT_TO_GOODS_RATIO", "median"),127 ("NEW_SOURCES_PROD", "median"),128 ("NEW_CAR_TO_EMPLOY_RATIO", "median"),129 ("NEW_PHONE_TO_BIRTH_RATIO", "median"),130 ("NEW_SOURCES_STD", "median"),131 ("NEW_ANNUITY_TO_INCOME_RATIO", "median"),132 ("NEW_EMPLOY_TO_BIRTH_RATIO", "median"),133 ("NEW_PHONE_TO_EMPLOY_RATIO", "median")]),134135 (["CODE_GENDER",136 "ORGANIZATION_TYPE"], [("AMT_ANNUITY", "median"),137 ("AMT_INCOME_TOTAL", "median"),138 ("DAYS_REGISTRATION", "median"),139 ("EXT_SOURCE_1", "median"),140 ("NEW_CREDIT_TO_ANNUITY_RATIO", "median"),141 ("NEW_SOURCES_MEAN", "median"),142 ("NEW_CREDIT_TO_GOODS_RATIO", "median"),143 ("NEW_SOURCES_PROD", "median"),144 ("NEW_CAR_TO_EMPLOY_RATIO", "median"),145 ("NEW_PHONE_TO_BIRTH_RATIO", "median"),146 ("NEW_SOURCES_STD", "median"),147 ("NEW_ANNUITY_TO_INCOME_RATIO", "median"),148 ("NEW_EMPLOY_TO_BIRTH_RATIO", "median"),149 ("NEW_PHONE_TO_EMPLOY_RATIO", "median")]),150151 (["CODE_GENDER",152 "REG_CITY_NOT_WORK_CITY"], [("AMT_ANNUITY", "median"),153 ("CNT_CHILDREN", "median"),154 ("DAYS_ID_PUBLISH", "median"),155 ("NEW_CREDIT_TO_ANNUITY_RATIO", "median"),156 ("NEW_SOURCES_MEAN", "median"),157 ("NEW_CREDIT_TO_GOODS_RATIO", "median"),158 ("NEW_SOURCES_PROD", "median"),159 ("NEW_CAR_TO_EMPLOY_RATIO", "median"),160 ("NEW_PHONE_TO_BIRTH_RATIO", "median"),161 ("NEW_SOURCES_STD", "median"),162 ("NEW_ANNUITY_TO_INCOME_RATIO", "median"),163 ("NEW_EMPLOY_TO_BIRTH_RATIO", "median"),164 ("NEW_PHONE_TO_EMPLOY_RATIO", "median")]),165166 (["CODE_GENDER",167 "NAME_EDUCATION_TYPE",168 "OCCUPATION_TYPE",169 "REG_CITY_NOT_WORK_CITY"], [("EXT_SOURCE_1", "median"),170 ("EXT_SOURCE_2", "median"),171 ("NEW_CREDIT_TO_ANNUITY_RATIO", "median"),172 ("NEW_SOURCES_MEAN", "median"),173 ("NEW_CREDIT_TO_GOODS_RATIO", "median"),174 ("NEW_SOURCES_PROD", "median"),175 ("NEW_CAR_TO_EMPLOY_RATIO", "median"),176 ("NEW_PHONE_TO_BIRTH_RATIO", "median"),177 ("NEW_SOURCES_STD", "median"),178 ("NEW_ANNUITY_TO_INCOME_RATIO", "median"),179 ("NEW_EMPLOY_TO_BIRTH_RATIO", "median"),180 ("NEW_PHONE_TO_EMPLOY_RATIO", "median")]),181 (["NAME_EDUCATION_TYPE",182 "OCCUPATION_TYPE"], [("AMT_CREDIT", "median"),183 ("AMT_REQ_CREDIT_BUREAU_YEAR", "median"),184 ("APARTMENTS_AVG", "median"),185 ("BASEMENTAREA_AVG", "median"),186 ("EXT_SOURCE_1", "median"),187 ("EXT_SOURCE_2", "median"),188 ("EXT_SOURCE_3", "median"),189 ("NONLIVINGAREA_AVG", "median"),190 ("OWN_CAR_AGE", "median"),191 ("YEARS_BUILD_AVG", "median"),192 ("NEW_CREDIT_TO_ANNUITY_RATIO", "median"),193 ("NEW_SOURCES_MEAN", "median"),194 ("NEW_CREDIT_TO_GOODS_RATIO", "median"),195 ("NEW_SOURCES_PROD", "median"),196 ("NEW_CAR_TO_EMPLOY_RATIO", "median"),197 ("NEW_PHONE_TO_BIRTH_RATIO", "median"),198 ("NEW_SOURCES_STD", "median"),199 ("NEW_ANNUITY_TO_INCOME_RATIO", "median"),200 ("NEW_EMPLOY_TO_BIRTH_RATIO", "median"),201 ("NEW_PHONE_TO_EMPLOY_RATIO", "median")]),202203 (["NAME_EDUCATION_TYPE",204 "OCCUPATION_TYPE",205 "REG_CITY_NOT_WORK_CITY"], [("ELEVATORS_AVG", "median"),206 ("EXT_SOURCE_1", "median"),207 ("NEW_CREDIT_TO_ANNUITY_RATIO", "median"),208 ("NEW_SOURCES_MEAN", "median"),209 ("NEW_CREDIT_TO_GOODS_RATIO", "median"),210 ("NEW_SOURCES_PROD", "median"),211 ("NEW_CAR_TO_EMPLOY_RATIO", "median"),212 ("NEW_PHONE_TO_BIRTH_RATIO", "median"),213 ("NEW_SOURCES_STD", "median"),214 ("NEW_ANNUITY_TO_INCOME_RATIO", "median"),215 ("NEW_EMPLOY_TO_BIRTH_RATIO", "median"),216 ("NEW_PHONE_TO_EMPLOY_RATIO", "median")]),217218 (["OCCUPATION_TYPE"], [("AMT_ANNUITY", "median"),219 ("CNT_CHILDREN", "median"),220 ("CNT_FAM_MEMBERS", "median"),221 ("DAYS_BIRTH", "median"),222 ("DAYS_EMPLOYED", "median"),223 ("DAYS_ID_PUBLISH", "median"),224 ("DAYS_REGISTRATION", "median"),225 ("EXT_SOURCE_1", "median"),226 ("EXT_SOURCE_2", "median"),227 ("EXT_SOURCE_3", "median"),228 ("NEW_CREDIT_TO_ANNUITY_RATIO", "median"),229 ("NEW_SOURCES_MEAN", "median"),230 ("NEW_CREDIT_TO_GOODS_RATIO", "median"),231 ("NEW_SOURCES_PROD", "median"),232 ("NEW_CAR_TO_EMPLOY_RATIO", "median"),233 ("NEW_PHONE_TO_BIRTH_RATIO", "median"),234 ("NEW_SOURCES_STD", "median"),235 ("NEW_ANNUITY_TO_INCOME_RATIO", "median"),236 ("NEW_EMPLOY_TO_BIRTH_RATIO", "median"),237 ("NEW_PHONE_TO_EMPLOY_RATIO", "median")]),238 ]239240 for groupby_cols, specs in NEW_AGGREGATION_RECIPIES:241 group_object = self.__application_train.groupby(groupby_cols)242 for select, agg in specs:243 groupby_aggregate_name = "{}_{}_{}_{}".format("NEW", "_".join(groupby_cols), agg, select)244 self.__application_train = self.__application_train.merge(245 group_object[select]246 .agg(agg)247 .reset_index()248 .rename(index=str, columns={select: groupby_aggregate_name}),249 left_on=groupby_cols,250 right_on=groupby_cols,251 how="left"252 ) ...

Full Screen

Full Screen

median-test.js

Source:median-test.js Github

copy

Full Screen

...6suite.addBatch({7 "median": {8 topic: load("arrays/median").expression("d3.median"),9 "returns the median value for numbers": function(median) {10 assert.equal(median([1]), 1);11 assert.equal(median([5, 1, 2, 3, 4]), 3);12 assert.equal(median([20, 3]), 11.5);13 assert.equal(median([3, 20]), 11.5);14 },15 "ignores null, undefined and NaN": function(median) {16 assert.equal(median([NaN, 1, 2, 3, 4, 5]), 3);17 assert.equal(median([1, 2, 3, 4, 5, NaN]), 3);18 assert.equal(median([10, null, 3, undefined, 5, NaN]), 5);19 },20 "can handle large numbers without overflowing": function(median) {21 assert.equal(median([Number.MAX_VALUE, Number.MAX_VALUE]), Number.MAX_VALUE);22 assert.equal(median([-Number.MAX_VALUE, -Number.MAX_VALUE]), -Number.MAX_VALUE);23 },24 "returns undefined for empty array": function(median) {25 assert.isUndefined(median([]));26 assert.isUndefined(median([null]));27 assert.isUndefined(median([undefined]));28 assert.isUndefined(median([NaN]));29 assert.isUndefined(median([NaN, NaN]));30 },31 "applies the optional accessor function": function(median) {32 assert.equal(median([[1, 2, 3, 4, 5], [2, 4, 6, 8, 10]], function(d) { return median(d); }), 4.5);33 assert.equal(median([1, 2, 3, 4, 5], function(d, i) { return i; }), 2);34 },35 "coerces strings to numbers": function(median) {36 assert.equal(median(["1"]), 1);37 assert.equal(median(["5", "1", "2", "3", "4"]), 3);38 assert.equal(median(["20", "3"]), 11.5);39 assert.equal(median(["3", "20"]), 11.5);40 assert.equal(median(["2", "3", "20"]), 3);41 assert.equal(median(["20", "3", "2"]), 3);42 },43 "coerces values exactly once": function(median) {44 var array = [1, new OneTimeNumber(3)];45 assert.equal(median(array), 2);46 assert.equal(median(array), 1);47 }48 }49});...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var x = [1, 2, 3, 4, 5, 6, 7, 8, 9];2var y = [2, 4, 6, 8, 10, 12, 14, 16, 18];3var bfl = new BestFitLine(x, y);4console.log(bfl.median());5var x = [1, 2, 3, 4, 5, 6, 7, 8, 9];6var y = [2, 4, 6, 8, 10, 12, 14, 16, 18];7var bfl = new BestFitLine(x, y);8console.log(bfl.leastSquares());9var x = [1, 2, 3, 4, 5, 6, 7, 8, 9];10var y = [2, 4, 6, 8, 10, 12, 14, 16, 18];11var bfl = new BestFitLine(x, y);12console.log(bfl.leastSquares(1));13var x = [1, 2, 3, 4, 5, 6, 7, 8, 9];14var y = [2, 4, 6, 8, 10, 12, 14, 16, 18];15var bfl = new BestFitLine(x, y);16console.log(bfl.leastSquares(2));17var x = [1, 2, 3, 4, 5, 6, 7, 8, 9];18var y = [2, 4, 6, 8, 10, 12, 14, 16, 18];19var bfl = new BestFitLine(x, y);20console.log(bfl.leastSquares(3));

Full Screen

Using AI Code Generation

copy

Full Screen

1var BestOf = require("./BestOf.js");2var bestof = new BestOf();3bestof.median();4bestof.add(1);5bestof.add(2);6bestof.add(3);7bestof.add(4);8bestof.add(5);9bestof.add(6);10bestof.add(7);11bestof.add(8);12bestof.add(9);13bestof.add(10);14console.log(bestof.getBestOf(5));15var BestOf = require("./BestOf.js");16var bestof = new BestOf();17bestof.mean();18bestof.add(1);19bestof.add(2);20bestof.add(3);21bestof.add(4);22bestof.add(5);23bestof.add(6);24bestof.add(7);25bestof.add(8);26bestof.add(9);27bestof.add(10);28console.log(bestof.getBestOf(5));29var BestOf = require("./BestOf.js");30var bestof = new BestOf();31bestof.mean();32bestof.add(1);33bestof.add(2);34bestof.add(3);35bestof.add(4);36bestof.add(5);37bestof.add(6);38bestof.add(7);39bestof.add(8);40bestof.add(9);41bestof.add(10);42console.log(bestof.getBestOf(5));43console.log(bestof.getBestOf(4));44console.log(bestof.getBestOf(3));45console.log(bestof.getBestOf(2));46console.log(bestof.getBestOf(1));47var BestOf = require("./BestOf.js");48var bestof = new BestOf();49bestof.mean();50bestof.add(1);51bestof.add(2);52bestof.add(3);53bestof.add(4);54bestof.add(5);55bestof.add(6);56bestof.add(7);57bestof.add(8);58bestof.add(9);59bestof.add(10);60console.log(bestof.getBestOf(5));61console.log(bestof.getBestOf(4));62console.log(bestof.getBestOf(3));63console.log(bestof.getBestOf(2));64console.log(bestof.getBestOf(

Full Screen

Using AI Code Generation

copy

Full Screen

1importPackage(Packages.org.concord.biologica.data);2importPackage(Packages.org.concord.biologica.environment);3var data = new DataSet();4data.addPoint(0, 0);5data.addPoint(1, 1);6data.addPoint(2, 2);7data.addPoint(3, 3);8data.addPoint(4, 4);9data.addPoint(5, 5);10data.addPoint(6, 6);11data.addPoint(7, 7);12data.addPoint(8, 8);13data.addPoint(9, 9);14data.addPoint(10, 10);15data.addPoint(11, 11);16data.addPoint(12, 12);17data.addPoint(13, 13);18data.addPoint(14, 14);19var bfl = new BestFitLine(data);20var slope = bfl.getSlope();21var yint = bfl.getYIntercept();22print("slope: " + slope);23print("y-intercept: " + yint);24var x = 5;25var y = bfl.getY(x);26print("y: " + y);27var y = 5;28var x = bfl.getX(y);29print("x: " + x);30var x = 5;31var y = bfl.getMedianY(x);32print("y: " + y);33var y = 5;34var x = bfl.getMedianX(y);35print("x: " + x);36var r2 = bfl.getRSquared();37print("r2: " + r2);38var stdev = bfl.getStandardDeviation();39print("stdev: " + stdev);40var sterr = bfl.getStandardError();41print("sterr: " +

Full Screen

Using AI Code Generation

copy

Full Screen

1import java.io.*;2import java.util.*;3import java.awt.*;4import javax.swing.*;5import java.awt.event.*;6import java.awt.geom.*;7import java.text.DecimalFormat;8{9 JPanel panel1;10 JPanel panel2;11 JPanel panel3;12 JPanel panel4;13 JPanel panel5;14 JPanel panel6;15 JPanel panel7;16 JPanel panel8;17 JPanel panel9;18 JPanel panel10;19 JPanel panel11;20 JPanel panel12;21 JPanel panel13;22 JPanel panel14;23 JPanel panel15;24 JPanel panel16;25 JPanel panel17;26 JPanel panel18;27 JPanel panel19;28 JPanel panel20;29 JPanel panel21;30 JPanel panel22;31 JPanel panel23;32 JPanel panel24;33 JPanel panel25;34 JPanel panel26;35 JPanel panel27;36 JPanel panel28;37 JPanel panel29;38 JPanel panel30;39 JPanel panel31;40 JPanel panel32;41 JPanel panel33;42 JPanel panel34;43 JPanel panel35;44 JPanel panel36;45 JPanel panel37;46 JPanel panel38;47 JPanel panel39;48 JPanel panel40;49 JPanel panel41;50 JPanel panel42;51 JPanel panel43;52 JPanel panel44;53 JPanel panel45;54 JPanel panel46;55 JPanel panel47;56 JPanel panel48;57 JPanel panel49;

Full Screen

Using AI Code Generation

copy

Full Screen

1var BestFitLine = require('./BestFitLine.js');2var bfl = new BestFitLine();3bfl.add(1, 1);4bfl.add(2, 2);5bfl.add(3, 3);6bfl.add(4, 4);7bfl.add(5, 5);8bfl.calculate();9console.log(bfl.getEquation());10console.log(bfl.predict(6));11console.log(bfl.getCorrelationCoefficient());12console.log(bfl.getDeterminationCoefficient());13console.log(bfl.getCount());14console.log(bfl.getSumX());15console.log(bfl.getSumY());16console.log(bfl.getSumXSquared());17console.log(bfl.getSumYSquared());18console.log(bfl.getSumXY());19console.log(bfl.getMeanX());20console.log(bfl.getMeanY());21console.log(bfl.getVarianceX());22console.log(bfl.getVarianceY());23console.log(bfl.getStandardDeviationX());24console.log(bfl.getStandardDeviationY());25console.log(bfl.getMedianX());26console.log(bfl.getMedianY());27console.log(bfl.getModeX());28console.log(bfl.getModeY());29console.log(bfl.getRangeX());30console.log(bfl.getRangeY());31console.log(bfl

Full Screen

Using AI Code Generation

copy

Full Screen

1function BestFitLineMedian(data){2 var xSum = 0;3 var ySum = 0;4 var xSqSum = 0;5 var xySum = 0;6 var n = data.length;7 var x = [];8 var y = [];9 for(var i=0;i<n;i++){10 x[i] = data[i][0];11 y[i] = data[i][1];12 }13 x.sort(function(a,b){return a-b});14 y.sort(function(a,b){return a-b});15 var xMedian = x[Math.floor(n/2)];16 var yMedian = y[Math.floor(n/2)];17 var xMean = xSum/n;18 var yMean = ySum/n;19 for(var i=0;i<n;i++){20 xSum += x[i];21 ySum += y[i];22 xSqSum += x[i]*x[i];23 xySum += x[i]*y[i];24 }25 var m = (n*xySum - xSum*ySum)/(n*xSqSum - xSum*xSum);26 var b = yMedian - m*xMedian;27 var r = (n*xySum - xSum*ySum)/Math.sqrt((n*xSqSum - xSum*xSum)*(n*ySqSum - ySum*ySum));28 return [m, b, r];29}

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Best automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful