- Data Central
- 2020 Decennial Census
Select an Area
2020 Decennial Census
Detail
Diversity Index *
2020 | 2010 | Change |
---|---|---|
34 | 22 | 12 |
* The USA TODAY diversity index shows on a scale of 0 to 100 how likely it is two people from an area would have a different race or ethnicity. A score of 0 would mean everyone had the same race and ethnicity; a score of 100 would mean everyone in an area had a distinctly different combination of race and ethnicity. Nearly everywhere is some place in the middle. The index was invented in 1991 by Phil Meyer of the University of North Carolina and Shawn McIntosh, who was then with USA TODAY. This score differs from the Census Bureau's version of the diversity index because of differences in how the bureau's formula counts race and Hispanic origin.
Population by Race/Ethnicity
2020 | 2010 | Change | ||||
---|---|---|---|---|---|---|
# | % | # | % | |||
Total | 46,040 | 45,436 | 1.3% | |||
Race | White | 38,397 | 83.4% | 40,926 | 90.1% | -6.2% |
Black | 2,000 | 4.3% | 1,475 | 3.2% | 35.6% | |
American Indian | 57 | 0.1% | 109 | 0.2% | -47.7% | |
Asian | 2,290 | 5.0% | 1,782 | 3.9% | 28.5% | |
Pacific Islander | 15 | 0.0% | 8 | 0.0% | 87.5% | |
Other | 784 | 1.7% | 411 | 0.9% | 90.8% | |
Two or More | 2,497 | 5.4% | 725 | 1.6% | 244.4% | |
Ethnicity | Hispanic or Latino | 2,226 | 4.8% | 1,411 | 3.1% | 57.8% |
Population by Race/Ethnicity: 18 Years and Over
2020 | 2010 | Change | ||||
---|---|---|---|---|---|---|
# | % | # | % | |||
Total | 36,988 | 35,679 | 3.7% | |||
Race | White | 31,618 | 85.5% | 32,537 | 91.2% | -2.8% |
Black | 1,444 | 3.9% | 1,054 | 3.0% | 37.0% | |
American Indian | 47 | 0.1% | 71 | 0.2% | -33.8% | |
Asian | 1,776 | 4.8% | 1,370 | 3.8% | 29.6% | |
Pacific Islander | 12 | 0.0% | 6 | 0.0% | 100.0% | |
Other | 559 | 1.5% | 286 | 0.8% | 95.5% | |
Two or More | 1,532 | 4.1% | 355 | 1.0% | 331.5% | |
Ethnicity | Hispanic or Latino | 1,417 | 3.8% | 892 | 2.5% | 58.9% |
Diversity Index *
2020 | 2010 | Change |
---|---|---|
34 | 22 | 12 |
* The USA TODAY diversity index shows on a scale of 0 to 100 how likely it is two people from an area would have a different race or ethnicity. A score of 0 would mean everyone had the same race and ethnicity; a score of 100 would mean everyone in an area had a distinctly different combination of race and ethnicity. Nearly everywhere is some place in the middle. The index was invented in 1991 by Phil Meyer of the University of North Carolina and Shawn McIntosh, who was then with USA TODAY. This score differs from the Census Bureau's version of the diversity index because of differences in how the bureau's formula counts race and Hispanic origin.
Housing Units
2020 | 2010 | Change | |||
---|---|---|---|---|---|
# | % | # | % | ||
Total Housing Units | 17,865 | 17,316 | 3.2% | ||
Occupied | 17,258 | 96.6% | 16,718 | 96.5% | 3.2% |
Vacant | 607 | 3.4% | 598 | 3.5% | 1.5% |
Population in Group Quarters
2020 | |
---|---|
Total Population in Group Quarters | 902 |
Institutionalized Population | 565 |
Correctional Facilities for Adults | 0 |
Juvenile Facilities | 126 |
Nursing Facilities/Skilled-nursing Facilities | 439 |
Other Institutional Facilities | 0 |
Noninstitutionalized Population | 337 |
College/University Student Housing | 0 |
Military Quarters | 0 |
Other Noninstitutional Facilities | 337 |
Map
Total Population Change
Less than -3%
-3% to 0%
0% to 3%
3% to 6%
6% to 9%
9% to 12%
12% to 15%
15% to 18%
More than 18%
N/A
2020 Boundary
2010 Boundary
1:500,000 scale
Other Areas in Middletown township, Bucks County, Pennsylvania
Total Population | Age 18 and Over | ||||||
Total Population | Age 18 and Over | ||||||
Area | Diversity Index | Total Population | Hispanic | Not Hispanic, White | Total Population | Hispanic | Not Hispanic, White |
---|---|---|---|---|---|---|---|
010 United States | 67 12 | 331,449,281 7.4% | 62,080,044 18.7% 23.0% | 191,697,647 57.8% -2.6% | 258,343,281 8.8% | 43,322,792 16.8% 19.9% | 157,118,573 60.8% 0.0% |
040-42 Pennsylvania | 47 11 | 13,002,700 2.4% | 1,049,615 8.1% 45.8% | 9,553,417 73.5% -5.4% | 10,353,548 4.5% | 704,258 6.8% 53.4% | 7,884,010 76.1% -2.8% |
050-42017 Bucks County, Pennsylvania | 37 13 | 646,538 3.4% | 39,770 6.2% 48.5% | 521,575 80.7% -4.0% | 515,340 7.0% | 26,025 5.1% 50.0% | 428,133 83.1% 0.4% |
060-4201704976 Bedminster township, Bucks County, Pennsylvania | 23 10 | 7,541 14.7% | 340 4.5% 109.9% | 6,719 89.1% 9.2% | 5,787 17.6% | 208 3.6% 100.0% | 5,257 90.8% 12.9% |
060-4201705616 Bensalem township, Bucks County, Pennsylvania | 59 13 | 62,707 3.8% | 6,683 10.7% 31.3% | 39,585 63.1% -9.1% | 50,705 5.5% | 4,528 8.9% 30.9% | 33,670 66.4% -6.3% |
060-4201708592 Bridgeton township, Bucks County, Pennsylvania | 18 11 | 1,234 -3.4% | 35 2.8% 59.1% | 1,140 92.4% -7.5% | 1,044 -1.9% | 20 1.9% 33.3% | 990 94.8% -4.4% |
060-4201708760 Bristol borough, Bucks County, Pennsylvania | 55 11 | 9,861 1.4% | 1,493 15.1% 8.3% | 6,795 68.9% -5.4% | 7,658 2.2% | 1,009 13.2% 9.6% | 5,650 73.8% -3.6% |
060-4201708768 Bristol township, Bucks County, Pennsylvania | 53 14 | 54,291 -0.5% | 6,166 11.4% 52.6% | 37,820 69.7% -10.4% | 43,119 1.9% | 3,989 9.3% 56.0% | 31,624 73.3% -7.2% |
060-4201709816 Buckingham township, Bucks County, Pennsylvania | 28 13 | 20,851 3.9% | 757 3.6% 54.5% | 18,017 86.4% -2.2% | 16,218 13.2% | 489 3.0% 59.8% | 14,311 88.2% 7.3% |
060-4201712504 Chalfont borough, Bucks County, Pennsylvania | 29 15 | 4,253 6.1% | 164 3.9% 141.2% | 3,619 85.1% -2.7% | 3,331 12.2% | 102 3.1% 121.7% | 2,909 87.3% 4.8% |
060-4201719784 Doylestown borough, Bucks County, Pennsylvania | 25 12 | 8,300 -1.0% | 351 4.2% 105.3% | 7,327 88.3% -6.2% | 7,154 1.4% | 255 3.6% 107.3% | 6,436 90.0% -3.3% |
060-4201719792 Doylestown township, Bucks County, Pennsylvania | 24 9 | 17,971 2.3% | 700 3.9% 44.3% | 15,952 88.8% -1.7% | 14,605 5.6% | 480 3.3% 43.7% | 13,158 90.1% 2.2% |
060-4201720104 Dublin borough, Bucks County, Pennsylvania | 42 16 | 2,177 0.9% | 287 13.2% 48.7% | 1,709 78.5% -8.5% | 1,697 3.4% | 188 11.1% 54.1% | 1,397 82.3% -3.9% |
060-4201720480 Durham township, Bucks County, Pennsylvania | 14 7 | 1,094 -4.4% | 27 2.5% 80.0% | 1,027 93.9% -7.1% | 937 1.8% | 22 2.3% 144.4% | 889 94.9% -1.1% |
060-4201721760 East Rockhill township, Bucks County, Pennsylvania | 19 11 | 5,819 2.0% | 168 2.9% 84.6% | 5,312 91.3% -2.8% | 4,577 7.8% | 109 2.4% 73.0% | 4,220 92.2% 3.1% |
060-4201725112 Falls township, Bucks County, Pennsylvania | 43 14 | 34,716 1.2% | 2,454 7.1% 63.5% | 26,687 76.9% -7.4% | 27,114 2.7% | 1,561 5.8% 66.8% | 21,541 79.4% -5.2% |
060-4201733224 Hayco*ck township, Bucks County, Pennsylvania | 13 6 | 2,200 -1.1% | 39 1.8% 77.3% | 2,065 93.9% -3.6% | 1,898 7.5% | 28 1.5% 86.7% | 1,790 94.3% 4.5% |
060-4201734952 Hilltown township, Bucks County, Pennsylvania | 28 11 | 16,284 8.4% | 774 4.8% 80.8% | 13,980 85.9% 2.4% | 12,665 13.6% | 477 3.8% 91.6% | 11,137 87.9% 8.3% |
060-4201736192 Hulmeville borough, Bucks County, Pennsylvania | 22 9 | 982 -2.1% | 24 2.4% 140.0% | 874 89.0% -6.8% | 764 -0.7% | 12 1.6% 100.0% | 691 90.4% -5.3% |
060-4201737304 Ivyland borough, Bucks County, Pennsylvania | 33 10 | 955 -8.3% | 43 4.5% 72.0% | 791 82.8% -13.5% | 728 -5.9% | 24 3.3% 50.0% | 618 84.9% -10.6% |
060-4201741392 Langhorne borough, Bucks County, Pennsylvania | 28 4 | 1,643 1.3% | 77 4.7% 108.1% | 1,408 85.7% 0.4% | 1,348 2.5% | 45 3.3% 73.1% | 1,179 87.5% 2.0% |
060-4201741416 Langhorne Manor borough, Bucks County, Pennsylvania | 32 12 | 1,496 3.7% | 42 2.8% -10.6% | 1,240 82.9% -4.3% | 1,304 3.7% | 38 2.9% -7.3% | 1,086 83.3% -3.5% |
060-4201744968 Lower Makefield township, Bucks County, Pennsylvania | 34 12 | 33,180 1.9% | 1,223 3.7% 55.4% | 27,261 82.2% -4.5% | 26,127 8.5% | 797 3.1% 57.5% | 21,960 84.1% 2.6% |
060-4201745112 Lower Southampton township, Bucks County, Pennsylvania | 30 14 | 20,599 8.9% | 899 4.4% 72.6% | 17,449 84.7% 0.5% | 16,302 9.2% | 584 3.6% 73.8% | 14,170 86.9% 1.7% |
060-4201749120 Middletown township, Bucks County, Pennsylvania | 34 12 | 46,040 1.3% | 2,226 4.8% 57.8% | 37,864 82.2% -5.6% | 36,988 3.7% | 1,417 3.8% 58.9% | 31,304 84.6% -2.2% |
060-4201749384 Milford township, Bucks County, Pennsylvania | 22 10 | 10,243 3.4% | 339 3.3% 94.8% | 9,127 89.1% -2.0% | 8,099 7.6% | 241 3.0% 127.4% | 7,357 90.8% 2.5% |
060-4201751144 Morrisville borough, Bucks County, Pennsylvania | 65 18 | 9,809 12.4% | 1,340 13.7% 50.9% | 5,624 57.3% -8.8% | 7,707 12.5% | 902 11.7% 53.1% | 4,801 62.3% -6.8% |
060-4201753296 New Britain borough, Bucks County, Pennsylvania | 25 12 | 2,836 -10.0% | 138 4.9% 60.5% | 2,491 87.8% -14.8% | 2,431 -8.5% | 98 4.0% 63.3% | 2,156 88.7% -13.2% |
060-4201753304 New Britain township, Bucks County, Pennsylvania | 29 14 | 12,327 11.4% | 397 3.2% 48.7% | 10,483 85.0% 3.0% | 9,642 15.9% | 274 2.8% 89.0% | 8,365 86.8% 7.6% |
060-4201753712 New Hope borough, Bucks County, Pennsylvania | 32 11 | 2,612 3.3% | 209 8.0% 13.0% | 2,191 83.9% -2.2% | 2,278 8.8% | 170 7.5% 22.3% | 1,963 86.2% 4.4% |
060-4201754184 Newtown borough, Bucks County, Pennsylvania | 17 8 | 2,268 0.9% | 61 2.7% 125.9% | 2,091 92.2% -2.4% | 1,909 8.0% | 41 2.1% 64.0% | 1,777 93.1% 4.9% |
060-4201754192 Newtown township, Bucks County, Pennsylvania | 35 13 | 19,895 3.1% | 631 3.2% 68.3% | 16,201 81.4% -4.4% | 15,789 8.9% | 420 2.7% 72.8% | 13,186 83.5% 1.8% |
060-4201754576 Nockamixon township, Bucks County, Pennsylvania | 16 9 | 3,379 -1.8% | 98 2.9% 69.0% | 3,136 92.8% -5.3% | 2,812 1.1% | 60 2.1% 62.2% | 2,637 93.8% -2.3% |
060-4201754688 Northampton township, Bucks County, Pennsylvania | 22 10 | 39,915 0.5% | 1,097 2.7% 89.1% | 35,559 89.1% -4.4% | 31,419 4.2% | 695 2.2% 87.8% | 28,389 90.4% -0.3% |
060-4201758936 Penndel borough, Bucks County, Pennsylvania | 45 13 | 2,515 8.0% | 230 9.1% 132.3% | 1,901 75.6% -0.3% | 2,016 7.7% | 151 7.5% 98.7% | 1,578 78.3% 0.6% |
060-4201759384 Perkasie borough, Bucks County, Pennsylvania | 23 11 | 9,120 7.2% | 386 4.2% 82.1% | 8,154 89.4% 2.1% | 7,227 11.9% | 224 3.1% 71.0% | 6,604 91.4% 7.5% |
060-4201761616 Plumstead township, Bucks County, Pennsylvania | 30 14 | 14,021 12.7% | 895 6.4% 53.3% | 11,928 85.1% 4.6% | 10,721 20.9% | 534 5.0% 41.6% | 9,402 87.7% 14.6% |
060-4201763048 Quakertown borough, Bucks County, Pennsylvania | 36 13 | 9,359 4.2% | 783 8.4% 45.8% | 7,642 81.7% -3.3% | 7,363 4.8% | 486 6.6% 45.1% | 6,209 84.3% -1.6% |
060-4201764536 Richland township, Bucks County, Pennsylvania | 29 10 | 13,837 6.0% | 750 5.4% 53.1% | 11,877 85.8% 0.6% | 10,715 11.9% | 487 4.5% 70.3% | 9,414 87.9% 7.1% |
060-4201764584 Richlandtown borough, Bucks County, Pennsylvania | 24 12 | 1,353 2.0% | 66 4.9% 57.1% | 1,205 89.1% -3.6% | 1,081 3.5% | 42 3.9% 55.6% | 987 91.3% -0.4% |
060-4201764856 Riegelsville borough, Bucks County, Pennsylvania | 13 7 | 847 -2.4% | 24 2.8% 41.2% | 799 94.3% -4.9% | 688 -2.4% | 22 3.2% 144.4% | 649 94.3% -5.9% |
060-4201769248 Sellersville borough, Bucks County, Pennsylvania | 31 14 | 4,567 7.5% | 257 5.6% 78.5% | 3,878 84.9% -0.3% | 3,592 11.5% | 169 4.7% 76.0% | 3,175 88.4% 5.2% |
060-4201770744 Silverdale borough, Bucks County, Pennsylvania | 16 11 | 805 -7.6% | 29 3.6% 141.7% | 744 92.4% -12.2% | 621 -9.2% | 19 3.1% 137.5% | 586 94.4% -12.1% |
060-4201771752 Solebury township, Bucks County, Pennsylvania | 25 11 | 8,709 0.2% | 295 3.4% 27.7% | 7,651 87.9% -4.6% | 7,127 4.2% | 201 2.8% 32.2% | 6,379 89.5% -0.2% |
060-4201773016 Springfield township, Bucks County, Pennsylvania | 16 9 | 5,175 2.8% | 122 2.4% 60.5% | 4,771 92.2% -1.7% | 4,300 6.2% | 84 2.0% 71.4% | 4,004 93.1% 1.8% |
060-4201776304 Telford borough, Bucks County, Pennsylvania | 39 13 | 2,199 -0.4% | 189 8.6% 45.4% | 1,742 79.2% -7.9% | 1,832 1.6% | 125 6.8% 23.8% | 1,517 82.8% -4.7% |
060-4201776784 Tinicum township, Bucks County, Pennsylvania | 15 4 | 3,818 -4.4% | 89 2.3% 7.2% | 3,556 93.1% -6.1% | 3,305 1.9% | 70 2.1% 34.6% | 3,115 94.3% 0.1% |
060-4201777704 Trumbauersville borough, Bucks County, Pennsylvania | 24 13 | 904 -7.2% | 45 5.0% 50.0% | 809 89.5% -12.9% | 686 -6.8% | 26 3.8% 52.9% | 638 93.0% -9.9% |
060-4201777744 Tullytown borough, Bucks County, Pennsylvania | 31 16 | 2,282 21.9% | 124 5.4% 117.5% | 1,918 84.0% 10.8% | 1,822 23.4% | 88 4.8% 193.3% | 1,564 85.8% 12.4% |
060-4201779128 Upper Makefield township, Bucks County, Pennsylvania | 25 12 | 8,857 8.1% | 215 2.4% 15.6% | 7,752 87.5% 1.8% | 7,054 13.8% | 148 2.1% 27.6% | 6,286 89.1% 8.0% |
060-4201779296 Upper Southampton township, Bucks County, Pennsylvania | 21 11 | 15,269 0.8% | 466 3.1% 89.4% | 13,795 90.3% -3.9% | 12,674 2.7% | 303 2.4% 93.0% | 11,606 91.6% -1.4% |
060-4201780952 Warminster township, Bucks County, Pennsylvania | 37 11 | 33,603 2.8% | 3,084 9.2% 22.5% | 27,293 81.2% -2.9% | 27,659 6.0% | 1,994 7.2% 23.4% | 23,298 84.2% 0.8% |
060-4201781048 Warrington township, Bucks County, Pennsylvania | 41 16 | 25,639 9.5% | 1,652 6.4% 68.9% | 19,873 77.5% -1.7% | 19,825 17.2% | 1,070 5.4% 72.0% | 15,974 80.6% 7.6% |
060-4201781144 Warwick township, Bucks County, Pennsylvania | 28 12 | 14,851 2.9% | 450 3.0% 50.0% | 12,750 85.9% -4.0% | 11,615 9.6% | 272 2.3% 49.5% | 10,199 87.8% 3.6% |
060-4201783960 West Rockhill township, Bucks County, Pennsylvania | 19 9 | 5,439 3.5% | 141 2.6% 95.8% | 4,948 91.0% -0.9% | 4,490 7.2% | 90 2.0% 119.5% | 4,173 92.9% 3.8% |
060-4201786624 Wrightstown township, Bucks County, Pennsylvania | 28 16 | 3,286 9.7% | 82 2.5% 100.0% | 2,801 85.2% -0.2% | 2,570 14.6% | 54 2.1% 92.9% | 2,226 86.6% 5.7% |
060-4201786920 Yardley borough, Bucks County, Pennsylvania | 29 9 | 2,605 7.0% | 114 4.4% 83.9% | 2,244 86.1% 2.8% | 2,201 11.3% | 83 3.8% 93.0% | 1,932 87.8% 7.3% |
Status of sex offenders in Florida
Source: U.S. Census Bureau
* Because tract and legislative district boundaries have changed in some cases, USA TODAY estimated 2020 tract and legislative district population counts based on their new boundaries for consistency.
Total Population Change
'+feature.properties.total_ypc+'%
'; popupContent += '
More
'; return popupContent;}// thisgeo = 2020-060-4201749120function Gon2Line(val){ if (val['type'] == 'Polygon') { return {"type":"FeatureCollection", "features":[{"type":"Feature", "geometry":{ type: "LineString", coordinates: val['coordinates'][0]}, "properties":{}} ]}; } else { var rd = {"type":"FeatureCollection", "features":[]}; for (let i = 0; i < val['coordinates'].length; i++){ rd["features"].push({"type":"Feature", "id":i, "geometry":{ type: "MultiLineString", coordinates: val['coordinates'][i]}, "properties":{"id":i}}) } return rd; }}mapboxgl.accessToken = 'pk.eyJ1IjoieXB5dW4iLCJhIjoiY2oxcW4ybWhxMDBkMjJxcGVhbDV5cnpzYyJ9.oFQSnOc57xCR7A51OR6-3w';var map = new mapboxgl.Map({ container: 'uscntymap', // container id style: 'mapbox://styles/ypyun/cj83a8ga5abkq2sqpivw3nrzg', //'mapbox://styles/mapbox/streets-v11', // stylesheet location center: [-75.2880, 40.9674], // starting position [lng, lat] zoom: 9, // starting zoom attributionControl: false,});map.addControl(new mapboxgl.AttributionControl({ compact: false, customAttribution:[] }));var stopvar = [[-3,'#FF0014'],[0,'#FF3C14'],[3,'#FF7814'],[6,'#FFB414'],[9,'#C5ED11'],[12,'#8BEB0E'],[15,'#51E80B'],[18,'#18E609'] ];//var G2020_010 = [[[[-125.0011, 24.9493],[-66.9326, 49.5904]]]];var sJSON = {"type":"FeatureCollection", "features":[ {"type":"Feature","geometry": G2020_060_4201704976,"properties":{ "geot__geoid":"4201704976","geot__namelsad":"Bedminster township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201704976","geot__pmk":"2020-060-4201704976","pmk":"060-4201704976","total_ypc":14.7, } }, {"type":"Feature","geometry": G2020_060_4201705616,"properties":{ "geot__geoid":"4201705616","geot__namelsad":"Bensalem township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201705616","geot__pmk":"2020-060-4201705616","pmk":"060-4201705616","total_ypc":3.8, } }, {"type":"Feature","geometry": G2020_060_4201708592,"properties":{ "geot__geoid":"4201708592","geot__namelsad":"Bridgeton township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201708592","geot__pmk":"2020-060-4201708592","pmk":"060-4201708592","total_ypc":-3.4, } }, {"type":"Feature","geometry": G2020_060_4201708760,"properties":{ "geot__geoid":"4201708760","geot__namelsad":"Bristol borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201708760","geot__pmk":"2020-060-4201708760","pmk":"060-4201708760","total_ypc":1.4, } }, {"type":"Feature","geometry": G2020_060_4201708768,"properties":{ "geot__geoid":"4201708768","geot__namelsad":"Bristol township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201708768","geot__pmk":"2020-060-4201708768","pmk":"060-4201708768","total_ypc":-0.5, } }, {"type":"Feature","geometry": G2020_060_4201709816,"properties":{ "geot__geoid":"4201709816","geot__namelsad":"Buckingham township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201709816","geot__pmk":"2020-060-4201709816","pmk":"060-4201709816","total_ypc":3.9, } }, {"type":"Feature","geometry": G2020_060_4201712504,"properties":{ "geot__geoid":"4201712504","geot__namelsad":"Chalfont borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201712504","geot__pmk":"2020-060-4201712504","pmk":"060-4201712504","total_ypc":6.1, } }, {"type":"Feature","geometry": G2020_060_4201719784,"properties":{ "geot__geoid":"4201719784","geot__namelsad":"Doylestown borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201719784","geot__pmk":"2020-060-4201719784","pmk":"060-4201719784","total_ypc":-1.0, } }, {"type":"Feature","geometry": G2020_060_4201719792,"properties":{ "geot__geoid":"4201719792","geot__namelsad":"Doylestown township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201719792","geot__pmk":"2020-060-4201719792","pmk":"060-4201719792","total_ypc":2.3, } }, {"type":"Feature","geometry": G2020_060_4201720104,"properties":{ "geot__geoid":"4201720104","geot__namelsad":"Dublin borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201720104","geot__pmk":"2020-060-4201720104","pmk":"060-4201720104","total_ypc":0.9, } }, {"type":"Feature","geometry": G2020_060_4201720480,"properties":{ "geot__geoid":"4201720480","geot__namelsad":"Durham township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201720480","geot__pmk":"2020-060-4201720480","pmk":"060-4201720480","total_ypc":-4.4, } }, {"type":"Feature","geometry": G2020_060_4201721760,"properties":{ "geot__geoid":"4201721760","geot__namelsad":"East Rockhill township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201721760","geot__pmk":"2020-060-4201721760","pmk":"060-4201721760","total_ypc":2.0, } }, {"type":"Feature","geometry": G2020_060_4201725112,"properties":{ "geot__geoid":"4201725112","geot__namelsad":"Falls township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201725112","geot__pmk":"2020-060-4201725112","pmk":"060-4201725112","total_ypc":1.2, } }, {"type":"Feature","geometry": G2020_060_4201733224,"properties":{ "geot__geoid":"4201733224","geot__namelsad":"Hayco*ck township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201733224","geot__pmk":"2020-060-4201733224","pmk":"060-4201733224","total_ypc":-1.1, } }, {"type":"Feature","geometry": G2020_060_4201734952,"properties":{ "geot__geoid":"4201734952","geot__namelsad":"Hilltown township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201734952","geot__pmk":"2020-060-4201734952","pmk":"060-4201734952","total_ypc":8.4, } }, {"type":"Feature","geometry": G2020_060_4201736192,"properties":{ "geot__geoid":"4201736192","geot__namelsad":"Hulmeville borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201736192","geot__pmk":"2020-060-4201736192","pmk":"060-4201736192","total_ypc":-2.1, } }, {"type":"Feature","geometry": G2020_060_4201737304,"properties":{ "geot__geoid":"4201737304","geot__namelsad":"Ivyland borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201737304","geot__pmk":"2020-060-4201737304","pmk":"060-4201737304","total_ypc":-8.3, } }, {"type":"Feature","geometry": G2020_060_4201741392,"properties":{ "geot__geoid":"4201741392","geot__namelsad":"Langhorne borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201741392","geot__pmk":"2020-060-4201741392","pmk":"060-4201741392","total_ypc":1.3, } }, {"type":"Feature","geometry": G2020_060_4201741416,"properties":{ "geot__geoid":"4201741416","geot__namelsad":"Langhorne Manor borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201741416","geot__pmk":"2020-060-4201741416","pmk":"060-4201741416","total_ypc":3.7, } }, {"type":"Feature","geometry": G2020_060_4201744968,"properties":{ "geot__geoid":"4201744968","geot__namelsad":"Lower Makefield township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201744968","geot__pmk":"2020-060-4201744968","pmk":"060-4201744968","total_ypc":1.9, } }, {"type":"Feature","geometry": G2020_060_4201745112,"properties":{ "geot__geoid":"4201745112","geot__namelsad":"Lower Southampton township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201745112","geot__pmk":"2020-060-4201745112","pmk":"060-4201745112","total_ypc":8.9, } }, {"type":"Feature","geometry": G2020_060_4201749120,"properties":{ "geot__geoid":"4201749120","geot__namelsad":"Middletown township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201749120","geot__pmk":"2020-060-4201749120","pmk":"060-4201749120","total_ypc":1.3, } }, {"type":"Feature","geometry": G2020_060_4201749384,"properties":{ "geot__geoid":"4201749384","geot__namelsad":"Milford township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201749384","geot__pmk":"2020-060-4201749384","pmk":"060-4201749384","total_ypc":3.4, } }, {"type":"Feature","geometry": G2020_060_4201751144,"properties":{ "geot__geoid":"4201751144","geot__namelsad":"Morrisville borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201751144","geot__pmk":"2020-060-4201751144","pmk":"060-4201751144","total_ypc":12.4, } }, {"type":"Feature","geometry": G2020_060_4201753296,"properties":{ "geot__geoid":"4201753296","geot__namelsad":"New Britain borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201753296","geot__pmk":"2020-060-4201753296","pmk":"060-4201753296","total_ypc":-10.0, } }, {"type":"Feature","geometry": G2020_060_4201753304,"properties":{ "geot__geoid":"4201753304","geot__namelsad":"New Britain township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201753304","geot__pmk":"2020-060-4201753304","pmk":"060-4201753304","total_ypc":11.4, } }, {"type":"Feature","geometry": G2020_060_4201753712,"properties":{ "geot__geoid":"4201753712","geot__namelsad":"New Hope borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201753712","geot__pmk":"2020-060-4201753712","pmk":"060-4201753712","total_ypc":3.3, } }, {"type":"Feature","geometry": G2020_060_4201754184,"properties":{ "geot__geoid":"4201754184","geot__namelsad":"Newtown borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201754184","geot__pmk":"2020-060-4201754184","pmk":"060-4201754184","total_ypc":0.9, } }, {"type":"Feature","geometry": G2020_060_4201754192,"properties":{ "geot__geoid":"4201754192","geot__namelsad":"Newtown township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201754192","geot__pmk":"2020-060-4201754192","pmk":"060-4201754192","total_ypc":3.1, } }, {"type":"Feature","geometry": G2020_060_4201754576,"properties":{ "geot__geoid":"4201754576","geot__namelsad":"Nockamixon township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201754576","geot__pmk":"2020-060-4201754576","pmk":"060-4201754576","total_ypc":-1.8, } }, {"type":"Feature","geometry": G2020_060_4201754688,"properties":{ "geot__geoid":"4201754688","geot__namelsad":"Northampton township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201754688","geot__pmk":"2020-060-4201754688","pmk":"060-4201754688","total_ypc":0.5, } }, {"type":"Feature","geometry": G2020_060_4201758936,"properties":{ "geot__geoid":"4201758936","geot__namelsad":"Penndel borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201758936","geot__pmk":"2020-060-4201758936","pmk":"060-4201758936","total_ypc":8.0, } }, {"type":"Feature","geometry": G2020_060_4201759384,"properties":{ "geot__geoid":"4201759384","geot__namelsad":"Perkasie borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201759384","geot__pmk":"2020-060-4201759384","pmk":"060-4201759384","total_ypc":7.2, } }, {"type":"Feature","geometry": G2020_060_4201761616,"properties":{ "geot__geoid":"4201761616","geot__namelsad":"Plumstead township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201761616","geot__pmk":"2020-060-4201761616","pmk":"060-4201761616","total_ypc":12.7, } }, {"type":"Feature","geometry": G2020_060_4201763048,"properties":{ "geot__geoid":"4201763048","geot__namelsad":"Quakertown borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201763048","geot__pmk":"2020-060-4201763048","pmk":"060-4201763048","total_ypc":4.2, } }, {"type":"Feature","geometry": G2020_060_4201764536,"properties":{ "geot__geoid":"4201764536","geot__namelsad":"Richland township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201764536","geot__pmk":"2020-060-4201764536","pmk":"060-4201764536","total_ypc":6.0, } }, {"type":"Feature","geometry": G2020_060_4201764584,"properties":{ "geot__geoid":"4201764584","geot__namelsad":"Richlandtown borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201764584","geot__pmk":"2020-060-4201764584","pmk":"060-4201764584","total_ypc":2.0, } }, {"type":"Feature","geometry": G2020_060_4201764856,"properties":{ "geot__geoid":"4201764856","geot__namelsad":"Riegelsville borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201764856","geot__pmk":"2020-060-4201764856","pmk":"060-4201764856","total_ypc":-2.4, } }, {"type":"Feature","geometry": G2020_060_4201769248,"properties":{ "geot__geoid":"4201769248","geot__namelsad":"Sellersville borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201769248","geot__pmk":"2020-060-4201769248","pmk":"060-4201769248","total_ypc":7.5, } }, {"type":"Feature","geometry": G2020_060_4201770744,"properties":{ "geot__geoid":"4201770744","geot__namelsad":"Silverdale borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201770744","geot__pmk":"2020-060-4201770744","pmk":"060-4201770744","total_ypc":-7.6, } }, {"type":"Feature","geometry": G2020_060_4201771752,"properties":{ "geot__geoid":"4201771752","geot__namelsad":"Solebury township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201771752","geot__pmk":"2020-060-4201771752","pmk":"060-4201771752","total_ypc":0.2, } }, {"type":"Feature","geometry": G2020_060_4201773016,"properties":{ "geot__geoid":"4201773016","geot__namelsad":"Springfield township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201773016","geot__pmk":"2020-060-4201773016","pmk":"060-4201773016","total_ypc":2.8, } }, {"type":"Feature","geometry": G2020_060_4201776304,"properties":{ "geot__geoid":"4201776304","geot__namelsad":"Telford borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201776304","geot__pmk":"2020-060-4201776304","pmk":"060-4201776304","total_ypc":-0.4, } }, {"type":"Feature","geometry": G2020_060_4201776784,"properties":{ "geot__geoid":"4201776784","geot__namelsad":"Tinicum township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201776784","geot__pmk":"2020-060-4201776784","pmk":"060-4201776784","total_ypc":-4.4, } }, {"type":"Feature","geometry": G2020_060_4201777704,"properties":{ "geot__geoid":"4201777704","geot__namelsad":"Trumbauersville borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201777704","geot__pmk":"2020-060-4201777704","pmk":"060-4201777704","total_ypc":-7.2, } }, {"type":"Feature","geometry": G2020_060_4201777744,"properties":{ "geot__geoid":"4201777744","geot__namelsad":"Tullytown borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201777744","geot__pmk":"2020-060-4201777744","pmk":"060-4201777744","total_ypc":21.9, } }, {"type":"Feature","geometry": G2020_060_4201779128,"properties":{ "geot__geoid":"4201779128","geot__namelsad":"Upper Makefield township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201779128","geot__pmk":"2020-060-4201779128","pmk":"060-4201779128","total_ypc":8.1, } }, {"type":"Feature","geometry": G2020_060_4201779296,"properties":{ "geot__geoid":"4201779296","geot__namelsad":"Upper Southampton township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201779296","geot__pmk":"2020-060-4201779296","pmk":"060-4201779296","total_ypc":0.8, } }, {"type":"Feature","geometry": G2020_060_4201780952,"properties":{ "geot__geoid":"4201780952","geot__namelsad":"Warminster township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201780952","geot__pmk":"2020-060-4201780952","pmk":"060-4201780952","total_ypc":2.8, } }, {"type":"Feature","geometry": G2020_060_4201781048,"properties":{ "geot__geoid":"4201781048","geot__namelsad":"Warrington township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201781048","geot__pmk":"2020-060-4201781048","pmk":"060-4201781048","total_ypc":9.5, } }, {"type":"Feature","geometry": G2020_060_4201781144,"properties":{ "geot__geoid":"4201781144","geot__namelsad":"Warwick township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201781144","geot__pmk":"2020-060-4201781144","pmk":"060-4201781144","total_ypc":2.9, } }, {"type":"Feature","geometry": G2020_060_4201783960,"properties":{ "geot__geoid":"4201783960","geot__namelsad":"West Rockhill township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201783960","geot__pmk":"2020-060-4201783960","pmk":"060-4201783960","total_ypc":3.5, } }, {"type":"Feature","geometry": G2020_060_4201786624,"properties":{ "geot__geoid":"4201786624","geot__namelsad":"Wrightstown township, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201786624","geot__pmk":"2020-060-4201786624","pmk":"060-4201786624","total_ypc":9.7, } }, {"type":"Feature","geometry": G2020_060_4201786920,"properties":{ "geot__geoid":"4201786920","geot__namelsad":"Yardley borough, Bucks County, Pennsylvania","geot__sumlevel":"060","geop__pmk":"2010-060-4201786920","geot__pmk":"2020-060-4201786920","pmk":"060-4201786920","total_ypc":7.0, } }, ]};// aaaa map.on('load', function () { var layers = map.getStyle().layers; var firstSymbolId; for (var i = 0; i < layers.length; i++) { if (layers[i].type === 'symbol') { firstSymbolId = layers[i].id; break; } } //map.addSource("CensusSL",{ "type": "geojson", "data":'/media/jsons/census/d/010/010.json' }); "source": "CensusSL", /"filter": ["any",[">=", "total_ypc", 0]], map.addLayer({"id": "census_main_layer", "type": "fill", "source": { "type": "geojson", "data":sJSON }, 'layout': {'visibility': "visible"}, "paint": {'fill-color': {property: 'total_ypc', stops: stopvar},'fill-opacity':0.8, 'fill-outline-color': '#666666',}}, firstSymbolId); map.on('click', 'census_main_layer', function (e) {new mapboxgl.Popup({ offset: 14 }).setLngLat(e.lngLat).setHTML(onCensusAllFeature(e.features[0])).addTo(map);}); map.on('mouseenter', 'census_main_layer', function () {map.getCanvas().style.cursor = 'pointer';}); map.on('mouseleave', 'census_main_layer', function () {map.getCanvas().style.cursor = '';}); if (typeof G2010_060_4201749120 !== 'undefined') { map.addLayer({'id': 'areaOldBoundary', 'type': 'line', 'source': { "type": "geojson", "data":Gon2Line(G2010_060_4201749120) }, 'layout': { 'line-join': 'round', 'line-cap': 'round' }, 'paint': { 'line-color': '#500b78', 'line-width': 4 } }, firstSymbolId); } map.addLayer({'id': 'areaBoundary', 'type': 'line', 'source': { "type": "geojson", "data":Gon2Line(G2020_060_4201749120) }, 'layout': { 'line-join': 'round', 'line-cap': 'round' }, 'paint': { 'line-color': '#288499', 'line-width': 4 } }, firstSymbolId); }); function getBoundary(ggs){ if (ggs['type'] == 'Polygon'){ return [ggs['coordinates']] } else { return ggs['coordinates'] }}var BounceLine = getBoundary(G2020_060_4201749120); var bounds = new mapboxgl.LngLatBounds();BounceLine.forEach(function(Tpolygon) { Tpolygon.forEach(function(Tline){ Tline.forEach(function(Tpoint){bounds.extend(Tpoint); }) }) });//plvb: dcg object (2020-060-4201749120)map.fitBounds(bounds, { padding: 120 });map.addControl(new mapboxgl.NavigationControl(), 'top-left');