气象数据收集

1、国家气象科学数据中心

预报数据:需要定制,收费10万+

观测数据:国家气象信息中心-中国气象数据网 (cma.cn)icon-default.png?t=N7T8https://data.cma.cn/data/cdcdetail/dataCode/A.0012.0001.html

地面基本气象观测数据

滞后2天

滞后一天

路面数据同化系统,实时

国家气象信息中心-中国气象数据网 (cma.cn)icon-default.png?t=N7T8https://data.cma.cn/data/detail/dataCode/NAFP_CLDAS2.0_RT.html

2、openweatherapi

Сurrent weather and forecast - OpenWeatherMapicon-default.png?t=N7T8https://openweathermap.org/city/1796236openweatherapi访问地球上任何位置的当前天气数据,收集和处理不同来源的天气数据,例如全球和本地天气模型、卫星、雷达、和庞大的气象站网站、数据以JSON、XML或者HTML格式提供。

收费标准:

免费:

API的接口每分钟可以请求60次,一个月请求1,000,000次。当前的天气,3小时预测未来5天的,提供基础的天气地图

start up:30英镑/月

API的接口每分钟可以请求600次,一个月请求10,000,000次。当前的天气,3小时预测未来5天的,一天预测未来16天的,提供基础的天气地图

developer:140英镑/月

API的接口每分钟可以请求3,000次,一个月请求100,000,000次。当天的天气,3小时预测未来5天的,一小时预测未来4天的,一天预测未来16天的,30天气候预报,高级天气图、历史地图

professional:370英镑/月

API的接口每分钟可以请求30,000次,一个月请求1,000,000,000次。当天的天气,3小时预测未来5天的,一小时预测未来4天的,一天预测未来16天的,30天气候预报,批量下载全球各个城市的数据,高级天气图、历史地图全球降水地图

enterprise:1500英镑/月

API的接口每分钟可以请求200,000次,一个月请求5,000,000,000次。当天的天气,3小时预测未来5天的,一小时预测未来4天的,一天预测未来16天的,30天气候预报,批量下载全球各个城市的数据+美国、欧盟、英国,高级天气图、历史地图全球降水地图

注册:

采用免费的API

from tkinter import *
import requests
import json
from datetime import datetime

root =Tk()
root.geometry("400x400")
root.resizable(0,0)
root.title("天气预报APP - 爱看书的小沐")

city_value = StringVar()

def time_format_for_location(utc_with_tz):
    local_time = datetime.utcfromtimestamp(utc_with_tz)
    return local_time.time()

def showWeather():
    #Enter you api key, copies from the OpenWeatherMap dashboard
    api_key = "  API  "  #sample API

    # Get city name from user from the input field (later in the code)
    city_name=city_value.get()

    # API url
    weather_url = 'http://api.openweathermap.org/data/2.5/weather?q=' + city_name + '&appid='+api_key

    # Get the response from fetched url
    response = requests.get(weather_url)

    # changing response from json to python readable
    weather_info = response.json()
    print(weather_info)

    if weather_info['cod'] =
  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值