North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (2022)

Home > Community Dashboard > Median Household Income By Age - 45-64 > County

Select a County

This indicator measures the median household income by age for the county.

Why is this important?

Median household income reflects the relative affluence and prosperity of an area. Areas with higher median household incomes are likely to have more educated residents and lower unemployment rates. Higher employment rates lead to better access to healthcare and better health outcomes, since many families get their health insurance through their employer. Areas with higher median household incomes also have higher home values and their residents enjoy more disposable income.

More...

Select a comparison

Export Map download Labels Off/On Background Map: Detailed/Simple/None Transparency Off/On Large/Small Map

North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (1)

Median Household Income By Age - 45-64

:

Comparison:

Measurement Period: 2012

Data Source: USA.com

November 24, 2022www.njhealthmatters.org

'; return str; },"useHTML":true,"padding":8},"series":[{"name":"County","id":"value_series","data":[{"y":84822,"currentValue":84822,"valueFmt":"$84,822.0","currentPeriod":"2012","localeName":"Union","localeType":"County","localeId":1845,"priorValueDirection":-1,"trendDirection":-1,"lineWidth":1,"lineColor":"#ffffff","unstable":0},{"y":95791,"currentValue":95791,"valueFmt":"$95,791.0","currentPeriod":"2012","localeName":"Sussex","localeType":"County","localeId":1844,"priorValueDirection":-1,"trendDirection":-1,"lineWidth":1,"lineColor":"#ffffff","unstable":0},{"y":116757,"currentValue":116757,"valueFmt":"$116,757.0","currentPeriod":"2012","localeName":"Morris","localeType":"County","localeId":1839,"priorValueDirection":-1,"trendDirection":-1,"lineWidth":1,"lineColor":"#ffffff","unstable":0}],"type":"column"}]}); addChartControls('locTypeValueContent2', 1); });

  • Download JPEG
  • Download PDF
  • Download CSV

$84,822.0

$95,791.0

$116,757.0

Sort by Trend Sort by Change from Prior Value

County Source Measurement Period Dollars

Download County Indicator Data CSV

Data Source

  • USA.com
    Maintained By: North Jersey Health Collaborative

Filed under: Economy / Income, Adults

Related Content for: Median Household Income By Age - 45-64

Indicators MORE Indicators links

  • Households that are Above the Asset Limited, Income Constrained, Employed (ALICE) Threshold
  • Households that are Asset Limited, Income Constrained, Employed (ALICE)
  • Households that are Below the Federal Poverty Level
  • Income Inequality

Promising Practices MORE Promising Practices links

  • Post-Assistance Self-Sufficiency (PASS) Program
  • CAMINOS
  • Campaign for Working Families
  • Career Gear

Partners

  • United Way of Northern New Jersey

Meeting Minutes and Materials

  • MUHL Coalition Minutes 3/27/17
  • Morristown United Meeting Minutes October

Presentations

  • Advance Planning: Legal Services of Northwest Jersey
  • Powers of Attorney, Wills, and Trusts

Indicator Legend

Red is bad, green is good, blue is not statistically different/neutral.

Compared to Distribution

North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (2) the value is in the best half of communities.

North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (3) the value is in the 2nd worst quarter of communities.

North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (4) the value is in the worst quarter of communities.

Compared to Target

North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (5) meets target; North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (6) does not meet target.

Compared to a Single Value

North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (7) lower than the comparison value; North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (8) higher than the comparison value; North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (9) not statistically different from comparison value.

Trend

North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (10) North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (11) non-significant change over time; North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (12) North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (13) significant change over time; North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (14) no change over time.

Compared to Prior Value

North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (15) higher than the previous measurement period; North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (16) lower than the previous measurement period; North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (17) no statistically different change from previous measurement period.

North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (18) Significantly better than the overall value

North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (19) Significantly worse than the overall value

North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (20) No significant difference with the overall value

North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (21) No data on significance available

More information about the gauges and icons

'; $(confirmDiv).dialog({ height: 'auto', width: 300, modal: false, buttons: { "Ok": function() { var url = ClientSite.Extensions.Url().quickUrl('indicators', 'index', 'view', urlParams); window.location.href = url; }, Cancel: function() { $('select[name="period"]').val(globals.periodId); $(this).dialog('close'); } } }); } } if (valid) { var url = setQueryVariable('periodId', periodId); window.location.href = window.location.pathname + '?' + url; } }); // Ensure that links which load a new page (ancestor locale filters, new locale types) include the comparison $('a.isum-addcomparison-btn').on('click', function() { var localeTypeId = globals.currentLocaleTypeId; if (globals.currentComparison[localeTypeId] && globals.currentComparison[localeTypeId] != 'default') { $(this).attr('href', ($(this).attr('href') + '&comparisonId=' + globals.currentComparison[localeTypeId])); } }); $('#localeFilterId').on('change', function() { var localeFilterId = $(this).val(); if (isNaN(localeFilterId)) { return; } // Check if the locale filter is available for this location var valid = true; if ((globals.currentLocaleId > 0) && (localeFilterId > 0) && ($('.currentLocaleAncestor-' + localeFilterId).length == 0)) { valid = false; } if (!valid) { var urlParams = { 'indicatorId': 3623, 'localeTypeId': 2, 'periodId': globals.periodId, 'localeFilterId': localeFilterId, }; if (globals.currentComparison[localeTypeId] && globals.currentComparison[localeTypeId] != 'default') { urlParams.comparisonId = globals.currentComparison[localeTypeId]; } var selectedFilter = $('#localeFilterId option:selected'); var selectedFilterName = selectedFilter.parent('optgroup').attr('label') + ': ' + selectedFilter.text(); var confirmDiv = '

The current location is not available within your selected filter.

Click Ok to view all available ' + globals.localeTypes[globals.currentLocaleTypeId]['displayName'] + ' data within ' + selectedFilterName + '.

