SlideShare ist ein Scribd-Unternehmen logo
1 von 85
Downloaden Sie, um offline zu lesen
Local Weather
Information
and
GNOME Shell Extension
Sammy Fung
Sammy Fung
● Software Developer
– to use and develop open source
sofware.
– Perl → PHP → Python.
– Interests in data mining / web
scraping.
– Consultant in web technology.
Sammy Fung
● 15+ years in Open Source Communities.
– Founding Chairman, Hong Kong Linux User Group.
– Founding Chairman, Open Source Hong Kong.
– Member, GNOME Asia committee.
– Mozilla Representative in Hong Kong.
– Organize, speak and participate in open source
conferences in East Asia and U.S. in recent years –
Taiwan, Korea, Japan, Malayisa, Singapore, and
Bay Area, CA.
Agenda
● Local Weather Information
– From Local Meteorological Observatories to Open
Data.
● GNOME Shell Extension
– Weather Widgets
Hong Kong Observatory
Weather Underground Hong Kong
Weather Information, China
Central Weather Bureau (CWB),
Taiwan.
Joint Typhoon Warning Centre
(JTWC)
Weather Data
Regional Weather Data, Hong Kong
Open Data
Open Data
Three Laws of Open Government Data by David Eaves.
1.If it can't be spidered or indexed, it doesn't exist.
2.If it isn't available in open and machine readable
format, it can't engage.
3.If a legal framework doesn't allow it to be
repurposed, it doesn't empower.
http://eaves.ca/2009/09/30/three-law-of-open-government-data/
Open Data
● Tim Berners-Lee
– the inventor of the
Web.
– 5stardata.info
● 5 star deployment
scheme of Open Data
suggested by Tim
Berners-Lee.
Five Star Open Data - 5stardata.info
1.make your stuff available on the Web (whatever format)
under an open license.
2.make it available as structured data (e.g., Excel instead of
image scan of a table)
3.use non-proprietary formats (e.g., CSV instead of Excel)
4.use URIs to denote things, so that people can point at your
stuff.
5.link your data to other data to provide context.
5stardata.info by Tim Berners-Lee, the inventor of the Web.
Open Data in Hong Kong
Open Data in Hong Kong
● Data.One
– http://www.gov.hk/en/theme/psi
– released on 2011/3/31.
– First App Competition on Data.One
● Call for Submission now till 2014/02/28.
Weather Information in Hong Kong
● Hong Kong Observatory
– Hourly Hong Kong Weather Report
– Regional Weather in Hong Kong (10 min updates)
– Weather Forecast and Weekly Weather Forecast
– Typhoon Report and Forecast
Hong Kong Observatory RSS
Hong Kong Observatory RSS
Weather at Data.One
● I posted a blog 'Progress of Open
Government Data in Hong Kong' on
2013/01/17.
● Weather at Data.One provides 7 dataset URLs,
returns RSS (XML) format (Eng/TChi/SChi)
– One word: Useless.
– Data.One dataset (RSS) is completely different
with HKO own paid service (XML).
Weather at Data.One
● Example - Current local weather report:
● Plain text report in RSS.
● Difference to quote report content:
– Website: a pair of HTML tags, eg. <PRE>....</PRE>.
– Data.One: a pair of RSS description tags,
<description>....</description>.
● Other weather data is missing, eg. Regional
temperture updates per each 12 mins.
Weather at Data.One
● Weather at Data.One is 'report' but not 'data'.
● Weather RSS is already released by HKO
before launch of Data.One.
● Technically, json/xml format is better
readable by computer programs.
Digital21 Strategy
Public Consultation Document
(G) Public Sector Information (PSI) as Default
"34. Through different channels (like press releases, publications, websites, etc.), the
Government releases a lot of information in different areas. However, most of such
information can only be read but cannot be used. In view of the immense benefits
of widening access to PSI for free and easy re-use, we propose to make all
Government information released for public consumption machine-readable by
default. Where appropriate, datasets will be released with application programming
interfaces (APIs), providing predefined functions to make their retrieval easier."
(G) 廣泛提供公共資料
"34. 政府透過不同途徑(例如新聞稿、出版物、網站等)發放大量不同範疇的資料。然
而,這些資料大都只可供閱讀而不能使用。有見開放公共資料以供免費再用可帶來巨大
效益,我們建議所有開放予公眾使用的政府資料都須以數碼格式編製。在適用情況下 ,
資料發布時會同時推出應用程式界面,以便提供預設功能, 讓公眾輕易地檢索資料。"
Digital21 Strategy
Public Consultation Document
"33. PSI datasets can be used and meshed together to create
innovative new applications, as demonstrated by the creative and
useful products and services developed from PSI in Hong Kong and
around the world. For example, using PSI datasets on traffic snapshot
images, a number of mobile apps have been developed to provide
real-time traffic situation for users to avoid traffic jams in planning
their traffic routes. Experience from other developed economies
shows that widening access to PSI datasets can open up lucrative
business opportunities and bring social benefits. By tapping the
creativity of the community and entrepreneurs, the use of PSI can
lead to positive social outcomes. For instance, in some cities in the
United States, application of PSI on hygiene inspections has led to a
significant drop in food poisoning incidents."
Digital21 Strategy
Public Consultation Document
"33. 由本港及世界各地利用公共資料所開發的實用創意
產品及服務所見 , 公共資料可個別及混合使用 , 以開發創
新的應用程式。例如 , 現時已有多個利用交通情況快拍
圖像的公共資料開發的流動應用程式 , 以提供實時交通
情況資料 , 讓使用者計劃行車路線 , 從而避開交通擠塞情
況。根據其他經濟體系的經驗 , 開放公共資料 , 供大眾廣
為使用 , 可開拓有利可圖的商機 , 並為社會帶來禆益。我
們可藉着開放公共資料 , 借助市民及企業家的創意來造
福社會。舉例來說 , 在美國一些城市 , 有關衞生檢查的公
共資料在開放使用後 , 食物中毒事故宗數大幅減少。 "
Digital21 Strategy
Public Consultation Document
"35. Apart from Government data, there are vast amounts of PSI
handled, collected and disseminated by public organisations,
which are equally useful for the development of innovative
services and products. Therefore, we propose to encourage
public organisations (e.g. public utilities and transport operators)
to release data owned by them in machine-readable format."
"35. 除了政府資料外 , 本港亦備有大量經公共機構處理、收集及發
放的公共資料 , 這些資料對開發創新服務及產品同樣有用。因此 , 我
們建議鼓勵公共機構 ( 例如公用事業及運輸機構 ) 發放以數碼格式編
製的資料。 "
Open Data in Taiwan
● Open Weather Data from CWB.
● Community – g0v.tw
●Open Weather Data from CWB.
●Open Weather Data from CWB.
●Open Weather Data from CWB.
●Open Weather Data from CWB.
g0v.tw
● Promote information transparency.
● Develop information platform and tools for a
society of citizen participation.
● Open Source model.
● Stackoverflow-like Q&A system for public to
asking for data which they are looking for.
g0v.tw
● Established after Taiwan Yahoo! Open Hack
Day in October 2012.
● Hackers, Professors, NGO/NPO, Students,
Writers, Visual Media, Legal Professionals.
● Organize 5+ bi-monthly hackathons since
December 2012.
Air Pollution Index
Air Pollution Index
● http://g0v.github.io/twgeojson/air.html
● Develop a web-based visualized map of air
pollution.
● Use Open Data provided by Environmental
Protection Administration
(opendata.epa.gov.tw)
● Air Pollution Indexes and Data from different
stations.
Moedict 萌典
Moedict 萌典
● Raw data from Ministry of Education (edu.tw)
● Community build of web-based chinese
dictionary with 160,000 Chinese items and
other items.
● Support auto-completion, searching and
offline versions.
● Source codes, other platforms, data are
available on 3du.tw (hackpad).
Why ?
Web Scraping
Programme List of Paid TVs in 2004
Programme List of Paid TVs in 2004
● I want to know live football match was
showing on which channel.
● Paid TV web site = M$ + IIS + ASP + Flash
● Slow....... Very Slow...... Extremely Slow!
● Couldn't connect at any peak hours!
● Wrote my first web crawler in PHP in 2004.
Public Transportation in 2006-2010
● Kowloon Motor Bus (KMB)
– No map view for a bus route
● Public Transportation Enquiry System (PTES)
– Exteremly Poor, Ugly (or much worse) map UI on
PTES.
HK Observatory and Joint Typhoon
Warning Center
● Any typhoon is coming to Hong Kong ? And
When will it come ?
● No easy data exchange format.
● No RSS nor ATOM.
● We aren't check websites everyday.
My Products
● WeatherHK ← ← ←
● TCTrack
WeatherHK
● http://twitter.com/weatherhk
● hourly current weather report
● weather forecast report
● tropical signal warning
WeatherHK
● Backend: Python + Scrapy + Database +
Twitter + NNTP......
● Frontend: Twitter + Newsgroup
WeatherHK
● http://twitter.com/weatherhk
● Interview by MetroPop in 2009.
My Products
● WeatherHK
● TCTrack ← ← ←
TCTrack
● http://sammy.hk/projects/tctrack/tctrack.php
● Plot TC current and forecast tracks over
Google Map.
● Source:
– JTWC
– HKO
TCTrack
● http://sammy.hk/projects/tctrack/tctrack.php
● Probably first tctrack map in HK using
GoogleMap
● Use of GMap: TCTrack -> Weather
Underground Hong Kong -> HKO
TCTrack
● http://twitter.com/tctrack
● Tweet JTWC updates for Northwest Pacific.
Web Scraping
● a computer software technique of extracting
information from websites. (Wikipedia)
● for business, hobbies, research purposes.
Web Scraping
● Look for right URLs to scrap.
● Look for right content from webpages.
● Saving data into data store.
● When to run the web scraping program ?
Use of
Open Source
Software in
Web Scraping
Use of Open Source Software in
Web Crawling
● Use Open Source Tools to collect useful and
meaningful machine-readable data.
● Doesn't need to wait provider to release data
in machine-readable format.
Open Source Tools
● Python programming lanugage
● with Regular Expression library
● Scrapy web crawling framework
Why python + scrapy ?
● python: my current favourite programming
language for few years.
● scrapy: web crawling framework written in
Python.
What is Scrapy ?
● An open source web scraping framework for
Python.
● Scrapy is a fast high-level screen scraping and
web crawling framework, used to crawl
websites and extract structured data from
their pages. It can be used for a wide range of
purposes, from data mining to monitoring
and automated testing.
Scrapy Features
● define data you want to scrapy
● write spider to extract data
● Built-in: selecting and extracting data from HTML
and XML
● Built-in: JSON, CSV, XML output
● Interactive shell console
● Built-in: web service, telnet console, logging
● Others
Starting new Open
Source project
hk0weather to create
Open Weather Data.
hk0weather
● Open Source.
● Web scraping HKO website.
● Output datas in standard machine-readable
data format – JSON, XML.
● https://github.com/sammyfung/hk0weather
● python + scrapy
hk0weather
● 1st version:
– from hourly weather report
– extracting temperture and humidity from 20+
weather stations, export in json format.
● 2nd version:
– From 10-minute update regional weather report.
– Including wind directions, wind speeds, max
gusts.
hk0weather
hk0weather
● Current version:
– Django web framework.
– Added rainfall data.
● Future:
– JSON APIs.
– Tropical cyclone data.
– Weather Warning Report.
hk0weather
● https://github.com/sammyfung/hk0weather
● $ virtualenv hk0weatherenv
● $ source hk0weatherenv/bin/activate
● $ git clone
https://github.com/sammyfung/hk0weather.git
● $ cd hk0weather
● $ pip install -r requirements.txt
● $ scrapy crawl regionalwx -t json -o /tmp/regionalwx.json
hk0weather
● Python
– import re
● Scrapy
– web crawling framework written in Python.
– HtmlXPathSelector.
– built-in JSON, CSV, XML output.
hk0weather
{"reptime": "2014-05-23 09:20:00", "temperturemax": 25.2, "ename": "The Peak", "scraptime": "2014-05-23 09:27:15", "station": "vp1", "cname": "u5c71u9802",
"temperturemin": 24.1, "temperture": 25.0},
{"reptime": "2014-05-23 09:20:00", "temperturemax": 26.3, "ename": "Ta Kwu Ling", "maxgust": 15, "scraptime": "2014-05-23 09:27:15", "humidity": 94, "windspeed": 8,
"cname": "u6253u9f13u5dba", "station": "tkl", "temperturemin": 25.0, "temperture": 25.8, "winddirection": "East"},
{"reptime": "2014-05-23 09:20:00", "temperturemax": 27.9, "ename": "Lau Fau Shan", "maxgust": 33, "scraptime": "2014-05-23 09:27:15", "humidity": 90, "windspeed":
21, "cname": "u6d41u6d6eu5c71", "station": "lfs", "temperturemin": 26.4, "temperture": 27.1, "winddirection": "South"},
{"reptime": "2014-05-23 09:20:00", "temperturemax": 27.6, "ename": "Peng Chau", "maxgust": 27, "scraptime": "2014-05-23 09:27:15", "humidity": 99, "windspeed": 13,
"cname": "u576au6d32", "station": "pen", "temperturemin": 26.8, "temperture": 27.6, "winddirection": "South"},
{"reptime": "2014-05-23 09:20:00", "ename": "Tap Mun", "maxgust": 6, "scraptime": "2014-05-23 09:27:15", "windspeed": 2, "cname": "u5854u9580", "station": "tap",
"winddirection": "North"},
{"reptime": "2014-05-23 09:20:00", "temperturemax": 28.7, "ename": "Shek Kong", "maxgust": 8, "scraptime": "2014-05-23 09:27:15", "humidity": 96, "windspeed": 1,
"cname": "u77f3u5d17", "station": "sek", "temperturemin": 26.6, "temperture": 27.4, "winddirection": "Variable"},
{"reptime": "2014-05-23 09:20:00", "temperturemax": 28.3, "ename": "Tsing Yi", "maxgust": 28, "scraptime": "2014-05-23 09:27:15", "humidity": 96, "windspeed": 18,
"cname": "u9752u8863", "station": "ty1", "temperturemin": 26.4, "temperture": 27.4, "winddirection": "N/A"},
{"reptime": "2014-05-23 09:20:00", "ename": "Green Island", "maxgust": 42, "scraptime": "2014-05-23 09:27:15", "windspeed": 35, "cname": "u9752u6d32", "station":
"gi", "winddirection": "South"},
{"ename": "Sai Wan Ho", "cname": "u897fu7063u6cb3", "station": "swh", "scraptime": "2014-05-23 09:27:15", "reptime": "2014-05-23 09:20:00"},
{"reptime": "2014-05-23 09:20:00", "temperturemax": 28.4, "ename": "Shau Kei Wan", "scraptime": "2014-05-23 09:27:15", "station": "skw", "cname":
"u7b72u7b95u7063", "temperturemin": 25.7, "temperture": 27.9},
{"ename": "Tai Mo Shan", "cname": "u5927u5e3du5c71", "station": "tms", "scraptime": "2014-05-23 09:27:15", "reptime": "2014-05-23 09:20:00"},
{"reptime": "2014-05-23 09:20:00", "ename": "Tsuen Wan Shing Mun Valley", "scraptime": "2014-05-23 09:27:15", "humidity": 98, "cname":
"u8343u7063u57ceu9580u8c37", "station": "tw"},
.
.
.
.
.
GNOME Shell
Extensions
GNOME Shell
● Core user interface functions for GNOME
– 2 Screenshots followings after this slide.
● Switching to windows
● Launching applications
● Panel at the top of the screen
● the Activities Overview
● Message Tray at the bottom of the screen.
GNOME Shell Extensions
● Small pieces of code
● Written by third party developers
– That's mean they could be most of you!
● Modify the way GNOME works.
● Similiar: Chrome Extensions or Firefox Addons.
● Extensions can be found and installed from
extensions.gnome.org.
What can GNOME Shell Extensions
do ?
● Extensions may make small changes.
– like moving your clock to the right-hand side of
the screen
● Or make big changes
– like arranging the windows in the Activities
Overview in a different way.
Weather related GNOME Shell
Extensions
Installation of GNOME Shell
Extensions
● "GNOME Shell Integration" plugin is installed
and enabled in your browser preferences
● Go to extensions.gnome.org, find and install.
– Whitelisted this website or turn off the click-to-
play feature at your browser.
● Make sure Unzip is installed.
Weather (by Neroth)
Weather (by Neroth)
● A simple extension for displaying weather
information from several cities in GNOME
Shell
● https://github.com/Neroth/gnome-shell-
extension-weather
Weather (by Neroth)
● Let's look at its codes.
– Data come from Yahoo Weather.
OpenWeather (by jens)
OpenWeather (by jens)
● Weather extension to display weather
information from OpenWeatherMap for many
cities in GNOME Shell.
● https://github.com/jenslody/gnome-shell-
extension-openweather
OpenWeatherMap
Developing next Weather Widget
● With data from cities/town-level weather
stations.
– Yahoo Weather ?
– OpenWeatherMap ?
– Open ''Weather'' Data ?
● From Observatories
● Web Scraping
Thank You!
sammy@sammy.hk
http://sammy.hk

