1
我想使用此D3.js:https://gist.github.com/vgrocha/1580af34e56ee6224d33如何修改此D3.js以接受不同的JSON結構?
目前它只適用於類似於「flare-labeled.json」(在回購中發現)的結構。
但我想使用這樣的結構:
[
{
"ID": "10414713",
"Case Number": "HZ152928",
"Date": "02/16/2016 11:02:00 PM",
"Block": "130XX S ELLIS AVE",
"IUCR": "041A",
"Primary Type": "BATTERY",
"Description": "AGGRAVATED: HANDGUN",
"Location Description": "CHA PARKING LOT/GROUNDS",
"Arrest": "false",
"Domestic": "false",
"Beat": "0533",
"District": "005",
"Ward": "9",
"Community Area": "54",
"FBI Code": "04B",
"X Coordinate": "",
"Y Coordinate": "",
"Year": "2016",
"Updated On": "02/19/2016 03:45:53 PM",
"Latitude": "",
"Longitude": "",
"Location": ""
},
{
"ID": "10414628",
"Case Number": "HZ152506",
"Date": "02/13/2016 11:45:00 PM",
"Block": "017XX W DIVISION ST",
"IUCR": "0890",
"Primary Type": "THEFT",
"Description": "FROM BUILDING",
"Location Description": "TAVERN/LIQUOR STORE",
"Arrest": "false",
"Domestic": "false",
"Beat": "1213",
"District": "012",
"Ward": "1",
"Community Area": "24",
"FBI Code": "06",
"X Coordinate": "1164361",
"Y Coordinate": "1908039",
"Year": "2016",
"Updated On": "02/20/2016 03:53:39 PM",
"Latitude": "41.903278103",
"Longitude": "-87.671706965",
"Location": "(41.903278103, -87.671706965)"
}
]
我想在內環外環和外「位置說明」上的「主要類型」和「說明」 -外環。
這可能嗎?