'; $(confirmDiv).dialog({ height: 'auto', width: 300, modal: false, buttons: { "Ok": function() { var url = ClientSite.Extensions.Url().quickUrl('indicators', 'index', 'view', urlParams); window.location.href = url; }, Cancel: function() { $('#localeFilterId').val(globals.localeFilterId); $(this).dialog('close'); } } }); } if (valid) { var url = setQueryVariable('localeFilterId', localeFilterId); window.location.href = window.location.pathname + '?' + url; } }); // This code is shared among various places where map options (originally exporting) are provided:// SocioNeeds Index, Demographics view, Indicator view, etc. $('#toggleLabels'+'').on('click', function(event) { event.preventDefault(); if ('indicator' == 'mapnav') { var mapnav_map = mapnav_globals.maps['']; mapnav_map.featureLayer.setShowLabels(!mapnav_map.featureLayer.showLabels); } else if ('indicator' == 'indmaptile') { map_tiles.tiles[''].currentLayer.setShowLabels(!map_tiles.tiles[''].currentLayer.showLabels); } else { if (globals.current != undefined) { // socioneeds stores current fl differently globals.featureLayers[globals.current.fl].setShowLabels(!globals.featureLayers[globals.current.fl].showLabels); } else { globals.currentFl.setShowLabels(!globals.currentFl.showLabels); } } }); // basemap toggles // the 'none' basemap is added via HCI_Gis::getMapSymbols() var HCIBasemaps = ["osm","gray","none"]; $('#toggleStreetsBaseLayer'+'').on('click', function(event) { event.preventDefault(); if ('indicator' == 'mapnav') { var mapdata = mapnav_globals.maps['']; } else if ('indicator' == 'indmaptile') { var mapdata = map_tiles.tiles['']; } else { var mapdata = globals; } if (mapdata.map == undefined) { return; } var bmIndex = $.inArray(mapdata.map.getBasemap(), HCIBasemaps); var newIndex = (bmIndex < HCIBasemaps.length-1 && bmIndex > -1) ? bmIndex + 1 : 0; mapdata.currentBasemap = HCIBasemaps[newIndex]; mapdata.map.setBasemap(mapdata.currentBasemap); }); $('#toggleMapTransparency'+'').on('click', function(event) { event.preventDefault(); if ('indicator' == 'indmaptile') { var transparency = map_tiles.tiles[''].transparency; var currentLayer = map_tiles.tiles[''].currentLayer; var map = map_tiles.tiles[''].map; if (transparency == 'off' || transparency == undefined) { map_tiles.tiles[''].transparency = 'on'; currentLayer.setOpacity(0.0); addBoundaryOutlines(map, currentLayer, map_tiles.defaults.highlightSymbols, map_tiles.tiles[''].currentLocaleId); } else { map_tiles.tiles[''].transparency = 'off'; currentLayer.setOpacity(0.85); removeBoundaryOutlines(map, currentLayer); } } else if ('indicator' == 'mapnav') { var mapdata = mapnav_globals.maps['']; var transparency = mapdata.transparency; var currentLayer = mapdata.featureLayer; var map = mapdata.map; if (transparency == 'off' || transparency == undefined) { mapdata.transparency = 'on'; currentLayer.setOpacity(0.0); addBoundaryOutlines(map, currentLayer, mapnav_globals.highlightSymbols); } else { mapdata.transparency = 'off'; currentLayer.setOpacity(0.85); removeBoundaryOutlines(map, currentLayer); } } else if ('indicator' == 'index') { // SNI, FII, etc if (globals.transparency == 'off' || globals.transparency == undefined) { addBoundaryOutlines(globals.map, globals.map.getLayer('breaksGL'), globals.highlightSymbols, globals.currentLocaleId); globals.transparency = 'on'; } else { globals.transparency = 'off'; removeBoundaryOutlines(globals.map, globals.map.getLayer('breaksGL')); globals.featureLayers[globals.current.fl].refresh(); } clearBreaksGraphics(); setBreaksGraphics(); } else if ('indicator' == 'indicator') { if (globals.transparency == 'off' || globals.transparency == undefined) { globals.transparency = 'on'; globals.currentFl.setOpacity(0.0); addBoundaryOutlines(globals.map, globals.currentFl, globals.highlightSymbols); } else { globals.transparency = 'off'; globals.currentFl.setOpacity(0.85); removeBoundaryOutlines(globals.map, globals.currentFl); } } else if ('indicator' == 'demographics') { if (globals.transparency == 'off' || globals.transparency == undefined) { globals.transparency = 'on'; } else { globals.transparency = 'off'; } clearDemBreaksGraphics(); setDemBreaksGraphics(); } }); $('#requestBigMap'+'').on('click', function(event) { event.preventDefault(); if ('indicator' == 'indmaptile') { toggleIndMapLayout(''); } else { toggleMapChartLayout(); } }); // Export map. First retrieve the map image from the server. Then create a div with the // needed meta data (ind name, comparison, etc) and insert it into the dom. Then use html2canvas // to create an image of the div, which is what the final export is. $(".saveMap").on('click', function(event) { event.preventDefault(); exportMap(); }); function exportMap() { var loading = 'North Jersey Health Collaborative :: Indicators :: Median Household Income By Age (22)'; var dialog = $('

Please wait while we prepare the map for export. This could take up to a minute.

' + loading + '

