Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zxdawn/nmc-crawler
Download figures from National Meteorological Center, China (NMC) website
https://github.com/zxdawn/nmc-crawler
meteorology nmc weather-data
Last synced: 9 days ago
JSON representation
Download figures from National Meteorological Center, China (NMC) website
- Host: GitHub
- URL: https://github.com/zxdawn/nmc-crawler
- Owner: zxdawn
- License: gpl-3.0
- Created: 2019-05-19T08:20:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-15T06:53:09.000Z (almost 5 years ago)
- Last Synced: 2024-06-11T17:41:39.571Z (5 months ago)
- Topics: meteorology, nmc, weather-data
- Language: Python
- Homepage: http://www.nmc.cn/
- Size: 734 KB
- Stars: 4
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nmc-crawler
## What is it?Script of downloading figures from NMC website: http://www.nmc.cn/
Currently, this script supports downloading **weathercharts** and **radar** figures.
## Usage
Download or clone the repository first
```
git clone https://github.com/zxdawn/nmc-crawler.git
```Check the help information
```
python nmc_crawler.py --help
```
```
Usage: nmc_crawler.py [OPTIONS]Download weathercharts and radar figures from NMC.
Contact:
[email protected]Options:
-k, --kind [radar|weatherchart|ltng]
Kind of data [required]
-a, --area [all|region|station]
Region of maps:
For weatherchart and ltng,
you don't
need to specify this parameter.
[default: region]
-r, --resolution [medium|small]
Resolution of figures [default: medium]
-s, --savepath TEXT Savepath of figures [default: ./]
-v, --verbose INTEGER verbose level [default: 0]
--help Show this message and exit.
```Run the script at the background every hour:
```
nohup bash -c "while true; do python -u nmc_crawler.py -k radar; sleep 3600; done" > radar.log 2>&1 &
```## Brief example
1. Download regional radar figures:
![radar_1](https://github.com/zxdawn/nmc-crawler/raw/master/examples/radar_1.gif)
2. Download radar figures of all stations:
![radar_2](https://github.com/zxdawn/nmc-crawler/raw/master/examples/radar_2.gif)
3. Download weathercharts:
![weatherchart](https://github.com/zxdawn/nmc-crawler/raw/master/examples/weatherchart.gif)
4. Download lightning figures## Directory structure
```
├── radar
│ ├── region
│ │ ├── chinaall
│ │ │ └── yyyymm
│ │ │ └── mmdd
│ │ ├── dongbei
│ │ │ └── yyyymm
│ │ │ └── mmdd
│ │ ├── huabei
│ │ │ └── yyyymm
│ │ │ └── mmdd
│ │ ├── huadong
│ │ │ └── yyyymm
│ │ │ └── mmdd
│ │ ├── huanan
│ │ │ └── yyyymm
│ │ │ └── mmdd
│ │ ├── huazhong
│ │ │ └── yyyymm
│ │ │ └── mmdd
│ │ ├── xibei
│ │ │ └── yyyymm
│ │ │ └── mmdd
│ │ └── xinan
│ │ └── yyyymm
│ │ └── mmdd
│ └── station
│ ├── jiang-su
│ │ ├── chang-zhou
│ │ ├── huai-an
│ │ ├── lian-yun-gang
│ │ ├── nan-jing
│ │ ├── nan-tong
│ │ ├── tai-zhou
│ │ ├── xu-zhou
│ │ └── yan-cheng
│ ├── liao-ning
│ │ ├── chao-yang
│ │ ├── da-lian
│ │ ├── shen-yang
│ │ └── ying-kou
│ └── ....
└── weatherchart
└── china
└── yyyymm
├── cloud-h000
├── cloud-h100
├── cloud-h200
├── cloud-h500
├── cloud-h700
├── cloud-h850
├── cloud-h925
├── radar-h000
├── radar-h100
├── radar-h200
├── radar-h500
├── radar-h700
├── radar-h850
├── radar-h925
├── weatherchart-h000
├── weatherchart-h100
├── weatherchart-h200
├── weatherchart-h500
├── weatherchart-h700
├── weatherchart-h850
└── weatherchart-h925
```