Weitere ähnliche Inhalte

Ähnlich wie Local Weather Information and GNOME Shell Extension

Open Source Weather Information Project with OpenStack Object Storage
Open Source Weather Information Project with OpenStack Object StorageOpen Source Weather Information Project with OpenStack Object Storage
Open Source Weather Information Project with OpenStack Object StorageSammy Fung
 
Creating Open Data with Open Source (beta2)
Creating Open Data with Open Source (beta2)Creating Open Data with Open Source (beta2)
Creating Open Data with Open Source (beta2)Sammy Fung
 
FreeGIS.net, INSPIRE, Open Source Software and OGC standards
FreeGIS.net, INSPIRE, Open Source Software and OGC standardsFreeGIS.net, INSPIRE, Open Source Software and OGC standards
FreeGIS.net, INSPIRE, Open Source Software and OGC standardsArnulf Christl
 
F & A D R E A M I T Baasansuren Burmaa
F &  A  D R E A M  I T  Baasansuren  BurmaaF &  A  D R E A M  I T  Baasansuren  Burmaa
F & A D R E A M I T Baasansuren Burmaapanall2009
 
The use of FLOSS in Governments
The use of FLOSS in GovernmentsThe use of FLOSS in Governments
The use of FLOSS in GovernmentsNico Elema
 