'); dialog.dialog({modal: true}); var params = new PrintParameters(); var template = new PrintTemplate(); template.exportOptions = { width: 800, height: 600, dpi: 150 }; template.format = 'PNG32'; template.preserveScale = false; params.map = globals.map; params.template = template; var printTask = new PrintTask('https://maps.thehcn.net/arcgis_web_adaptor/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task', { async: false }); var printMap = printTask.execute(params); // deferred, returns url of map image printMap.then(function(resp) { var exp = $('.spoofMap').clone(); exp.attr('id', 'spoofMap'); var subtitle = ''; if (globals.current != undefined) { // index views store current fl differently subtitle = globals.current.localeTypeName; if (globals.current.localeName != '') { subtitle = subtitle + ': ' + globals.current.localeName; } } else { subtitle = globals.currentLocaleTypeName; if (globals.currentLocaleName != '') { subtitle = subtitle + ': ' + globals.currentLocaleName; } } exp.find('.subtitle').html(subtitle); // comparison info if (globals.currentComparisonName != '') { var compStr = globals.currentComparisonName; if (globals.currentLocaleId > 0) { // locale specific if (globals.currentComparisonType == 2) { // prior value is handled differently var priorValue = { periodId: 0 }; var currentValue = {}; var period = globals.periods[globals.periodId]; var localeDetails = globals.localeTypes[globals.currentLocaleTypeId]['localeDetails'][globals.currentLocaleId]; var priorValues = localeDetails['priorValues']; for (var key in priorValues) { var pv = priorValues[key]; if (pv.periodId == globals.periodId) { currentValue = pv; continue; } if (pv.periodId > globals.periodId || pv.periodId <= priorValue.periodId) { continue; } priorValue = pv; } compStr = '' + globals.currentLocaleName + ' Value for ' + currentValue.period + ': ' + currentValue.valueFmt; compStr += '
' + globals.currentLocaleName + ' Value for ' + priorValue.period + ': ' + priorValue.valueFmt; exp.find('.comparison').html(compStr); exp.find('.measurementPeriod').remove(); // redundant } else { compStr = $('.idet-comparison-selected .comparisonName').clone(); if (compStr.length > 0) { compStr.find('br').remove(); compStr = compStr.html(); } else { compStr = 'N/A'; } exp.find('.comparison_name').html(compStr); } } else { // locale agnostic exp.find('.comparison_name').html(compStr); } } else { exp.find('.comparison').remove(); } // locale specific value info if (globals.currentLocaleId > 0) { if (globals.currentComparisonType != 2 && globals.currentComparisonType != 4) { exp.find('.currentLocaleValue').html(globals.currentLocaleName + ' Value for ' + globals.periods[globals.periodId]); exp.find('.currentValue').html($('.idet-value-block-value').html()); } else { var valStr = $('.idet-comparison-selected').attr('title'); $(valStr).children('div').remove(); // just the first line (no technical note) valStr = '' + $(valStr).html() + ''; exp.find('.currentValueContainer').html(valStr); if (globals.currentComparisonType == 4) { exp.find('.comparison').remove(); } } } else { exp.find('.currentValueContainer').remove(); } var img = new Image(); img.crossOrigin = 'Anonymous'; // necessary in order for html2canvas to properly retrieve the img img.src = resp.url; exp.find('.map_image').append(img); exp.find('.mapExportLegend').append($('.mapLegendWrapper').filter(":visible").get(0).outerHTML); exp.removeClass('hidden-all'); $('body').append(exp); var spoof = $('#spoofMap').get(0); var h2cOpts = { background: '#fff', useCORS: true, scale: 2, logging: false, width: 840 } // wait for the external image to load before attempting to grab the div // this helps to prevent blank images on Safari (Chrome & FF seem to do the right thing) img.onload = function() { html2canvas(spoof, h2cOpts).then(function(canvas) { var filename = 'Median Household Income By Age - 45-64.jpg'; if (navigator.userAgent.indexOf("MSIE ") > 0 || navigator.userAgent.match(/Trident.*rv\:11\./)) { // download attribute not supported in IE<=11 var blob = canvas.msToBlob(); window.navigator.msSaveBlob(blob, filename); finishExport(dialog); } else { var a = $('.saveMapSpoof').get(0); var src = canvas.toDataURL('image/jpeg', 1); a.href = src; a.download = filename; a.click(); finishExport(dialog); } }); }; }, // printTask.then.. function(err) { dialog.dialog('destroy'); var errdialog = $('

