SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Casual Travel Planner:
Exploring Venues around Post Offices with Web APIs:
Hokkaido, Japan
Coursera: IBM Data Science Professional Certificate: Capstone Project
July 29, 2019
Hisato Kato
Looking for a Different Type of Travel Experience
• As a global and domestic traveler
• Used to consult guidebooks and seek advices from hotel concierges
• Getting a bit tired of just visiting famous places and attractions
• Felt like just re-experiencing what other people had experienced
• Use the new technology I learned in the course(*) to offer to
myself new experiences for not-so-popular places
(*) https://www.coursera.org/specializations/ibm-data-science-professional-certificate
2
Approaches
• First, choose a pivotal geo-location dataset in order to explore
with Web APIs
• Option 1: 744 cities in Japan
http://worldpopulationreview.com/countries/japan-population/cities/
Not new. Guidebooks are available from multiple publishers. → ❌
• Option 2: Post office location data in Japan
24,376 post offices, with latitudes and longitudes
Source: Japan Geographic Data Center (in Japanese)
http://www.kokudo.or.jp/database/005.html
→ Looks promising for my purpose ⭕️
• My travel preference
• Not so popular places, yet not too natural and wild
• Accessible with rent-a-car; Not too far from hotels and inns; Somewhat
civilized
3
Side note: About Post Offices (Yuubin-kyoku) in Japan
• Not just handling surface mails
• ATMs
• Teller counters for financial institutions
• “Yuucho” Bank: Savings & Loans
• “Kampo” Life Insurance: Policies & Loans
• Gift catalog + delivery service: “YuuPack”
• Implication: you can draw cash while traveling and speak with
people with standard accent when need arises
• Related to civilization
• Modern postal system in Japan established 148 years ago (1871)
• Used to be government-owned
• Historically, the head of local post office is/was a person with
influence in each vicinity
4
Data to be used
• Geo-location data for 99 post offices
in Hokkaido, Japan
• Hokkaido: the northern-most, largest
prefecture in Japan
• https://en.wikipedia.org/wiki/Hokkaido
• Out of 1,499 post offices in Hokkaido,
I use 99 data points available free of
charge from the Japan Geographic Data
Center
http://www.kokudo.or.jp/database/005.html
5
APIs to be used
• Map rendering: Folium
https://python-visualization.github.io/folium/index.html
• Venue data: Foursquare Places API
https://developer.foursquare.com/places-api
• Get Trending Venues
• Get Venue Recommendations
• Get Venue Categories
6
99 post office locations in Hokkaido, Japan
7
Map rendered with Folium.
Location data: https://github.com/hisakato/Capstone/blob/master/2019-07_post-office-Hokkaido1e.csv
Jupyter notebook: https://github.com/hisakato/Capstone/blob/master/Kato_Hokkaido4d.ipynb
Picking up candidate locations to travel …
• Excluding where I already visited
• Sapporo (largest city with ~2M population)
• Otaru (very popular, scenic city)
• Yoichi (famous Nikka Whisky distillery)
• Excluding other big cities
• Muroran
• Tomakomai
• 78 locations left (out of 99 places mentioned before)
• My interests this time
• Far ends (East, West, North, …)
• Inland areas with interesting names
8
Check for trending venues
• Foursquare Developers: Get Trending Venues
• https://developer.foursquare.com/docs/api/venues/trending
• The only trending venue around 78 post office locations is an
airport …
• This API might not be very useful for Hokkaido, Japan.
• But this is OK for me. I am interested in not-so-popular places.
9
(Technique) Picking up where to visit next
Larger latitude = upward = further north
Larger longitude = to the right = further east
• Choosing places with Pandas functions
• Top 2 latitude (North-end): Horo, Hamamasu
• Top 4 longitude (East-end):
Hidaka Meguro, Shoya, Erimo Misaki, Erimo
• Bottom 2 longitude (West-end): Shimamaki, Honme
• Choosing places by clicking on a blue marker and reading the
popped-up name. Chosen inland places with interesting names
• Mid-south-east: Niwan, Biratori
• Western part: Nakoma, Konbu
10
<Folium map in Jupyter Notebook>
(Technique) Calculate the distance between two points based on
latitude and longitude
• Sample Python code in Stack Overflow
https://stackoverflow.com/questions/19412462/getting-distance-between-two-
points-based-on-latitude-longitude
• Example 1: How far is “Hidaka Meguro” from “Erimo Misaki”?
• 22.2 km
• Example 2: How far is “Nakoma” from major post offices
• from Sapporo Chuo to Nakoma: 79.3 km
• from Otaru to Nakoma: 61.9 km
• from Muroran to Nakoma: 70.1 km
• from Tomakomai to Nakoma: 96.5 km
11
Looking for neighborhood venues around the target locations
• Foursquare Developers: Get Venue Recommendations
• https://developer.foursquare.com/docs/api/venues/explore
• Any interesting places around “Hidaka Meguro”?
• Erimo Golden Tunnel
• https://ja.wikipedia.org/wiki/%E3%81%88%E3%82%8A%E3%82%82%E9%BB%84%
E9%87%91%E3%83%88%E3%83%B3%E3%83%8D%E3%83%AB
• Hmm ... The name sounds gorgeous, but the picture on Wikipedia isn’t.
• Any interesting places around “Nakoma”?
• Fish and Nakoma museum
• https://rankoshi-tourism.com/spot/spot04-02/
• The name is interesting ... Is it related to British fish and chips?
Probably no. Anyway, it drew my attention. 12
Interested in what kind of venue categories there are
and listed up all the venue categories
• Foursquare Developers: Get Venue Categories (API)
• https://developer.foursquare.com/docs/api/venues/categories
• Nested, 5 levels
13
Level # of entries Example
1 10 Food
2 456 Latin American Restaurant
3 367 South American Restaurant
4 91 Brazilian Restaurant
5 13 Tapiocaria
(Applying Machine Learning Techniques)
Which target locations are close together?
Density-based clustering
• Clustering 78 candidate
locations
• Same Color
= Neighboring locations
within a specified
distance (ε)
• ε = 15km
14
Changing ε in density-based clustering
• Number of clusters and
Number of outliers
change according to
the parameter ε.
• Number of outliers (singular
points without a neighbor)
monotonically decreases
to zero.
• Number of clusters increases,
and then decreases to one.
(All locations in one cluster.)
15
Discussion
• Good starting point for choosing next places to travel
• Post office location data + Web APIs (Folium, Foursquare)
• Speak with a post office teller to explore the vicinity
• Buy a stamp, send a post card to a friend
• Ask for a “YuuPack” gift catalog, choose a gift, pay for it, and
arrange delivery via post office network
• Ask a post office teller (or the head of post office) to introduce
interesting places around (only if they are not busy working. Usually
they aren’t)
• Safety? Doing this is safe in Japan
16
Conclusions
• Came up with a new way of travel planning
• Future plans
• Obtain all post office geo-location data and explore other prefectures
• Need other web services to complete a travel planning
• Car navigation (www.google.com/maps)
• Train navigation (ekitan.com (in Japanese))
• Gourmet navigation (www.gnavi.co.jp (in Japanese))
17