Complex Made Simple @ LF Energy Conference in Paris
Complex Made Simple @ LF Energy Conference in ParisComplex Made Simple @ LF Energy Conference in Paris
Complex Made Simple @ LF Energy Conference in ParisShane Coughlan
 
Fiscal openness working group open knowledge - october 28
Fiscal openness working group   open knowledge - october 28 Fiscal openness working group   open knowledge - october 28
Fiscal openness working group open knowledge - october 28 Open Knowledge
 
Use open source software to develop ideas at work
Use open source software to develop ideas at workUse open source software to develop ideas at work
Use open source software to develop ideas at workSammy Fung
 
Opengovtracker lightening
Opengovtracker lighteningOpengovtracker lightening
Opengovtracker lighteningrschingler
 
Open Research Data Pilot in Horizon 2020
Open Research Data Pilot in Horizon 2020Open Research Data Pilot in Horizon 2020
Open Research Data Pilot in Horizon 2020Elena Simukovic
 
Introduction to KAOS-G(FOSS4G Asia 2014)
Introduction to KAOS-G(FOSS4G Asia 2014)Introduction to KAOS-G(FOSS4G Asia 2014)
Introduction to KAOS-G(FOSS4G Asia 2014)slhead1
 
Stop making tools! Nobody likes them anyway...
Stop making tools! Nobody likes them anyway...Stop making tools! Nobody likes them anyway...
Stop making tools! Nobody likes them anyway...Christophe Guéret
 
