hk0weather is an open source web scraper project using Scrapy to collect the useful weather data from Hong Kong Observatory website.
Scrapy can output collected weather data into the machine-readable formats (eg. CSV, JSON, XML).
- hkoweather: Hong Kong Regional Weather Data in 10-minutes update from HKO.
- hkoforecast: Hong Kong Weather Forecast Data from HKO Open Data including next 24 hours and 9 day.
- rainfall: Hong Kong Rainfall Data in hourly update from HKO.
Cloning and setup hk0weather in a Py3 virtual environment
$ git clone https://github.com/sammyfung/hk0weather.git
$ cd hk0weather
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
Activate the Py3 virtual environment once before the first running of web spiders.
$ source venv/bin/activate
$ cd hk0weather
Optionally, list all available spiders.
$ scrapy list
Run a regional weather data web crawler and export data to a JSON file.
$ scrapy crawl hkoweather -o hkoweather.json
- The background of this project: 開放源碼香港天氣計劃 hk0weather
- The presentation slide at BarCampHK 2013: From Hk0weather to Open Data