Weitere ähnliche Inhalte

Ähnlich wie Casual Travel Planner: Exploring Venues around Post Offices with Web APIs

Geeks bearing gifts september2012
Geeks bearing gifts september2012Geeks bearing gifts september2012
Geeks bearing gifts september2012
ayoungkin
 
How to Enhance Library Instruction with Mobile Devices
How to Enhance Library Instruction with Mobile DevicesHow to Enhance Library Instruction with Mobile Devices
How to Enhance Library Instruction with Mobile Devices
ALATechSource
 
AMA workshop - Optimising Websites for Mobile
AMA workshop - Optimising Websites for MobileAMA workshop - Optimising Websites for Mobile
AMA workshop - Optimising Websites for Mobile
Jack Harris
 

Ähnlich wie Casual Travel Planner: Exploring Venues around Post Offices with Web APIs (20)

NJAET presentation
NJAET  presentationNJAET  presentation
NJAET presentation
 
Computer-assisted reporting seminar
Computer-assisted reporting seminarComputer-assisted reporting seminar
Computer-assisted reporting seminar
 
QR Codes in Schools and Libraries
QR Codes in Schools and LibrariesQR Codes in Schools and Libraries
QR Codes in Schools and Libraries
 
Geeks bearing gifts september2012
Geeks bearing gifts september2012Geeks bearing gifts september2012
Geeks bearing gifts september2012
 
Making the Library Mobile on a Shoestring Budget
Making the Library Mobile on a Shoestring BudgetMaking the Library Mobile on a Shoestring Budget
Making the Library Mobile on a Shoestring Budget
 
Building Digital Collections: Planning and Creating
Building Digital Collections: Planning and CreatingBuilding Digital Collections: Planning and Creating
Building Digital Collections: Planning and Creating
 
VentureLab - Find It!
VentureLab - Find It!VentureLab - Find It!
VentureLab - Find It!
 
Final challenge fabriries
Final challenge fabririesFinal challenge fabriries
Final challenge fabriries
 
QR Codes Workshop
QR Codes WorkshopQR Codes Workshop
QR Codes Workshop
 
The Art of APPlication: Using Apps to Engage Students as Collaborators, Creat...
The Art of APPlication: Using Apps to Engage Students as Collaborators, Creat...The Art of APPlication: Using Apps to Engage Students as Collaborators, Creat...
The Art of APPlication: Using Apps to Engage Students as Collaborators, Creat...
 
Metro pdf version
Metro pdf versionMetro pdf version
Metro pdf version
 
Digimap Ordnance Survey Collection - Essentials
Digimap Ordnance Survey Collection - EssentialsDigimap Ordnance Survey Collection - Essentials
Digimap Ordnance Survey Collection - Essentials
 
Desarrollando su modelo de inteligencia competitiva propio basado en la exper...
Desarrollando su modelo de inteligencia competitiva propio basado en la exper...Desarrollando su modelo de inteligencia competitiva propio basado en la exper...
Desarrollando su modelo de inteligencia competitiva propio basado en la exper...
 
Writing The Research Paper A Handbook (7th ed) - Ch 5 computers and the resea...
Writing The Research Paper A Handbook (7th ed) - Ch 5 computers and the resea...Writing The Research Paper A Handbook (7th ed) - Ch 5 computers and the resea...
Writing The Research Paper A Handbook (7th ed) - Ch 5 computers and the resea...
 
Building a Flexible UI with Oracle ApEx
Building a Flexible UI with Oracle ApExBuilding a Flexible UI with Oracle ApEx
Building a Flexible UI with Oracle ApEx
 
How to Enhance Library Instruction with Mobile Devices
How to Enhance Library Instruction with Mobile DevicesHow to Enhance Library Instruction with Mobile Devices
How to Enhance Library Instruction with Mobile Devices
 
AMA workshop - Optimising Websites for Mobile
AMA workshop - Optimising Websites for MobileAMA workshop - Optimising Websites for Mobile
AMA workshop - Optimising Websites for Mobile
 
Engaging Your Audience Through Online Technologies: Session 2
Engaging Your Audience Through Online Technologies: Session 2Engaging Your Audience Through Online Technologies: Session 2
Engaging Your Audience Through Online Technologies: Session 2
 
Intoduction to Koha Technical Services
Intoduction to Koha Technical ServicesIntoduction to Koha Technical Services
Intoduction to Koha Technical Services
 
Mobile UX London 2016 Conference Workshop - Chi Chung Tsang - User Research
Mobile UX London 2016 Conference Workshop - Chi Chung Tsang - User ResearchMobile UX London 2016 Conference Workshop - Chi Chung Tsang - User Research
Mobile UX London 2016 Conference Workshop - Chi Chung Tsang - User Research
 

Kürzlich hochgeladen

Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
gajnagarg
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Klinik kandungan
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
nirzagarg
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
nirzagarg
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
nirzagarg
 
Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...
gajnagarg
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
gajnagarg
 
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
HyderabadDolls
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
nirzagarg
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
ahmedjiabur940
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
HyderabadDolls
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 

Kürzlich hochgeladen (20)

Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...
💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...
💞 Safe And Secure Call Girls Agra Call Girls Service Just Call 🍑👄6378878445 🍑...
 
Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 
Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 

Casual Travel Planner: Exploring Venues around Post Offices with Web APIs

  • 1. Casual Travel Planner: Exploring Venues around Post Offices with Web APIs: Hokkaido, Japan Coursera: IBM Data Science Professional Certificate: Capstone Project July 29, 2019 Hisato Kato
  • 2. Looking for a Different Type of Travel Experience • As a global and domestic traveler • Used to consult guidebooks and seek advices from hotel concierges • Getting a bit tired of just visiting famous places and attractions • Felt like just re-experiencing what other people had experienced • Use the new technology I learned in the course(*) to offer to myself new experiences for not-so-popular places (*) https://www.coursera.org/specializations/ibm-data-science-professional-certificate 2
  • 3. Approaches • First, choose a pivotal geo-location dataset in order to explore with Web APIs • Option 1: 744 cities in Japan http://worldpopulationreview.com/countries/japan-population/cities/ Not new. Guidebooks are available from multiple publishers. → ❌ • Option 2: Post office location data in Japan 24,376 post offices, with latitudes and longitudes Source: Japan Geographic Data Center (in Japanese) http://www.kokudo.or.jp/database/005.html → Looks promising for my purpose ⭕️ • My travel preference • Not so popular places, yet not too natural and wild • Accessible with rent-a-car; Not too far from hotels and inns; Somewhat civilized 3
  • 4. Side note: About Post Offices (Yuubin-kyoku) in Japan • Not just handling surface mails • ATMs • Teller counters for financial institutions • “Yuucho” Bank: Savings & Loans • “Kampo” Life Insurance: Policies & Loans • Gift catalog + delivery service: “YuuPack” • Implication: you can draw cash while traveling and speak with people with standard accent when need arises • Related to civilization • Modern postal system in Japan established 148 years ago (1871) • Used to be government-owned • Historically, the head of local post office is/was a person with influence in each vicinity 4
  • 5. Data to be used • Geo-location data for 99 post offices in Hokkaido, Japan • Hokkaido: the northern-most, largest prefecture in Japan • https://en.wikipedia.org/wiki/Hokkaido • Out of 1,499 post offices in Hokkaido, I use 99 data points available free of charge from the Japan Geographic Data Center http://www.kokudo.or.jp/database/005.html 5
  • 6. APIs to be used • Map rendering: Folium https://python-visualization.github.io/folium/index.html • Venue data: Foursquare Places API https://developer.foursquare.com/places-api • Get Trending Venues • Get Venue Recommendations • Get Venue Categories 6
  • 7. 99 post office locations in Hokkaido, Japan 7 Map rendered with Folium. Location data: https://github.com/hisakato/Capstone/blob/master/2019-07_post-office-Hokkaido1e.csv Jupyter notebook: https://github.com/hisakato/Capstone/blob/master/Kato_Hokkaido4d.ipynb
  • 8. Picking up candidate locations to travel … • Excluding where I already visited • Sapporo (largest city with ~2M population) • Otaru (very popular, scenic city) • Yoichi (famous Nikka Whisky distillery) • Excluding other big cities • Muroran • Tomakomai • 78 locations left (out of 99 places mentioned before) • My interests this time • Far ends (East, West, North, …) • Inland areas with interesting names 8
  • 9. Check for trending venues • Foursquare Developers: Get Trending Venues • https://developer.foursquare.com/docs/api/venues/trending • The only trending venue around 78 post office locations is an airport … • This API might not be very useful for Hokkaido, Japan. • But this is OK for me. I am interested in not-so-popular places. 9
  • 10. (Technique) Picking up where to visit next Larger latitude = upward = further north Larger longitude = to the right = further east • Choosing places with Pandas functions • Top 2 latitude (North-end): Horo, Hamamasu • Top 4 longitude (East-end): Hidaka Meguro, Shoya, Erimo Misaki, Erimo • Bottom 2 longitude (West-end): Shimamaki, Honme • Choosing places by clicking on a blue marker and reading the popped-up name. Chosen inland places with interesting names • Mid-south-east: Niwan, Biratori • Western part: Nakoma, Konbu 10 <Folium map in Jupyter Notebook>
  • 11. (Technique) Calculate the distance between two points based on latitude and longitude • Sample Python code in Stack Overflow https://stackoverflow.com/questions/19412462/getting-distance-between-two- points-based-on-latitude-longitude • Example 1: How far is “Hidaka Meguro” from “Erimo Misaki”? • 22.2 km • Example 2: How far is “Nakoma” from major post offices • from Sapporo Chuo to Nakoma: 79.3 km • from Otaru to Nakoma: 61.9 km • from Muroran to Nakoma: 70.1 km • from Tomakomai to Nakoma: 96.5 km 11
  • 12. Looking for neighborhood venues around the target locations • Foursquare Developers: Get Venue Recommendations • https://developer.foursquare.com/docs/api/venues/explore • Any interesting places around “Hidaka Meguro”? • Erimo Golden Tunnel • https://ja.wikipedia.org/wiki/%E3%81%88%E3%82%8A%E3%82%82%E9%BB%84% E9%87%91%E3%83%88%E3%83%B3%E3%83%8D%E3%83%AB • Hmm ... The name sounds gorgeous, but the picture on Wikipedia isn’t. • Any interesting places around “Nakoma”? • Fish and Nakoma museum • https://rankoshi-tourism.com/spot/spot04-02/ • The name is interesting ... Is it related to British fish and chips? Probably no. Anyway, it drew my attention. 12
  • 13. Interested in what kind of venue categories there are and listed up all the venue categories • Foursquare Developers: Get Venue Categories (API) • https://developer.foursquare.com/docs/api/venues/categories • Nested, 5 levels 13 Level # of entries Example 1 10 Food 2 456 Latin American Restaurant 3 367 South American Restaurant 4 91 Brazilian Restaurant 5 13 Tapiocaria
  • 14. (Applying Machine Learning Techniques) Which target locations are close together? Density-based clustering • Clustering 78 candidate locations • Same Color = Neighboring locations within a specified distance (ε) • ε = 15km 14
  • 15. Changing ε in density-based clustering • Number of clusters and Number of outliers change according to the parameter ε. • Number of outliers (singular points without a neighbor) monotonically decreases to zero. • Number of clusters increases, and then decreases to one. (All locations in one cluster.) 15
  • 16. Discussion • Good starting point for choosing next places to travel • Post office location data + Web APIs (Folium, Foursquare) • Speak with a post office teller to explore the vicinity • Buy a stamp, send a post card to a friend • Ask for a “YuuPack” gift catalog, choose a gift, pay for it, and arrange delivery via post office network • Ask a post office teller (or the head of post office) to introduce interesting places around (only if they are not busy working. Usually they aren’t) • Safety? Doing this is safe in Japan 16
  • 17. Conclusions • Came up with a new way of travel planning • Future plans • Obtain all post office geo-location data and explore other prefectures • Need other web services to complete a travel planning • Car navigation (www.google.com/maps) • Train navigation (ekitan.com (in Japanese)) • Gourmet navigation (www.gnavi.co.jp (in Japanese)) 17