Open-ONI: Online Newspaper Initiative
Open-ONI: Online Newspaper InitiativeOpen-ONI: Online Newspaper Initiative
Open-ONI: Online Newspaper InitiativeKaren Estlund
 

Ähnlich wie Local Weather Information and GNOME Shell Extension (20)

Ice dec04-04-sammy
Ice dec04-04-sammyIce dec04-04-sammy
Ice dec04-04-sammy
 
Open Source Weather Information Project with OpenStack Object Storage
Open Source Weather Information Project with OpenStack Object StorageOpen Source Weather Information Project with OpenStack Object Storage
Open Source Weather Information Project with OpenStack Object Storage
 
Creating Open Data with Open Source (beta2)
Creating Open Data with Open Source (beta2)Creating Open Data with Open Source (beta2)
Creating Open Data with Open Source (beta2)
 
Lesson1 esa summer_school_brovelli
Lesson1 esa summer_school_brovelliLesson1 esa summer_school_brovelli
Lesson1 esa summer_school_brovelli
 
FreeGIS.net, INSPIRE, Open Source Software and OGC standards
FreeGIS.net, INSPIRE, Open Source Software and OGC standardsFreeGIS.net, INSPIRE, Open Source Software and OGC standards
FreeGIS.net, INSPIRE, Open Source Software and OGC standards
 
F & A D R E A M I T Baasansuren Burmaa
F &  A  D R E A M  I T  Baasansuren  BurmaaF &  A  D R E A M  I T  Baasansuren  Burmaa
F & A D R E A M I T Baasansuren Burmaa
 
The use of FLOSS in Governments
The use of FLOSS in GovernmentsThe use of FLOSS in Governments
The use of FLOSS in Governments
 
Complex Made Simple @ LF Energy Conference in Paris
Complex Made Simple @ LF Energy Conference in ParisComplex Made Simple @ LF Energy Conference in Paris
Complex Made Simple @ LF Energy Conference in Paris
 
Gift presentation
Gift presentationGift presentation
Gift presentation
 
Fiscal openness working group open knowledge - october 28
Fiscal openness working group   open knowledge - october 28 Fiscal openness working group   open knowledge - october 28
Fiscal openness working group open knowledge - october 28
 
Lesson3 esa summer_school_brovelli
Lesson3 esa summer_school_brovelliLesson3 esa summer_school_brovelli
Lesson3 esa summer_school_brovelli
 
Use open source software to develop ideas at work
Use open source software to develop ideas at workUse open source software to develop ideas at work
Use open source software to develop ideas at work
 
Hobbit in a Nutshell - EDF2016
Hobbit in a Nutshell - EDF2016Hobbit in a Nutshell - EDF2016
Hobbit in a Nutshell - EDF2016
 
Opengovtracker lightening
Opengovtracker lighteningOpengovtracker lightening
Opengovtracker lightening
 
Deep Web
Deep WebDeep Web
Deep Web
 
GopKrishna
GopKrishnaGopKrishna
GopKrishna
 
Open Research Data Pilot in Horizon 2020
Open Research Data Pilot in Horizon 2020Open Research Data Pilot in Horizon 2020
Open Research Data Pilot in Horizon 2020
 
Introduction to KAOS-G(FOSS4G Asia 2014)
Introduction to KAOS-G(FOSS4G Asia 2014)Introduction to KAOS-G(FOSS4G Asia 2014)
Introduction to KAOS-G(FOSS4G Asia 2014)
 
Stop making tools! Nobody likes them anyway...
Stop making tools! Nobody likes them anyway...Stop making tools! Nobody likes them anyway...
Stop making tools! Nobody likes them anyway...
 
Open-ONI: Online Newspaper Initiative
Open-ONI: Online Newspaper InitiativeOpen-ONI: Online Newspaper Initiative
Open-ONI: Online Newspaper Initiative
 

Mehr von Sammy Fung

Python 爬網⾴工具 - Scrapy 介紹
Python 爬網⾴工具 - Scrapy 介紹Python 爬網⾴工具 - Scrapy 介紹
Python 爬網⾴工具 - Scrapy 介紹Sammy Fung
 
DevRel - Transform article writing from printing to online
DevRel - Transform article writing from printing to onlineDevRel - Transform article writing from printing to online
DevRel - Transform article writing from printing to onlineSammy Fung
 
Introduction to Open Source by opensource.hk (2019 Edition)
Introduction to Open Source by opensource.hk (2019 Edition)Introduction to Open Source by opensource.hk (2019 Edition)
Introduction to Open Source by opensource.hk (2019 Edition)Sammy Fung
 
My Open Source Journey - Developer and Community
My Open Source Journey - Developer and CommunityMy Open Source Journey - Developer and Community
My Open Source Journey - Developer and CommunitySammy Fung
 
Introduction to development with Django web framework
Introduction to development with Django web frameworkIntroduction to development with Django web framework
Introduction to development with Django web frameworkSammy Fung
 
香港中文開源軟件翻譯
香港中文開源軟件翻譯香港中文開源軟件翻譯
香港中文開源軟件翻譯Sammy Fung
 
Open Data and Web API
Open Data and Web APIOpen Data and Web API
Open Data and Web APISammy Fung
 
Global Open Source Development 2011-2014 Review and 2015 Forecast
Global Open Source Development 2011-2014 Review and 2015 ForecastGlobal Open Source Development 2011-2014 Review and 2015 Forecast
Global Open Source Development 2011-2014 Review and 2015 ForecastSammy Fung
 
Mozilla - Openness of the Web
Mozilla - Openness of the WebMozilla - Openness of the Web
Mozilla - Openness of the WebSammy Fung
 
Open Source Technology and Community
Open Source Technology and CommunityOpen Source Technology and Community
Open Source Technology and CommunitySammy Fung
 
Access Open Data with Open Source Software Tools
Access Open Data with Open Source Software ToolsAccess Open Data with Open Source Software Tools
Access Open Data with Open Source Software ToolsSammy Fung
 
Installation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server EditionInstallation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server EditionSammy Fung
 
Software Freedom and Open Source Community
Software Freedom and Open Source CommunitySoftware Freedom and Open Source Community
Software Freedom and Open Source CommunitySammy Fung
 
Building your own job site with Drupal
Building your own job site with DrupalBuilding your own job site with Drupal
Building your own job site with DrupalSammy Fung
 
Software Freedom and Community
Software Freedom and CommunitySoftware Freedom and Community
Software Freedom and CommunitySammy Fung
 
Open Source Job Board
Open Source Job BoardOpen Source Job Board
Open Source Job BoardSammy Fung
 
Introduction of Mozilla Hong Kong (COSCUP 2014)
Introduction of Mozilla Hong Kong (COSCUP 2014)Introduction of Mozilla Hong Kong (COSCUP 2014)
Introduction of Mozilla Hong Kong (COSCUP 2014)Sammy Fung
 
Introduction of Open Source Job Board with Drupal CMS
Introduction of Open Source Job Board with Drupal CMSIntroduction of Open Source Job Board with Drupal CMS
Introduction of Open Source Job Board with Drupal CMSSammy Fung
 
Python, web scraping and content management: Scrapy and Django
Python, web scraping and content management: Scrapy and DjangoPython, web scraping and content management: Scrapy and Django
Python, web scraping and content management: Scrapy and DjangoSammy Fung
 
Mozilla Community and Hong Kong
Mozilla Community and Hong KongMozilla Community and Hong Kong
Mozilla Community and Hong KongSammy Fung
 

Mehr von Sammy Fung (20)

Python 爬網⾴工具 - Scrapy 介紹
Python 爬網⾴工具 - Scrapy 介紹Python 爬網⾴工具 - Scrapy 介紹
Python 爬網⾴工具 - Scrapy 介紹
 
DevRel - Transform article writing from printing to online
DevRel - Transform article writing from printing to onlineDevRel - Transform article writing from printing to online
DevRel - Transform article writing from printing to online
 
Introduction to Open Source by opensource.hk (2019 Edition)
Introduction to Open Source by opensource.hk (2019 Edition)Introduction to Open Source by opensource.hk (2019 Edition)
Introduction to Open Source by opensource.hk (2019 Edition)
 
My Open Source Journey - Developer and Community
My Open Source Journey - Developer and CommunityMy Open Source Journey - Developer and Community
My Open Source Journey - Developer and Community
 
Introduction to development with Django web framework
Introduction to development with Django web frameworkIntroduction to development with Django web framework
Introduction to development with Django web framework
 
香港中文開源軟件翻譯
香港中文開源軟件翻譯香港中文開源軟件翻譯
香港中文開源軟件翻譯
 
Open Data and Web API
Open Data and Web APIOpen Data and Web API
Open Data and Web API
 
Global Open Source Development 2011-2014 Review and 2015 Forecast
Global Open Source Development 2011-2014 Review and 2015 ForecastGlobal Open Source Development 2011-2014 Review and 2015 Forecast
Global Open Source Development 2011-2014 Review and 2015 Forecast
 
Mozilla - Openness of the Web
Mozilla - Openness of the WebMozilla - Openness of the Web
Mozilla - Openness of the Web
 
Open Source Technology and Community
Open Source Technology and CommunityOpen Source Technology and Community
Open Source Technology and Community
 
Access Open Data with Open Source Software Tools
Access Open Data with Open Source Software ToolsAccess Open Data with Open Source Software Tools
Access Open Data with Open Source Software Tools
 
Installation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server EditionInstallation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server Edition
 
Software Freedom and Open Source Community
Software Freedom and Open Source CommunitySoftware Freedom and Open Source Community
Software Freedom and Open Source Community
 
Building your own job site with Drupal
Building your own job site with DrupalBuilding your own job site with Drupal
Building your own job site with Drupal
 
Software Freedom and Community
Software Freedom and CommunitySoftware Freedom and Community
Software Freedom and Community
 
Open Source Job Board
Open Source Job BoardOpen Source Job Board
Open Source Job Board
 
Introduction of Mozilla Hong Kong (COSCUP 2014)
Introduction of Mozilla Hong Kong (COSCUP 2014)Introduction of Mozilla Hong Kong (COSCUP 2014)
Introduction of Mozilla Hong Kong (COSCUP 2014)
 
