Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
test data for d3partition
{
"options": {
"radius": "7.2",
"stackHeight": "15",
"fontSize": "12",
"gap": "1.8",
"root": "d3 zoom partition chart"
},
"data": {
"label": "d3 zoom partition chart",
"children": [
{
"label": "Presidents",
"median income": 50173.7129032258,
"color": "#85E9A6",
"children": [
{
"label": "were born here",
"median income": 51194.2,
"color": "#7EE7A1",
"children": [
{
"label": "Arkansas(1 presidents,2.9m people ,$38.4k med income)",
"median income": 38413,
"color": "#D7FDE4",
"population": 2889450,
"children": [
{
"label": "no presidents born in Kansas",
"size": 2818747,
"color": "#95EDB2"
},
{
"label": "Clinton, William Jefferson:42 - (1993-2001)",
"size": 2889450,
"color": "#D7FDE4"
}
]
},
{
"label": "California(1 presidents,37.m people ,$57.7k med income)",
"median income": 57664,
"color": "#51DD80",
"population": 36961664,
"children": [
{
"label": "Nixon, Richard Milhous:37 - (1969-1974)",
"size": 36961664,
"color": "#51DD80"
}
]
},
{
"label": "Connecticut(1 presidents,3.5m people ,$64.3k med income)",
"median income": 64321,
"color": "#22D25D",
"population": 3518288,
"children": [
{
"label": "Bush, George Walker:43 - (2001-2009)",
"size": 3518288,
"color": "#22D25D"
}
]
},
{
"label": "Georgia(1 presidents,9.8m people ,$46.3k med income)",
"median income": 46252,
"color": "#A0F0BB",
"population": 9829211,
"children": [
{
"label": "Carter, James Earl Jr.:39 - (1977-1981)",
"size": 9829211,
"color": "#A0F0BB"
}
]
},
{
"label": "Illinois(1 presidents,12.9m people ,$53.k med income)",
"median income": 52967,
"color": "#71E498",
"population": 12910409,
"children": [
{
"label": "Reagan, Ronald Wilson:40 - (1981-1989)",
"size": 12910409,
"color": "#71E498"
}
]
},
{
"label": "Iowa(1 presidents,3.m people ,$48.k med income)",
"median income": 48031,
"color": "#94EDB2",
"population": 3007856,
"children": [
{
"label": "Hoover, Herbert Clark:31 - (1929-1933)",
"size": 3007856,
"color": "#94EDB2"
}
]
},
{
"label": "Kentucky(1 presidents,4.3m people ,$40.1k med income)",
"median income": 40089,
"color": "#CBFADB",
"population": 4314113,
"children": [
{
"label": "Lincoln, Abraham:16 - (1861-1865)",
"size": 4314113,
"color": "#CBFADB"
}
]
},
{
"label": "Massachusetts(4 presidents,6.6m people ,$62.1k med income)",
"median income": 62133,
"color": "#31D568",
"population": 6593587,
"children": [
{
"label": "Adams, John:02 - (1797-1801)",
"size": 1648396.75,
"color": "#31D568"
},
{
"label": "Adams, John Quincy:06 - (1825-1829)",
"size": 1648396.75,
"color": "#31D568"
},
{
"label": "Kennedy, John Fitzgerald:35 - (1961-1963)",
"size": 1648396.75,
"color": "#31D568"
},
{
"label": "Bush, George Herbert Walker:41 - (1989-1993)",
"size": 1648396.75,
"color": "#31D568"
}
]
},
{
"label": "Missouri(1 presidents,6.m people ,$44.3k med income)",
"median income": 44306,
"color": "#AEF3C5",
"population": 5987580,
"children": [
{
"label": "Truman, Harry:33 - (1945-1953)",
"size": 5987580,
"color": "#AEF3C5"
}
]
},
{
"label": "Nebraska(1 presidents,1.8m people ,$48.4k med income)",
"median income": 48415,
"color": "#91ECB0",
"population": 1796619,
"children": [
{
"label": "Ford, Gerald Rudolph:38 - (1974-1977)",
"size": 1796619,
"color": "#91ECB0"
}
]
},
{
"label": "New Hampshire(1 presidents,1.3m people ,$60.9k med income)",
"median income": 60917,
"color": "#3AD76F",
"population": 1324575,
"children": [
{
"label": "Pierce, Franklin:14 - (1853-1857)",
"size": 1324575,
"color": "#3AD76F"
}
]
},
{
"label": "New Jersey(2 presidents,8.7m people ,$67.7k med income)",
"median income": 67719,
"color": "#0ACC4B",
"population": 8707739,
"children": [
{
"label": "Cleveland, Grover:24 - (1893-1897)",
"size": 4353869.5,
"color": "#0ACC4B"
}
]
},
{
"label": "New York(4 presidents,19.5m people ,$54.k med income)",
"median income": 54047,
"color": "#6AE392",
"population": 19541453,
"children": [
{
"label": "Van Buren, Martin:08 - (1837-1841)",
"size": 4885363.25,
"color": "#6AE392"
},
{
"label": "Fillmore, Millard:13 - (1850-1853)",
"size": 4885363.25,
"color": "#6AE392"
},
{
"label": "Roosevelt, Theodore:26 - (1901-1909)",
"size": 4885363.25,
"color": "#6AE392"
},
{
"label": "Roosevelt, Franklin Delano:32 - (1933-1945)",
"size": 4885363.25,
"color": "#6AE392"
}
]
},
{
"label": "North Carolina(2 presidents,9.4m people ,$43.4k med income)",
"median income": 43417,
"color": "#B4F4CA",
"population": 9380884,
"children": [
{
"label": "Polk, James Knox:11 - (1845-1849)",
"size": 4690442,
"color": "#B4F4CA"
},
{
"label": "Johnson, Andrew:17 - (1865-1869)",
"size": 4690442,
"color": "#B4F4CA"
}
]
},
{
"label": "Ohio(7 presidents,11.5m people ,$45.2k med income)",
"median income": 45151,
"color": "#A8F1C1",
"population": 11542645,
"children": [
{
"label": "Grant, Ulysses S.:18 - (1869-1877)",
"size": 1648949.28571429,
"color": "#A8F1C1"
},
{
"label": "Hayes, Rutherford Birchard:19 - (1877-1881)",
"size": 1648949.28571429,
"color": "#A8F1C1"
},
{
"label": "Garfield, James Abram:20 - (1881)",
"size": 1648949.28571429,
"color": "#A8F1C1"
},
{
"label": "Harrison, Benjamin:23 - (1889-1893)",
"size": 1648949.28571429,
"color": "#A8F1C1"
},
{
"label": "McKinley, William:25 - (1897-1901)",
"size": 1648949.28571429,
"color": "#A8F1C1"
},
{
"label": "Taft, William Howard:27 - (1909-1913)",
"size": 1648949.28571429,
"color": "#A8F1C1"
},
{
"label": "Harding, Warren Gamaliel:29 - (1921-1923)",
"size": 1648949.28571429,
"color": "#A8F1C1"
}
]
},
{
"label": "Pennsylvania(1 presidents,12.6m people ,$49.2k med income)",
"median income": 49245,
"color": "#8BEBAB",
"population": 12604767,
"children": [
{
"label": "Buchanan, James:15 - (1857-1861)",
"size": 12604767,
"color": "#8BEBAB"
}
]
},
{
"label": "South Carolina(1 presidents,4.6m people ,$42.1k med income)",
"median income": 42117,
"color": "#BDF6D0",
"population": 4561242,
"children": [
{
"label": "Jackson, Andrew:07 - (1829-1837)",
"size": 4561242,
"color": "#BDF6D0"
}
]
},
{
"label": "Texas(2 presidents,24.8m people ,$48.6k med income)",
"median income": 48622,
"color": "#90ECAF",
"population": 24782302,
"children": [
{
"label": "Eisenhower, Dwight David:34 - (1953-1961)",
"size": 12391151,
"color": "#90ECAF"
},
{
"label": "Johnson, Lyndon Baines:36 - (1963-1969)",
"size": 12391151,
"color": "#90ECAF"
}
]
},
{
"label": "Vermont(2 presidents,0.6m people ,$49.4k med income)",
"median income": 49393,
"color": "#8AEAAB",
"population": 621760,
"children": [
{
"label": "Arthur, Chester Alan:21 - (1881-1885)",
"size": 310880,
"color": "#8AEAAB"
},
{
"label": "Coolidge, Calvin:30 - (1923-1929)",
"size": 310880,
"color": "#8AEAAB"
}
]
},
{
"label": "Virginia(8 presidents,7.9m people ,$60.7k med income)",
"median income": 60665,
"color": "#3CD870",
"population": 7882590,
"children": [
{
"label": "Washington, George:01 - (1789-1797)",
"size": 985323.75,
"color": "#3CD870"
},
{
"label": "Jefferson, Thomas:03 - (1801-1809)",
"size": 985323.75,
"color": "#3CD870"
},
{
"label": "Madison, James:04 - (1809-1817)",
"size": 985323.75,
"color": "#3CD870"
},
{
"label": "Monroe, James:05 - (1817-1825)",
"size": 985323.75,
"color": "#3CD870"
},
{
"label": "Harrison, William Henry:09 - (1841)",
"size": 985323.75,
"color": "#3CD870"
},
{
"label": "Tyler, John:10 - (1841-1845)",
"size": 985323.75,
"color": "#3CD870"
},
{
"label": "Taylor, Zachary:12 - (1849-1850)",
"size": 985323.75,
"color": "#3CD870"
},
{
"label": "Wilson, Woodrow:28 - (1913-1921)",
"size": 985323.75,
"color": "#3CD870"
}
]
}
]
},
{
"label": "were not born here",
"median income": 49153.2258064516,
"color": "#8CEBAC",
"children": [
{
"label": "Alabama(0 presidents,4.7m people ,$40.5k med income)",
"median income": 40538,
"color": "#C8F9D9",
"population": 4708708,
"children": [
{
"label": "no presidents born in Alabama",
"size": 4708708,
"color": "#C8F9D9"
}
]
},
{
"label": "Alaska(0 presidents,0.7m people ,$63.5k med income)",
"median income": 63456,
"color": "#28D361",
"population": 698473,
"children": [
{
"label": "no presidents born in Alaska",
"size": 698473,
"color": "#28D361"
}
]
},
{
"label": "Arizona(0 presidents,6.6m people ,$46.8k med income)",
"median income": 46787,
"color": "#9DEFB8",
"population": 6595778,
"children": [
{
"label": "no presidents born in Arizona",
"size": 6595778,
"color": "#9DEFB8"
}
]
},
{
"label": "Colorado(0 presidents,5.m people ,$54.4k med income)",
"median income": 54411,
"color": "#67E290",
"population": 5024748,
"children": [
{
"label": "no presidents born in Colorado",
"size": 5024748,
"color": "#67E290"
}
]
},
{
"label": "Delaware(0 presidents,0.9m people ,$56.2k med income)",
"median income": 56172,
"color": "#5BDF87",
"population": 885122,
"children": [
{
"label": "no presidents born in Delaware",
"size": 885122,
"color": "#5BDF87"
}
]
},
{
"label": "District of Columbia(0 presidents,0.6m people ,$60.7k med income)",
"median income": 60729,
"color": "#3BD870",
"population": 599657,
"children": [
{
"label": "no presidents born in District of Columbia",
"size": 599657,
"color": "#3BD870"
}
]
},
{
"label": "Florida(0 presidents,18.5m people ,$44.4k med income)",
"median income": 44390,
"color": "#ADF3C5",
"population": 18537969,
"children": [
{
"label": "no presidents born in Florida",
"size": 18537969,
"color": "#ADF3C5"
}
]
},
{
"label": "Hawaii(0 presidents,1.3m people ,$62.8k med income)",
"median income": 62774,
"color": "#2DD465",
"population": 1295178,
"children": [
{
"label": "no presidents born in Hawaii",
"size": 1295178,
"color": "#2DD465"
},
{
"label": "Obama, Barack Hussein:44 - (2009-present)",
"size": 62774,
"color": "#2DD465"
}
]
},
{
"label": "Idaho(0 presidents,1.5m people ,$43.3k med income)",
"median income": 43259,
"color": "#B5F5CA",
"population": 1545801,
"children": [
{
"label": "no presidents born in Idaho",
"size": 1545801,
"color": "#B5F5CA"
}
]
},
{
"label": "Indiana(0 presidents,6.4m people ,$44.6k med income)",
"median income": 44616,
"color": "#ACF2C3",
"population": 6423113,
"children": [
{
"label": "no presidents born in Indiana",
"size": 6423113,
"color": "#ACF2C3"
}
]
},
{
"label": "Kansas(0 presidents,2.8m people ,$47.9k med income)",
"median income": 47888,
"color": "#95EDB2",
"population": 2818747
},
{
"label": "Louisiana(0 presidents,4.5m people ,$42.5k med income)",
"median income": 42510,
"color": "#BAF6CE",
"population": 4492076,
"children": [
{
"label": "no presidents born in Louisiana",
"size": 4492076,
"color": "#BAF6CE"
}
]
},
{
"label": "Maine(0 presidents,1.3m people ,$45.9k med income)",
"median income": 45882,
"color": "#A3F0BD",
"population": 1318301,
"children": [
{
"label": "no presidents born in Maine",
"size": 1318301,
"color": "#A3F0BD"
}
]
},
{
"label": "Maryland(0 presidents,5.7m people ,$68.9k med income)",
"median income": 68933,
"color": "#02CA45",
"population": 5699478,
"children": [
{
"label": "no presidents born in Maryland",
"size": 5699478,
"color": "#02CA45"
}
]
},
{
"label": "Michigan(0 presidents,10.m people ,$45.4k med income)",
"median income": 45354,
"color": "#A7F1C0",
"population": 9969727,
"children": [
{
"label": "no presidents born in Michigan",
"size": 9969727,
"color": "#A7F1C0"
}
]
},
{
"label": "Minnesota(0 presidents,5.3m people ,$55.4k med income)",
"median income": 55422,
"color": "#60E08B",
"population": 5266214,
"children": [
{
"label": "no presidents born in Minnesota",
"size": 5266214,
"color": "#60E08B"
}
]
},
{
"label": "Mississippi(0 presidents,3.m people ,$37.k med income)",
"median income": 36992,
"color": "#E1FFEB",
"population": 2951996,
"children": [
{
"label": "no presidents born in Mississippi",
"size": 2951996,
"color": "#E1FFEB"
}
]
},
{
"label": "Montana(0 presidents,1.m people ,$42.3k med income)",
"median income": 42303,
"color": "#BCF6CF",
"population": 974989,
"children": [
{
"label": "no presidents born in Montana",
"size": 974989,
"color": "#BCF6CF"
}
]
},
{
"label": "Nevada(0 presidents,2.6m people ,$51.k med income)",
"median income": 50987,
"color": "#7FE8A2",
"population": 2643085,
"children": [
{
"label": "no presidents born in Nevada",
"size": 2643085,
"color": "#7FE8A2"
}
]
},
{
"label": "New Mexico(0 presidents,2.m people ,$42.2k med income)",
"median income": 42186,
"color": "#BDF6D0",
"population": 2009671,
"children": [
{
"label": "no presidents born in New Mexico",
"size": 2009671,
"color": "#BDF6D0"
}
]
},
{
"label": "North Dakota(0 presidents,0.6m people ,$48.9k med income)",
"median income": 48878,
"color": "#8EEBAD",
"population": 646844,
"children": [
{
"label": "no presidents born in North Dakota",
"size": 646844,
"color": "#8EEBAD"
}
]
},
{
"label": "Oklahoma(0 presidents,3.7m people ,$42.1k med income)",
"median income": 42076,
"color": "#BEF7D1",
"population": 3687050,
"children": [
{
"label": "no presidents born in Oklahoma",
"size": 3687050,
"color": "#BEF7D1"
}
]
},
{
"label": "Oregon(0 presidents,3.8m people ,$46.5k med income)",
"median income": 46536,
"color": "#9EEFB9",
"population": 3825657,
"children": [
{
"label": "no presidents born in Oregon",
"size": 3825657,
"color": "#9EEFB9"
}
]
},
{
"label": "Rhode Island(0 presidents,1.1m people ,$52.1k med income)",
"median income": 52053,
"color": "#78E69D",
"population": 1053209,
"children": [
{
"label": "no presidents born in Rhode Island",
"size": 1053209,
"color": "#78E69D"
}
]
},
{
"label": "South Dakota(0 presidents,0.8m people ,$45.9k med income)",
"median income": 45861,
"color": "#A3F0BD",
"population": 812383,
"children": [
{
"label": "no presidents born in South Dakota",
"size": 812383,
"color": "#A3F0BD"
}
]
},
{
"label": "Tennessee(0 presidents,6.3m people ,$41.5k med income)",
"median income": 41461,
"color": "#C2F8D4",
"population": 6296254,
"children": [
{
"label": "no presidents born in Tennessee",
"size": 6296254,
"color": "#C2F8D4"
}
]
},
{
"label": "Utah(0 presidents,2.8m people ,$54.7k med income)",
"median income": 54740,
"color": "#65E28F",
"population": 2784572,
"children": [
{
"label": "no presidents born in Utah",
"size": 2784572,
"color": "#65E28F"
}
]
},
{
"label": "Washington(0 presidents,6.7m people ,$55.6k med income)",
"median income": 55584,
"color": "#5FE08A",
"population": 6664195,
"children": [
{
"label": "no presidents born in Washington",
"size": 6664195,
"color": "#5FE08A"
}
]
},
{
"label": "West Virginia(0 presidents,1.8m people ,$38.2k med income)",
"median income": 38241,
"color": "#D8FDE5",
"population": 1819777,
"children": [
{
"label": "no presidents born in West Virginia",
"size": 1819777,
"color": "#D8FDE5"
}
]
},
{
"label": "Wisconsin(0 presidents,5.7m people ,$49.k med income)",
"median income": 48974,
"color": "#8DEBAD",
"population": 5654774,
"children": [
{
"label": "no presidents born in Wisconsin",
"size": 5654774,
"color": "#8DEBAD"
}
]
},
{
"label": "Wyoming(0 presidents,0.5m people ,$53.8k med income)",
"median income": 53757,
"color": "#6CE394",
"population": 544270,
"children": [
{
"label": "no presidents born in Wyoming",
"size": 544270,
"color": "#6CE394"
}
]
}
]
}
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.