No project description provided
Project description
tsingroc-pymeteo
清鹏智能气象数据Python SDK
安装
pip install tsingroc-pymeteo
使用
from tsingrocpymeteo import Meteo
from shapely.geometry import box
from datetime import datetime
meteo = Meteo(
"<后端服务地址>", "<access key>", "<secret key>"
)
# 创建查询范围,类型为shapely.Polygon
center = (115.875, 27.5)
bbox = box(center[0] - 0.4, center[1] - 0.4, center[0] + 0.4, center[1] + 0.4)
res = meteo.get(
"archive_cn", # 数据表名
None,
"era5", # 气象模型名
bbox,
(datetime(2024, 11, 7, 0, 0, 0, 0), datetime(2024, 11, 8, 0, 0, 0, 0)), # 时间范围
)
print(res)
响应格式如下:
- dict: 查询结果
- table_name (str): 数据表名
- points (List[dict]): 查询结果
- model (str): 气象模型名
- location (str): 坐标点的 WKT 字符串
- data (pd.DataFrame): 查询结果
- cost (dict): 查询耗时
注意事项
表设置为ensemble_cn时,返回结果中data对应的pandas.DataFrame中每个数据都是列表,与其他表返回结果不同,需要自行进行后续处理,如计算均值等。
示例代码:
df = res["points"][0]["data"]
df = df.map(lambda x: sum(x) / len(x) if isinstance(x, list) else x)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tsingroc_pymeteo-0.2.0.tar.gz.
File metadata
- Download URL: tsingroc_pymeteo-0.2.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddd5f372528ac84cd84d717169ebb9e8cbc4fd29b7bc41ffba3049049846a666
|
|
| MD5 |
26e34cee7c66787ba0dd53a46e0cca48
|
|
| BLAKE2b-256 |
d5a080d48306a61dbfe743915d1a835bbfe6b85020d1c061fa8f0f26edb76025
|
Provenance
The following attestation bundles were made for tsingroc_pymeteo-0.2.0.tar.gz:
Publisher:
release-pypi.yml on tsingroc/tsingroc-pymeteo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tsingroc_pymeteo-0.2.0.tar.gz -
Subject digest:
ddd5f372528ac84cd84d717169ebb9e8cbc4fd29b7bc41ffba3049049846a666 - Sigstore transparency entry: 182287219
- Sigstore integration time:
-
Permalink:
tsingroc/tsingroc-pymeteo@3fe700beab3e0c4ec1973fcfd45df4670d57c217 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tsingroc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@3fe700beab3e0c4ec1973fcfd45df4670d57c217 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tsingroc_pymeteo-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tsingroc_pymeteo-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f43be9b57c4cb73ca68e7081e40815dd67d5e926a62887e33568005dda53118f
|
|
| MD5 |
44697642513eea39ebfea82b8f9c026f
|
|
| BLAKE2b-256 |
f1fa550ebc1c9200abfc4e2eee372ec18a2dd1755ee5f1aa1e9d3689b6bb3e23
|
Provenance
The following attestation bundles were made for tsingroc_pymeteo-0.2.0-py3-none-any.whl:
Publisher:
release-pypi.yml on tsingroc/tsingroc-pymeteo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tsingroc_pymeteo-0.2.0-py3-none-any.whl -
Subject digest:
f43be9b57c4cb73ca68e7081e40815dd67d5e926a62887e33568005dda53118f - Sigstore transparency entry: 182287227
- Sigstore integration time:
-
Permalink:
tsingroc/tsingroc-pymeteo@3fe700beab3e0c4ec1973fcfd45df4670d57c217 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tsingroc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@3fe700beab3e0c4ec1973fcfd45df4670d57c217 -
Trigger Event:
push
-
Statement type: