前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >利用Mathematica 查看天气预报~~~

利用Mathematica 查看天气预报~~~

作者头像
WolframChina
发布2018-05-31 17:24:28
6380
发布2018-05-31 17:24:28
举报
文章被收录于专栏:WOLFRAMWOLFRAM

查看天气得最新预报,定位到你想查看的地方得天气,点击get weather个人觉得这个功能真是给跪了

Manipulate[

Column[{

Show[Graphics[{LightGray, EdgeForm[Gray],

CountryData["World", {"Shape", "Equirectangular"}][[1]]}],

ImageSize -> 590, Axes -> True], panel}], {{panel, ""},

ControlType -> None},

{{pos, {0, 0}}, {-180, -90}, {180, 90}, Locator},

Button["get weather",

Block[{station = WeatherData[Reverse@pos, "StationName"]},

pos = Reverse@WeatherData[station, "Coordinates"];

panel =

Text@Grid[{{"temperature: ", WeatherData[station, "Temperature"],

WeatherData[station, "Temperature",

"UnitsName"]}, {"wind speed: ",

WeatherData[station, "WindSpeed"],

WeatherData[station, "WindSpeed",

"UnitsName"]}, {"pressure: ",

WeatherData[station, "Pressure"],

WeatherData[station, "Pressure",

"UnitsName"]}, {"weather station: ", station,

""}} /. _Missing -> "not known", Frame -> All]],

Method -> "Queued"],

SynchronousUpdating -> False]

————————By Wolfram 官网

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2015-02-02,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 WOLFRAM 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档