Skip to content

sammyfung/hk0weather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hk0weather codecov

hk0weather

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).

Available Web Crawlers

  1. hkoweather: Hong Kong Regional Weather Data in 10-minutes update from HKO.
  2. hkoforecast: Hong Kong Weather Forecast Data from HKO Open Data including next 24 hours and 9 day.
  3. rainfall: Hong Kong Rainfall Data in hourly update from HKO.

Installation

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    

Run a Scrapy spider

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

References

About

Web scraper for Hong Kong weather data from HKO website

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published