An error occurred while preparing the map for export. Please try again.

'); errdialog.dialog({modal: true}); console.log('An error occurred processing the print request:'); console.log(err); }, function(update) { console.log('Update from the print task:'); console.log(update); }); } // after downloading map, remove the spoofMap div and remove the dialog function finishExport(dialog) { $('#spoofMap').remove(); dialog.dialog('destroy'); } function clearBreaksGraphics() { if (globals.map.getLayer('breaksGL') != undefined) { globals.map.getLayer('breaksGL').clear(); globals.featureLayers[globals.current.fl].graphics.forEach(function(g, idx) { if (g.attributes != undefined && globals.current.localeIds.indexOf(g.attributes.localeId) > -1) { var polygon = new esri.geometry.Polygon(g.geometry.spatialReference); var rings = g.geometry.rings; for (var r=0, rl=rings.length; r

-1) { var polygon = new esri.geometry.Polygon(g.geometry.spatialReference); var rings = g.geometry.rings; for (var r=0, rl=rings.length; r chart.yAxis[0].max) { chart.yAxis[0].update({ max: plotline.plotLineRenderValues.value}); } } }); } var renderer = globals.localeTypes[localeTypeId]['renderers'][rIndex]; renderComparison(renderer, localeTypeId); }}function removeCompValuePlotlines(localeTypeId) { var chartContainerId = 'valueChart'+localeTypeId; var chart = $('#'+chartContainerId).highcharts(); if (chart) { var plotlines = globals.localeTypes[localeTypeId].plotlines; if (plotlines) { plotlines.forEach(function(plotline, compId) { chart.yAxis[0].removePlotLine(plotline.benchmark); }); } }}function calcOffset() { return (globals.map.extent.getWidth() / globals.map.width);}function getLocaleTypeId(localeId) { for (var i in globals.localeTypes) { for (var x in globals.localeTypes[i]['indicatorValues']) { if (x == localeId) { globals.currentLocaleTypeId = i; break; } } } return globals.currentLocaleTypeId;}function highlightDatatableLocale(localeId, scroll, state) { $('#map_locations tbody tr').removeClass(state); var localeTypeId = getLocaleTypeId(localeId); var mapLocsTableRow = $('tr#'+localeTypeId+'_'+localeId); if (mapLocsTableRow.length) { mapLocsTableRow.addClass(state); if (scroll){ $('#map_locations_container').animate({scrollTop: mapLocsTableRow.position().top - 100}, 500); } } return;}function clearDatatableHighlights() { $('#map_locations tbody tr').removeClass('hover');}// This updates which comparison is highlighted in the locale specific display to the specified comparisonfunction updateSelectedLocaleComparisonDisplay(rIndex) { if ($('.idet-comparison-link-container:visible').length) { $(".idet-comparison-link-container").removeClass("idet-comparison-selected"); if (rIndex != 'default') { // 'default' is not a system-defined comparison type $('#comparison_' + rIndex).addClass("idet-comparison-selected"); } }}function renderComparison(comparison, localeTypeId) { if (comparison == null) { return; } if (localeTypeId == null) { var localeTypeId = globals.currentLocaleTypeId; } var chartContainerId = 'valueChart'+localeTypeId; var chart = $('#'+chartContainerId).highcharts(); var updated = false; if (chart) { for (var pIdx=0, pointCount=chart.series[globals.seriesIdx.VALUESERIES].data.length; pIdx= band.minValue) && (band.maxValue == 'Infinity' || point.y <= band.maxValue)) { updatePoint(point, band.symbol, localeId); updated = true; break; } } } } if (!updated) { updatePoint(point, globals.nullColor, localeId); } } chart.redraw(false); if (chart) { chart.tooltip.hide(); } $("#map_locations").trigger("update"); }}/** * lookup to determine if locale is included in the selected comparison * return bool true if it is in the localeIdList for the current comparison, false if not */function isLocaleIdInComparison(localeId) { return (globals.localeTypes[globals.currentLocaleTypeId]['renderers'][globals.currentComparison[globals.currentLocaleTypeId]]['localeIdList'][localeId] != undefined);}function updatePoint(point, symbol, localeId) { $('#table-value-comp-'+localeId).css('background-color', symbol); point.update({ color: symbol }, false, false ); point.setState(); return;}function selectChartLocale(localeId) { var chart = $('#valueChart'+globals.currentLocaleTypeId).highcharts(); globals.tooltipHide = false; if (chart) { $.each(chart.series[globals.seriesIdx.VALUESERIES].data, function (i, point) { if (point.localeId == localeId) { var highlightColor = null; if (globals.currentComparisonType == 'jenks' || globals.currentComparisonType == undefined) { highlightColor = 'rgba(255, 204, 0, 1)'; } else { highlightColor = 'rgba(150, 255, 255, 1)'; } point.setState(); point.update({ borderColor: highlightColor, borderWidth: 3 }, false, false ); chart.tooltip.refresh(chart.series[globals.seriesIdx.VALUESERIES].data[i]); point.graphic.toFront(); } else { point.update({ borderColor: 'rgba(128, 128, 128, .5)', borderWidth: 1 }, false, false ); } }); chart.redraw(false); }}function highlightChartLocale(localeId) { var localeTypeId = getLocaleTypeId(localeId); if (false == globals.localeTypes[localeTypeId]['indicatorValues'].hasOwnProperty(localeId)) { return; } var chart = $('#valueChart'+localeTypeId).highcharts(); globals.tooltipHide = false; if (chart) { var idx = globals.localeTypes[localeTypeId]['indicatorValues'][localeId]['index']; var selectedPoint = null; var currentLocaleIdx = -1; if (globals.currentLocaleId != -1) { currentLocaleIdx = globals.localeTypes[localeTypeId]['indicatorValues'][localeId].index; } chart.series[globals.seriesIdx.VALUESERIES].data.forEach(function(point, i) { if (i == idx) { if (i == currentLocaleIdx) { selectedPoint = point; } point.setState('hover'); chart.tooltip.refresh(chart.series[globals.seriesIdx.VALUESERIES].data[i]); point.graphic.toFront(); } else { point.setState(); // turn off hover effects point.graphic.zIindex = 0; } }); if (selectedPoint) { selectedPoint.graphic.toFront(); } chart.redraw(false); } return;}function clearChartHighlights() { var chart = $('#valueChart'+globals.currentLocaleTypeId).highcharts(); chart.series[globals.seriesIdx.VALUESERIES].data.forEach(function(point) { point.update({ borderColor: 'rgba(128, 128, 128, .5)', borderWidth: 1 }, false, false ); }); chart.redraw(false); chart.tooltip.hide();}function highlightMapLocale(localeId) { if (globals.currentFl) { clearMapSelection('highlight'); globals.currentFl.graphics.forEach(function(g) { if (g.attributes.localeId == localeId) { var polygon = new esri.geometry.Polygon(g.geometry.spatialReference); var rings = g.geometry.rings; for (var r=0, rl=rings.length; r 0) { if (globals.localeTypes[localeTypeId]['filteredLocaleList'][localeId] == undefined) { removeFilterMessage = true; } else { urlParams.localeFilterId = globals.localeFilterId; } if (globals.localeTypes[localeTypeId]['localeListForPeriod'] && globals.localeTypes[localeTypeId]['localeListForPeriod'][localeId]) { changePeriodMessage = false; } } if (changePeriodMessage) { var period = $.trim(globals.periods[globals.periodId]); var warningMessage = 'does not have data for ' + period; var actionMessage = 'to view the most recent data for this location'; } else { urlParams.periodId = globals.periodId; } if (removeFilterMessage) { if (changePeriodMessage) { warningMessage += ' and '; actionMessage += ' and '; } warningMessage += 'is not available in the current filter'; actionMessage += 'remove the filter'; } var confirmDiv = '

