Wolfram
Mathematica
8의 신기능: Import 및 Export 형식
◄
이전
|
다음
►
응용 분야
웹 서비스에서 JSON 파일 가져오기
다음은 일리노이 샴페인 구획에서 매사추세츠 보스턴 사이의 표고 데이터 포인트를 포함한 Google 지도 웹 서비스에서 JSON 파일을 가져온 것입니다.
In[1]:=
X
elevationData = Import[ "http://maps.googleapis.com/maps/api/elevation/json?path=40.1130,-\ 88.2611|42.3216,-71.0891&samples=500&sensor=false", "JSON"]; ListPlot[Cases[elevationData, HoldPattern["elevation" -> value_] :> value, Infinity], Joined -> True, ColorFunction -> ColorData["LightTerrain"], PlotStyle -> Thick, AxesLabel -> {None, "Elevation in Meters"}, Ticks -> {{{0, "Champaign, IL", {0, .01}}, {500, "Boston, MA", {0, .01}}}, Automatic}]
Out[1]=