Mapbox Jupyter不会渲染ChoroplethViz

时间:2019-06-21 18:53:56

标签: python jupyter-notebook mapbox

我有以下数据,我正在尝试使用Mapbox Jupyter绘制Choropleth Viz:

Enter Your First Name

data= {"type": "FeatureCollection", "features": [{"id": "0", "type": "Feature", "properties": {"ID": 1, "GRIDCODE": "2"}, "geometry": {"type": "Polygon", "coordinates": [[[-124.19626705829167, 41.99373103107739], [-124.201058326111, 41.9934289837606], [-124.20146339159642, 41.99700317753936], [-124.1990676349445, 41.99715424480156], [-124.1988651589845, 41.99536713917695], [-124.19646944995517, 41.99551814746546], [-124.19626705829167, 41.99373103107739]]]}}, {"id": "1", "type": "Feature", "properties": {"ID": 2, "GRIDCODE": "2"}, "geometry": {"type": "Polygon", "coordinates": [[[-124.15334355886935, 41.99822782049714], [-124.15094750259264, 41.99837788692177], [-124.15074636440538, 41.99659059233919], [-124.15054524444224, 41.99480329641264], [-124.15294116874556, 41.99465324869], [-124.15334355886935, 41.99822782049714]]]}}, {"id": "2", "type": "Feature", "properties": {"ID": 3, "GRIDCODE": "2"}, "geometry": {"type": "Polygon", "coordinates": [[[-124.13377326465698, 41.99585224227081], [-124.13856534983393, 41.995552791357824], [-124.13876613984962, 41.99734013399236], [-124.13397392268034, 41.99763960356722], [-124.13377326465698, 41.99585224227081]]]}}, {"id": "3", "type": "Feature", "properties": {"ID": 4, "GRIDCODE": "4"}, "geometry": {"type": "Polygon", "coordinates": [[[-124.13137719480609, 41.996001893351924], [-124.13377326465698, 41.99585224227081], [-124.13397392268034, 41.99763960356722], [-124.13157778683046, 41.99778926397471], [-124.13137719480609, 41.996001893351924]]]}}, {"id": "4", "type": "Feature", "properties": {"ID": 5, "GRIDCODE": "5"}, "geometry": {"type": "Polygon", "coordinates": [[[-124.12898110678809, 41.996151494848036], [-124.13137719480609, 41.996001893351924], [-124.13157778683046, 41.99778926397471], [-124.12918163281154, 41.99793887479414], [-124.12898110678809, 41.996151494848036]]]}}, {"id": "5", "type": "Feature", "properties": {"ID": 6, "GRIDCODE": "2"}, "geometry": {"type": "Polygon", "coordinates": [[[-124.131176620957, 41.99421452138939], [-124.13357262481475, 41.99406487963413], [-124.13377326465698, 41.99585224227081], [-124.13137719480609, 41.996001893351924], [-124.131176620957, 41.99421452138939]]]}}, {"id": "6", "type": "Feature", "properties": {"ID": 7, "GRIDCODE": "3"}, "geometry": {"type": "Polygon", "coordinates": [[[-124.12878059893404, 41.994364113562696], [-124.131176620957, 41.99421452138939], [-124.13137719480609, 41.996001893351924], [-124.12898110678809, 41.996151494848036], [-124.12878059893404, 41.994364113562696]]]}}, {"id": "7", "type": "Feature", "properties": {"ID": 8, "GRIDCODE": "4"}, "geometry": {"type": "Polygon", "coordinates": [[[-124.12878059893404, 41.994364113562696], [-124.12898110678809, 41.996151494848036], [-124.12418887627409, 41.99645054908096], [-124.12398850041586, 41.99466314915913], [-124.12878059893404, 41.994364113562696]]]}}, {"id": "8", "type": "Feature", "properties": {"ID": 9, "GRIDCODE": "3"}, "geometry": {"type": "Polygon", "coordinates": [[[-124.12618413505629, 41.992726264209224], [-124.12858010924755, 41.992576730938204], [-124.12878059893404, 41.994364113562696], [-124.12398850041586, 41.99466314915913], [-124.12418887627409, 41.99645054908096], [-124.12179273378982, 41.99660000181562], [-124.12159242393231, 41.99481259258014], [-124.11919632930696, 41.9949619864149], [-124.1189961035962, 41.99317456653169], [-124.12618413505629, 41.992726264209224]]]}}, {"id": "9", "type": "Feature", "properties": {"ID": 10, "GRIDCODE": "2"}, "geometry": {"type": "Polygon", "coordinates": [[[-124.02254750546336, 41.99374589981529], [-124.024944056708, 41.993598527051816], [-124.02514165333511, 41.99538631160286], [-124.02274503603581, 41.99553369355296], [-124.02254750546336, 41.99374589981529]]]}}]}

输出如下所示为空。

enter image description here

当我使用http://geojson.io

尝试相同的数据时

我得到以下输出。

enter image description here

在Mapbox中绘图时我会丢失某些东西吗?

任何帮助将不胜感激。谢谢。

0 个答案:

没有答案