Introduction of Open Source Job Board with Drupal CMS
Introduction of Open Source Job Board with Drupal CMSIntroduction of Open Source Job Board with Drupal CMS
Introduction of Open Source Job Board with Drupal CMS
 
Python, web scraping and content management: Scrapy and Django
Python, web scraping and content management: Scrapy and DjangoPython, web scraping and content management: Scrapy and Django
Python, web scraping and content management: Scrapy and Django
 
Mozilla Community and Hong Kong
Mozilla Community and Hong KongMozilla Community and Hong Kong
Mozilla Community and Hong Kong
 

Kürzlich hochgeladen

All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663Call Girls Mumbai
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Call Girls in Nagpur High Profile
 
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.soniya singh
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...singhpriety023
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...Escorts Call Girls
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.CarlotaBedoya1
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableSeo
 

Kürzlich hochgeladen (20)

All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
Russian Call Girls in %(+971524965298  )#  Call Girls in DubaiRussian Call Girls in %(+971524965298  )#  Call Girls in Dubai
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
 
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 

Local Weather Information and GNOME Shell Extension

  • 3. Sammy Fung ● Software Developer – to use and develop open source sofware. – Perl → PHP → Python. – Interests in data mining / web scraping. – Consultant in web technology.
  • 4. Sammy Fung ● 15+ years in Open Source Communities. – Founding Chairman, Hong Kong Linux User Group. – Founding Chairman, Open Source Hong Kong. – Member, GNOME Asia committee. – Mozilla Representative in Hong Kong. – Organize, speak and participate in open source conferences in East Asia and U.S. in recent years – Taiwan, Korea, Japan, Malayisa, Singapore, and Bay Area, CA.
  • 5. Agenda ● Local Weather Information – From Local Meteorological Observatories to Open Data. ● GNOME Shell Extension – Weather Widgets
  • 9. Central Weather Bureau (CWB), Taiwan.
  • 10. Joint Typhoon Warning Centre (JTWC)
  • 14. Open Data Three Laws of Open Government Data by David Eaves. 1.If it can't be spidered or indexed, it doesn't exist. 2.If it isn't available in open and machine readable format, it can't engage. 3.If a legal framework doesn't allow it to be repurposed, it doesn't empower. http://eaves.ca/2009/09/30/three-law-of-open-government-data/
  • 15. Open Data ● Tim Berners-Lee – the inventor of the Web. – 5stardata.info ● 5 star deployment scheme of Open Data suggested by Tim Berners-Lee.
  • 16. Five Star Open Data - 5stardata.info 1.make your stuff available on the Web (whatever format) under an open license. 2.make it available as structured data (e.g., Excel instead of image scan of a table) 3.use non-proprietary formats (e.g., CSV instead of Excel) 4.use URIs to denote things, so that people can point at your stuff. 5.link your data to other data to provide context. 5stardata.info by Tim Berners-Lee, the inventor of the Web.
  • 17. Open Data in Hong Kong
  • 18. Open Data in Hong Kong ● Data.One – http://www.gov.hk/en/theme/psi – released on 2011/3/31. – First App Competition on Data.One ● Call for Submission now till 2014/02/28.
  • 19. Weather Information in Hong Kong ● Hong Kong Observatory – Hourly Hong Kong Weather Report – Regional Weather in Hong Kong (10 min updates) – Weather Forecast and Weekly Weather Forecast – Typhoon Report and Forecast
  • 22. Weather at Data.One ● I posted a blog 'Progress of Open Government Data in Hong Kong' on 2013/01/17. ● Weather at Data.One provides 7 dataset URLs, returns RSS (XML) format (Eng/TChi/SChi) – One word: Useless. – Data.One dataset (RSS) is completely different with HKO own paid service (XML).
  • 23. Weather at Data.One ● Example - Current local weather report: ● Plain text report in RSS. ● Difference to quote report content: – Website: a pair of HTML tags, eg. <PRE>....</PRE>. – Data.One: a pair of RSS description tags, <description>....</description>. ● Other weather data is missing, eg. Regional temperture updates per each 12 mins.
  • 24. Weather at Data.One ● Weather at Data.One is 'report' but not 'data'. ● Weather RSS is already released by HKO before launch of Data.One. ● Technically, json/xml format is better readable by computer programs.
  • 25. Digital21 Strategy Public Consultation Document (G) Public Sector Information (PSI) as Default "34. Through different channels (like press releases, publications, websites, etc.), the Government releases a lot of information in different areas. However, most of such information can only be read but cannot be used. In view of the immense benefits of widening access to PSI for free and easy re-use, we propose to make all Government information released for public consumption machine-readable by default. Where appropriate, datasets will be released with application programming interfaces (APIs), providing predefined functions to make their retrieval easier." (G) 廣泛提供公共資料 "34. 政府透過不同途徑(例如新聞稿、出版物、網站等)發放大量不同範疇的資料。然 而,這些資料大都只可供閱讀而不能使用。有見開放公共資料以供免費再用可帶來巨大 效益,我們建議所有開放予公眾使用的政府資料都須以數碼格式編製。在適用情況下 , 資料發布時會同時推出應用程式界面,以便提供預設功能, 讓公眾輕易地檢索資料。"
  • 26. Digital21 Strategy Public Consultation Document "33. PSI datasets can be used and meshed together to create innovative new applications, as demonstrated by the creative and useful products and services developed from PSI in Hong Kong and around the world. For example, using PSI datasets on traffic snapshot images, a number of mobile apps have been developed to provide real-time traffic situation for users to avoid traffic jams in planning their traffic routes. Experience from other developed economies shows that widening access to PSI datasets can open up lucrative business opportunities and bring social benefits. By tapping the creativity of the community and entrepreneurs, the use of PSI can lead to positive social outcomes. For instance, in some cities in the United States, application of PSI on hygiene inspections has led to a significant drop in food poisoning incidents."
  • 27. Digital21 Strategy Public Consultation Document "33. 由本港及世界各地利用公共資料所開發的實用創意 產品及服務所見 , 公共資料可個別及混合使用 , 以開發創 新的應用程式。例如 , 現時已有多個利用交通情況快拍 圖像的公共資料開發的流動應用程式 , 以提供實時交通 情況資料 , 讓使用者計劃行車路線 , 從而避開交通擠塞情 況。根據其他經濟體系的經驗 , 開放公共資料 , 供大眾廣 為使用 , 可開拓有利可圖的商機 , 並為社會帶來禆益。我 們可藉着開放公共資料 , 借助市民及企業家的創意來造 福社會。舉例來說 , 在美國一些城市 , 有關衞生檢查的公 共資料在開放使用後 , 食物中毒事故宗數大幅減少。 "
  • 28. Digital21 Strategy Public Consultation Document "35. Apart from Government data, there are vast amounts of PSI handled, collected and disseminated by public organisations, which are equally useful for the development of innovative services and products. Therefore, we propose to encourage public organisations (e.g. public utilities and transport operators) to release data owned by them in machine-readable format." "35. 除了政府資料外 , 本港亦備有大量經公共機構處理、收集及發 放的公共資料 , 這些資料對開發創新服務及產品同樣有用。因此 , 我 們建議鼓勵公共機構 ( 例如公用事業及運輸機構 ) 發放以數碼格式編 製的資料。 "
  • 29. Open Data in Taiwan ● Open Weather Data from CWB. ● Community – g0v.tw
  • 30. ●Open Weather Data from CWB.
  • 31. ●Open Weather Data from CWB.
  • 32. ●Open Weather Data from CWB.
  • 33. ●Open Weather Data from CWB.
  • 34. g0v.tw ● Promote information transparency. ● Develop information platform and tools for a society of citizen participation. ● Open Source model. ● Stackoverflow-like Q&A system for public to asking for data which they are looking for.
  • 35. g0v.tw ● Established after Taiwan Yahoo! Open Hack Day in October 2012. ● Hackers, Professors, NGO/NPO, Students, Writers, Visual Media, Legal Professionals. ● Organize 5+ bi-monthly hackathons since December 2012.
  • 37. Air Pollution Index ● http://g0v.github.io/twgeojson/air.html ● Develop a web-based visualized map of air pollution. ● Use Open Data provided by Environmental Protection Administration (opendata.epa.gov.tw) ● Air Pollution Indexes and Data from different stations.
  • 39. Moedict 萌典 ● Raw data from Ministry of Education (edu.tw) ● Community build of web-based chinese dictionary with 160,000 Chinese items and other items. ● Support auto-completion, searching and offline versions. ● Source codes, other platforms, data are available on 3du.tw (hackpad).
  • 41. Programme List of Paid TVs in 2004
  • 42. Programme List of Paid TVs in 2004 ● I want to know live football match was showing on which channel. ● Paid TV web site = M$ + IIS + ASP + Flash ● Slow....... Very Slow...... Extremely Slow! ● Couldn't connect at any peak hours! ● Wrote my first web crawler in PHP in 2004.
  • 43. Public Transportation in 2006-2010 ● Kowloon Motor Bus (KMB) – No map view for a bus route ● Public Transportation Enquiry System (PTES) – Exteremly Poor, Ugly (or much worse) map UI on PTES.
  • 44. HK Observatory and Joint Typhoon Warning Center ● Any typhoon is coming to Hong Kong ? And When will it come ? ● No easy data exchange format. ● No RSS nor ATOM. ● We aren't check websites everyday.
  • 45. My Products ● WeatherHK ← ← ← ● TCTrack
  • 46. WeatherHK ● http://twitter.com/weatherhk ● hourly current weather report ● weather forecast report ● tropical signal warning
  • 47. WeatherHK ● Backend: Python + Scrapy + Database + Twitter + NNTP...... ● Frontend: Twitter + Newsgroup
  • 49. My Products ● WeatherHK ● TCTrack ← ← ←
  • 50. TCTrack ● http://sammy.hk/projects/tctrack/tctrack.php ● Plot TC current and forecast tracks over Google Map. ● Source: – JTWC – HKO
  • 51. TCTrack ● http://sammy.hk/projects/tctrack/tctrack.php ● Probably first tctrack map in HK using GoogleMap ● Use of GMap: TCTrack -> Weather Underground Hong Kong -> HKO
  • 52. TCTrack ● http://twitter.com/tctrack ● Tweet JTWC updates for Northwest Pacific.
  • 53. Web Scraping ● a computer software technique of extracting information from websites. (Wikipedia) ● for business, hobbies, research purposes.
  • 54. Web Scraping ● Look for right URLs to scrap. ● Look for right content from webpages. ● Saving data into data store. ● When to run the web scraping program ?
  • 55. Use of Open Source Software in Web Scraping
  • 56. Use of Open Source Software in Web Crawling ● Use Open Source Tools to collect useful and meaningful machine-readable data. ● Doesn't need to wait provider to release data in machine-readable format.
  • 57. Open Source Tools ● Python programming lanugage ● with Regular Expression library ● Scrapy web crawling framework
  • 58. Why python + scrapy ? ● python: my current favourite programming language for few years. ● scrapy: web crawling framework written in Python.
  • 59. What is Scrapy ? ● An open source web scraping framework for Python. ● Scrapy is a fast high-level screen scraping and web crawling framework, used to crawl websites and extract structured data from their pages. It can be used for a wide range of purposes, from data mining to monitoring and automated testing.
  • 60. Scrapy Features ● define data you want to scrapy ● write spider to extract data ● Built-in: selecting and extracting data from HTML and XML ● Built-in: JSON, CSV, XML output ● Interactive shell console ● Built-in: web service, telnet console, logging ● Others
  • 61. Starting new Open Source project hk0weather to create Open Weather Data.
  • 62. hk0weather ● Open Source. ● Web scraping HKO website. ● Output datas in standard machine-readable data format – JSON, XML. ● https://github.com/sammyfung/hk0weather ● python + scrapy
  • 63. hk0weather ● 1st version: – from hourly weather report – extracting temperture and humidity from 20+ weather stations, export in json format. ● 2nd version: – From 10-minute update regional weather report. – Including wind directions, wind speeds, max gusts.
  • 65. hk0weather ● Current version: – Django web framework. – Added rainfall data. ● Future: – JSON APIs. – Tropical cyclone data. – Weather Warning Report.
  • 66. hk0weather ● https://github.com/sammyfung/hk0weather ● $ virtualenv hk0weatherenv ● $ source hk0weatherenv/bin/activate ● $ git clone https://github.com/sammyfung/hk0weather.git ● $ cd hk0weather ● $ pip install -r requirements.txt ● $ scrapy crawl regionalwx -t json -o /tmp/regionalwx.json
  • 67. hk0weather ● Python – import re ● Scrapy – web crawling framework written in Python. – HtmlXPathSelector. – built-in JSON, CSV, XML output.
  • 68. hk0weather {"reptime": "2014-05-23 09:20:00", "temperturemax": 25.2, "ename": "The Peak", "scraptime": "2014-05-23 09:27:15", "station": "vp1", "cname": "u5c71u9802", "temperturemin": 24.1, "temperture": 25.0}, {"reptime": "2014-05-23 09:20:00", "temperturemax": 26.3, "ename": "Ta Kwu Ling", "maxgust": 15, "scraptime": "2014-05-23 09:27:15", "humidity": 94, "windspeed": 8, "cname": "u6253u9f13u5dba", "station": "tkl", "temperturemin": 25.0, "temperture": 25.8, "winddirection": "East"}, {"reptime": "2014-05-23 09:20:00", "temperturemax": 27.9, "ename": "Lau Fau Shan", "maxgust": 33, "scraptime": "2014-05-23 09:27:15", "humidity": 90, "windspeed": 21, "cname": "u6d41u6d6eu5c71", "station": "lfs", "temperturemin": 26.4, "temperture": 27.1, "winddirection": "South"}, {"reptime": "2014-05-23 09:20:00", "temperturemax": 27.6, "ename": "Peng Chau", "maxgust": 27, "scraptime": "2014-05-23 09:27:15", "humidity": 99, "windspeed": 13, "cname": "u576au6d32", "station": "pen", "temperturemin": 26.8, "temperture": 27.6, "winddirection": "South"}, {"reptime": "2014-05-23 09:20:00", "ename": "Tap Mun", "maxgust": 6, "scraptime": "2014-05-23 09:27:15", "windspeed": 2, "cname": "u5854u9580", "station": "tap", "winddirection": "North"}, {"reptime": "2014-05-23 09:20:00", "temperturemax": 28.7, "ename": "Shek Kong", "maxgust": 8, "scraptime": "2014-05-23 09:27:15", "humidity": 96, "windspeed": 1, "cname": "u77f3u5d17", "station": "sek", "temperturemin": 26.6, "temperture": 27.4, "winddirection": "Variable"}, {"reptime": "2014-05-23 09:20:00", "temperturemax": 28.3, "ename": "Tsing Yi", "maxgust": 28, "scraptime": "2014-05-23 09:27:15", "humidity": 96, "windspeed": 18, "cname": "u9752u8863", "station": "ty1", "temperturemin": 26.4, "temperture": 27.4, "winddirection": "N/A"}, {"reptime": "2014-05-23 09:20:00", "ename": "Green Island", "maxgust": 42, "scraptime": "2014-05-23 09:27:15", "windspeed": 35, "cname": "u9752u6d32", "station": "gi", "winddirection": "South"}, {"ename": "Sai Wan Ho", "cname": "u897fu7063u6cb3", "station": "swh", "scraptime": "2014-05-23 09:27:15", "reptime": "2014-05-23 09:20:00"}, {"reptime": "2014-05-23 09:20:00", "temperturemax": 28.4, "ename": "Shau Kei Wan", "scraptime": "2014-05-23 09:27:15", "station": "skw", "cname": "u7b72u7b95u7063", "temperturemin": 25.7, "temperture": 27.9}, {"ename": "Tai Mo Shan", "cname": "u5927u5e3du5c71", "station": "tms", "scraptime": "2014-05-23 09:27:15", "reptime": "2014-05-23 09:20:00"}, {"reptime": "2014-05-23 09:20:00", "ename": "Tsuen Wan Shing Mun Valley", "scraptime": "2014-05-23 09:27:15", "humidity": 98, "cname": "u8343u7063u57ceu9580u8c37", "station": "tw"}, . . . . .
  • 70. GNOME Shell ● Core user interface functions for GNOME – 2 Screenshots followings after this slide. ● Switching to windows ● Launching applications ● Panel at the top of the screen ● the Activities Overview ● Message Tray at the bottom of the screen.
  • 71.
  • 72.
  • 73. GNOME Shell Extensions ● Small pieces of code ● Written by third party developers – That's mean they could be most of you! ● Modify the way GNOME works. ● Similiar: Chrome Extensions or Firefox Addons. ● Extensions can be found and installed from extensions.gnome.org.
  • 74. What can GNOME Shell Extensions do ? ● Extensions may make small changes. – like moving your clock to the right-hand side of the screen ● Or make big changes – like arranging the windows in the Activities Overview in a different way.
  • 75. Weather related GNOME Shell Extensions
  • 76.
  • 77. Installation of GNOME Shell Extensions ● "GNOME Shell Integration" plugin is installed and enabled in your browser preferences ● Go to extensions.gnome.org, find and install. – Whitelisted this website or turn off the click-to- play feature at your browser. ● Make sure Unzip is installed.
  • 79. Weather (by Neroth) ● A simple extension for displaying weather information from several cities in GNOME Shell ● https://github.com/Neroth/gnome-shell- extension-weather
  • 80. Weather (by Neroth) ● Let's look at its codes. – Data come from Yahoo Weather.
  • 82. OpenWeather (by jens) ● Weather extension to display weather information from OpenWeatherMap for many cities in GNOME Shell. ● https://github.com/jenslody/gnome-shell- extension-openweather
  • 84. Developing next Weather Widget ● With data from cities/town-level weather stations. – Yahoo Weather ? – OpenWeatherMap ? – Open ''Weather'' Data ? ● From Observatories ● Web Scraping