The selected location ' + warningMessage + '.

Click Ok to ' + actionMessage + '.

'; $(confirmDiv).dialog({ height: 'auto', width: 300, modal: false, buttons: { "Ok": function() { var url = ClientSite.Extensions.Url().quickUrl('indicators', 'index', 'view', urlParams); window.location.href = url; }, Cancel: function() { $('select[name="localeId"]').val(globals.currentLocaleId).trigger('change.select2'); $(this).dialog('close'); } } }); return; } globals.currentLocaleId = localeId; globals.currentLocaleName = globals.localeTypes[localeTypeId].indicatorValues[localeId]['displayName']; $('#locHeaderText').html(globals.currentLocaleTypeName + ': ' + globals.localeTypes[localeTypeId]['indicatorValues'][localeId]['displayName']); if ($('#localeDetailContainer').is(':visible')) { $('#localeDetailContainer').fadeTo('fast', .5); } setMappingUnavailable(false); $('.isum-selected-locale-type-container img.loading').css('display', 'inline'); $('.isum-selected-locale-type-container').fadeTo('fast', .5); if (globals.localeTypes[localeTypeId]['localeDetails'][localeId] == undefined) { var url = "/indicators/indexajax/dispatch?callAction=getSiteIndicatorLocaleData"; var dataObj = { 'indicatorId': 3623, 'localeId': globals.currentLocaleId, 'periodId': globals.periodId, 'json': 1, 'units': "Dollars", 'localeChartIdxs': globals.localeChartIdxs }; var ajaxObj = { dataType: "json", url: url, data: dataObj, method: 'post', success: function(ret) { if (ret.success == false) { return; } globals.localeTypes[localeTypeId]['localeDetails'][localeId] = ret.localeInfo; updateIndicatorLocaleDisplay(ret.localeInfo); } }; $.ajax(ajaxObj); } else { updateIndicatorLocaleDisplay(globals.localeTypes[localeTypeId]['localeDetails'][localeId]); } // Locale Selector $('#locSelector-initial').fadeOut('fast'); // Header $('.isum-locHeader').fadeIn('fast'); $('#locViewJump').fadeIn('fast'); // Chart selectChartLocale(localeId); // Table highlightDatatableLocale(localeId, true, 'active'); // Map if (globals.currentFl) { selectMapLocale(localeId) } if (!skipStateUpdate) { saveState({localeId: localeId}); } // update all related content "MORE" links to have the necessary params to return to this page. if ($('.related-content .more-link').length) { $('.related-content .more-link').each(function() { var tmpUrl = $(this).attr('href').split('&'); var found = false; var newUrl = []; $(tmpUrl).each(function(i, pair) { var param = pair.split('=')[0]; if (param == 'src_localeId') { found = true; newUrl.push('src_localeId=' + localeId); } else { newUrl.push(pair); } }); if (!found) { newUrl.push('src_localeId=' + localeId); } $(this).attr('href', newUrl.join('&')); }); }};function selectMapLocale(localeId) { if (localeId == -1) { return; } var query = new esri.tasks.Query(); query.where = 'localeId = ' + localeId; query.outFields = ['localeId']; query.maxAllowableOffset = (globals.maxClickOffset < globals.maxOffset) ? globals.maxClickOffset : globals.maxOffset; query.returnGeometry = true; var queryTask = new esri.tasks.QueryTask(globals.currentFl.url); var highlight = queryTask.execute(query); highlight.then(function(res) { if (res.features.length > 0 ) { globals.selectedGeometry = res['features'][0].geometry; highlightMapSelection(res['features'][0].geometry, 'select'); } else { setMappingUnavailable(true); } });}function setMappingUnavailable(unavailable) { if (unavailable == false) { $('#isum-map_container').fadeTo('fast', 1); $('#mappingUnavailable').hide(); } else { $('#isum-map_container').fadeTo('fast', .35); $('#mappingUnavailable').show(); }}function highlightMapSelection(geometry, id) { $('#isumMapBlock img.loading').css('display', 'inline'); clearMapSelection(id); var polygon = new esri.geometry.Polygon(geometry.spatialReference); var rings = geometry.rings; for (var r=0, rl=rings.length; r 0) { var $totalHeight = $(".whyImportant")[0].scrollHeight; var $windowHeight = 80; $(".whyImportantToggle").addClass('hidden-all'); if ($totalHeight >= $windowHeight + 10) { $(".whyImportantToggle").removeClass('hidden-all'); } else { $('.whyImportant').removeClass('why-gradient'); } }}function saveState(stateInfo) { if (history.state == null) { var historyState = {}; if (globals.initialLocaleId > 0) { historyState.localeId = globals.initialLocaleId; } else if (globals.initialLocaleTypeId) { historyState.localeTypeId = globals.initialLocaleTypeId; } historyState.comparisonId = globals.initialComparisonId; history.replaceState(historyState, null, location.href); } // Add any missing state parameters if (!stateInfo.comparisonId) { stateInfo.comparisonId = globals.currentComparison[globals.currentLocaleTypeId]; } // If neither the locale or locale type is specified if (!stateInfo.localeId && !stateInfo.localeTypeId) { if (globals.currentLocaleId && globals.currentLocaleId > 0) { stateInfo.localeId = globals.currentLocaleId; } else { stateInfo.localeTypeId = globals.currentLocaleTypeId; } } var href = location.href; if (stateInfo.localeId && (stateInfo.localeId > 0)) { if (getQueryVariable('localeId')) { href = href.replace(/(localeId=)[^\&]+/, '$1' + stateInfo.localeId); } else { href = ClientSite.Extensions.Url().addQueryParameters(href, {'localeId': stateInfo.localeId}); } href = href.replace(/localeTypeId=[^&]+[&]*/, ''); } else if (stateInfo.localeTypeId) { if (getQueryVariable('localeTypeId')) { href = href.replace(/(localeTypeId=)[^\&]+/, '$1' + stateInfo.localeTypeId); } else { href = ClientSite.Extensions.Url().addQueryParameters(href, {'localeTypeId': stateInfo.localeTypeId}); } href = href.replace(/localeId=[^&]+[&]*/, ''); } if (stateInfo.comparisonId) { if (isNaN(stateInfo.comparisonId)) { href = href.replace(/comparisonId=[^&]+[&]*/, ''); } else { if (getQueryVariable('comparisonId')) { href = href.replace(/(comparisonId=)[^\&]+/, '$1' + stateInfo.comparisonId); } else { href = ClientSite.Extensions.Url().addQueryParameters(href, {'comparisonId': stateInfo.comparisonId}); } } } if (stateInfo.localeChartIdxs) { if (getQueryVariable('localeChartIdxs')) { href = href.replace(/(localeChartIdxs=)[^\&]+/, '$1' + stateInfo.localeChartIdxs); } else { href = ClientSite.Extensions.Url().addQueryParameters(href, {'localeChartIdxs': stateInfo.localeChartIdxs}); } } history.pushState(stateInfo, null, href);}function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i

Top Articles

You might also like

Latest Posts

Article information

Author: Jonah Leffler

Last Updated: 10/24/2022

Views: 6401

Rating: 4.4 / 5 (65 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Jonah Leffler

Birthday: 1997-10-27

Address: 8987 Kieth Ports, Luettgenland, CT 54657-9808

Phone: +2611128251586

Job: Mining Supervisor

Hobby: Worldbuilding, Electronics, Amateur radio, Skiing, Cycling, Jogging, Taxidermy

Introduction: My name is Jonah Leffler, I am a determined, faithful, outstanding, inexpensive, cheerful, determined, smiling person who loves writing and wants to share my knowledge and understanding with you.