Extract Landmarks Data in Melbourne from Wikipedia Interactively

Extract landmarks data:

  • category,
  • name,
  • (latitude, longitude)

from Wikipedia page landmarks in Melbourne in an interactive way.


In [1]:
%matplotlib inline

import requests, re, os
from bs4 import BeautifulSoup
from bs4.element import Tag
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import lxml
from fastkml import kml, styles
from shapely.geometry import Point

URL for the landmarks in the Melbourne city centre.


In [2]:
#url = 'https://en.wikipedia.org/wiki/Template:Melbourne_landmarks'
url = 'https://en.wikipedia.org/wiki/Template:Melbourne_landmarks?action=render' # cleaner HTML
data_dir = '../data'
fpoi = os.path.join(data_dir, 'poi-Melb-0.csv')

In [3]:
response = requests.get(url, timeout=10)

In [4]:
html = response.text
soup = BeautifulSoup(html, 'html.parser')

In [5]:
#print(soup.prettify())

Extract POI coordinates from its Wikipedia page

NOTE that there could be more than one coordinate pairs exists in a page, e.g. Yarra River.


In [6]:
def extract_coord(url):
    """
    Assume a URL of a location with a Wikipedia page
    """
    url1 = url + '?action=render' # cleaner HTML
    response = requests.get(url1, timeout=10)
    html = response.text
    soup = BeautifulSoup(html, 'html.parser')
    coords = list(soup.find_all('span', {'class':'geo-dec'}))
    if coords is None or len(coords) == 0:
        print('No Geo-coordinates found')
        return
    
    idx = 0
    if len(coords) > 1:
        if len(coords) == 2 and coords[0].string == coords[1].string:
            idx = 0
        else:
            print('WARN: more than one geo-coordinates detected!')
            print('please check the actual page', url)
            for i, c in enumerate(coords): 
                  print('%d: %s' % (i, c.string))
            ii = input('Input the index of the correct coordinates... ')
            idx = int(ii)
            assert(0 <= idx < len(coords))
    
    coord = coords[idx]
    children = list(coord.children)
    assert(len(children) > 0)
    coordstr = children[0]
    #print(coordstr)
    
    ss = re.sub(r'\s+', ',', coordstr).split(',') # replace blank spaces with ','
    assert(len(ss) == 2)
    latstr = ss[0].split('°') # e.g. 37.82167°S
    lonstr = ss[1].split('°') # e.g. 144.96778°E
    
    assert(len(latstr) == 2 and len(lonstr) == 2)
    lat = float(latstr[0]) if latstr[1] == 'N' else -1 * float(latstr[0])
    lon = float(lonstr[0]) if lonstr[1] == 'E' else -1 * float(lonstr[0])
    
    print(lat, lon)
    return (lat, lon, url)

In [7]:
extract_coord('https://en.wikipedia.org/wiki/Yarra_River')


WARN: more than one geo-coordinates detected!
please check the actual page https://en.wikipedia.org/wiki/Yarra_River
0: 37.74917°S 146.14056°E
1: 37.85194°S 144.90833°E
2: 37.85194°S 144.90833°E
Input the index of the correct coordinates... 1
-37.85194 144.90833
Out[7]:
(-37.85194, 144.90833, 'https://en.wikipedia.org/wiki/Yarra_River')

Extract POI data, e.g. category, name, coordinates, from a HTML string retrieved from Wikipedia.


In [8]:
def extract_poi(html):
    """
    Assume POI category is a string in <th>
    POI name and hyperlink is in <li> contained in an unordered list <ul> 
    """
    soup = BeautifulSoup(html, 'html.parser')
    th = soup.find('th')
    if th is None:
        print('NO POI category found')
        return
    assert(len(th.contents) > 0)
    cat = th.contents[0]
    print('CAT:', cat)
    
    ul = soup.find('ul')
    if ul is None:
        print('NO POI found')
        return
    
    poi_data = [] # (name, cat, lat, lon, url)
    
    for li in ul.children:
        #print(type(li), li)
        if isinstance(li, Tag):
            addr = ''.join(['https:', li.a['href']])
            children = list(li.a.children)
            assert(len(children) > 0)            
            name = children[0]
            print(addr, name)
            ret = extract_coord(addr)
            if ret is not None:
                poi_data.append((name, cat, ret[0], ret[1], ret[2]))
    return poi_data

Extract POI data from landmarks in Melbourne recorded in this Wikipedia page.


In [9]:
#columns = ['Name', 'Category', 'Latitude', 'Longitude']
columns = ['poiName', 'poiTheme', 'poiLat', 'poiLon', 'poiURL']
poi_df = pd.DataFrame(columns=columns)

In [10]:
table = soup.find('table', {'class':'navbox-inner'}) # this class info was found by looking at the raw HTML text

Interactively check if the portion of HTML contains a category and a list of POIs of that category.


In [11]:
cnt = 0
hline = '-'*90
for c in table.children:
    print(hline)
    print('NODE %d BEGIN' % cnt)
    print(c)
    print('NODE %d END' % cnt)
    print(hline)
    k = input('Press [Y] or [y] to extract POI, press any other key to ignore ')
    if k == 'Y' or k == 'y':
        print('Extracting POI...')
        poi_data = extract_poi(str(c))
        for t in poi_data: poi_df.loc[poi_df.shape[0]] = [t[i] for i in range(len(t))]
    else:
        print('IGNORED.')
    print('\n\n')
    
    cnt += 1


------------------------------------------------------------------------------------------
NODE 0 BEGIN


NODE 0 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 1 BEGIN
<tr>
<th class="navbox-title" colspan="2" scope="col">
<div class="plainlinks hlist navbar mini">
<ul>
<li class="nv-view"><strong class="selflink"><abbr style=";;background:none transparent;border:none;" title="View this template">v</abbr></strong></li>
<li class="nv-talk"><a href="//en.wikipedia.org/wiki/Template_talk:Melbourne_landmarks" title="Template talk:Melbourne landmarks"><abbr style=";;background:none transparent;border:none;" title="Discuss this template">t</abbr></a></li>
<li class="nv-edit"><a class="external text" href="//en.wikipedia.org/w/index.php?title=Template:Melbourne_landmarks&amp;action=edit"><abbr style=";;background:none transparent;border:none;" title="Edit this template">e</abbr></a></li>
</ul>
</div>
<div style="font-size:114%">Landmarks in the <a href="//en.wikipedia.org/wiki/Melbourne_City_Centre" title="Melbourne City Centre">Melbourne City Centre</a></div>
</th>
</tr>
NODE 1 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 2 BEGIN


NODE 2 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 3 BEGIN
<tr style="height:2px">
<td colspan="2"></td>
</tr>
NODE 3 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 4 BEGIN


NODE 4 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 5 BEGIN
<tr>
<td class="navbox-abovebelow" colspan="2">
<div><b>Note:</b> this includes landmarks in the <a href="//en.wikipedia.org/wiki/Melbourne_City_Centre" title="Melbourne City Centre">Melbourne City Centre</a> and its fringe areas, not the <a href="//en.wikipedia.org/wiki/Melbourne" title="Melbourne">Greater Melbourne</a> metropolitan area</div>
</td>
</tr>
NODE 5 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 6 BEGIN


NODE 6 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 7 BEGIN
<tr style="height:2px">
<td colspan="2"></td>
</tr>
NODE 7 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 8 BEGIN


NODE 8 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 9 BEGIN
<tr>
<th class="navbox-group" scope="row" style="text-align:right; width:6%;">City precincts</th>
<td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;text-align:left;">
<div style="padding:0em 0.25em">
<ul>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Arts_Precinct" title="Melbourne Arts Precinct">Arts Precinct</a></li>
<li><a href="//en.wikipedia.org/wiki/Chinatown,_Melbourne" title="Chinatown, Melbourne">Chinatown</a></li>
<li><a href="//en.wikipedia.org/wiki/Docklands,_Victoria" title="Docklands, Victoria">Docklands</a></li>
<li><a href="//en.wikipedia.org/wiki/Spring_Street,_Melbourne" title="Spring Street, Melbourne">Government Precinct</a></li>
<li><a href="//en.wikipedia.org/wiki/Greek_Precinct,_Melbourne" title="Greek Precinct, Melbourne">Greek Precinct</a></li>
<li><a href="//en.wikipedia.org/wiki/Little_Italy,_Melbourne" title="Little Italy, Melbourne">Little Italy</a></li>
<li><a href="//en.wikipedia.org/wiki/Collins_Street,_Melbourne" title="Collins Street, Melbourne">Paris End</a></li>
<li><a href="//en.wikipedia.org/wiki/City_campus_of_the_Royal_Melbourne_Institute_of_Technology" title="City campus of the Royal Melbourne Institute of Technology">RMIT City</a></li>
<li><a href="//en.wikipedia.org/wiki/Southbank,_Victoria" title="Southbank, Victoria">Southbank</a>/<a href="//en.wikipedia.org/wiki/South_Wharf,_Victoria" title="South Wharf, Victoria">Wharf</a></li>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Sports_and_Entertainment_Precinct" title="Melbourne Sports and Entertainment Precinct">Sports and Entertainment Precinct</a></li>
<li><a href="//en.wikipedia.org/wiki/University_of_Melbourne" title="University of Melbourne">University of Melbourne</a></li>
</ul>
</div>
</td>
</tr>
NODE 9 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore y
Extracting POI...
CAT: City precincts
https://en.wikipedia.org/wiki/Melbourne_Arts_Precinct Arts Precinct
-37.82167 144.96778
https://en.wikipedia.org/wiki/Chinatown,_Melbourne Chinatown
No Geo-coordinates found
https://en.wikipedia.org/wiki/Docklands,_Victoria Docklands
-37.817 144.946
https://en.wikipedia.org/wiki/Spring_Street,_Melbourne Government Precinct
-37.8119 144.973
https://en.wikipedia.org/wiki/Greek_Precinct,_Melbourne Greek Precinct
No Geo-coordinates found
https://en.wikipedia.org/wiki/Little_Italy,_Melbourne Little Italy
-37.79972 144.96694
https://en.wikipedia.org/wiki/Collins_Street,_Melbourne Paris End
-37.8168 144.9622
https://en.wikipedia.org/wiki/City_campus_of_the_Royal_Melbourne_Institute_of_Technology RMIT City
-37.80778 144.96333
https://en.wikipedia.org/wiki/Southbank,_Victoria Southbank
-37.829 144.957
https://en.wikipedia.org/wiki/Melbourne_Sports_and_Entertainment_Precinct Sports and Entertainment Precinct
-37.81667 144.98333
https://en.wikipedia.org/wiki/University_of_Melbourne University of Melbourne
-37.7963 144.9614



------------------------------------------------------------------------------------------
NODE 10 BEGIN


NODE 10 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 11 BEGIN
<tr style="height:2px">
<td colspan="2"></td>
</tr>
NODE 11 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 12 BEGIN


NODE 12 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 13 BEGIN
<tr>
<th class="navbox-group" scope="row" style="text-align:right; width:6%;">Shopping</th>
<td class="navbox-list navbox-even" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;text-align:left;">
<div style="padding:0em 0.25em">
<ul>
<li><a href="//en.wikipedia.org/wiki/Block_Arcade,_Melbourne" title="Block Arcade, Melbourne">Block Arcade</a></li>
<li><a href="//en.wikipedia.org/wiki/Bourke_Street,_Melbourne" title="Bourke Street, Melbourne">Bourke Street</a></li>
<li><a href="//en.wikipedia.org/wiki/Bridge_Road,_Melbourne" title="Bridge Road, Melbourne">Bridge Road</a></li>
<li><a href="//en.wikipedia.org/wiki/Brunswick_Street,_Melbourne" title="Brunswick Street, Melbourne">Brunswick Street</a></li>
<li><a href="//en.wikipedia.org/wiki/Chapel_Street,_Melbourne" title="Chapel Street, Melbourne">Chapel Street</a></li>
<li><a href="//en.wikipedia.org/wiki/Centre_Place,_Melbourne" title="Centre Place, Melbourne">Centre Place</a></li>
<li><a href="//en.wikipedia.org/wiki/Collins_Street,_Melbourne" title="Collins Street, Melbourne">Collins Street</a></li>
<li><a href="//en.wikipedia.org/wiki/Degraves_Street,_Melbourne" title="Degraves Street, Melbourne">Degraves Street</a></li>
<li><a href="//en.wikipedia.org/wiki/Direct_Factory_Outlets" title="Direct Factory Outlets">DFO South Wharf</a></li>
<li><a href="//en.wikipedia.org/wiki/Elizabeth_Street,_Melbourne" title="Elizabeth Street, Melbourne">Elizabeth Street</a></li>
<li><a href="//en.wikipedia.org/wiki/Flinders_Lane,_Melbourne" title="Flinders Lane, Melbourne">Flinders Lane</a></li>
<li><a class="mw-redirect" href="//en.wikipedia.org/wiki/Melbourne_General_Post_Office" title="Melbourne General Post Office">GPO Melbourne</a></li>
<li><a href="//en.wikipedia.org/wiki/Harbour_Town" title="Harbour Town">Harbour Town Docklands</a></li>
<li><a href="//en.wikipedia.org/wiki/Little_Collins_Street,_Melbourne" title="Little Collins Street, Melbourne">Little Collins Street</a></li>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Central_Shopping_Centre" title="Melbourne Central Shopping Centre">Melbourne Central Shopping Centre</a></li>
<li><a href="//en.wikipedia.org/wiki/Myer" title="Myer">Myer Emporium</a></li>
<li><a href="//en.wikipedia.org/wiki/Pran_Central" title="Pran Central">Pran Central</a></li>
<li><a href="//en.wikipedia.org/wiki/Queen_Victoria_Market" title="Queen Victoria Market">Queen Victoria Market</a></li>
<li><a href="//en.wikipedia.org/wiki/Queen_Victoria_Village" title="Queen Victoria Village">Queen Victoria Village</a></li>
<li><a href="//en.wikipedia.org/wiki/Royal_Arcade,_Melbourne" title="Royal Arcade, Melbourne">Royal Arcade</a></li>
<li><a href="//en.wikipedia.org/wiki/Swanston_Street,_Melbourne" title="Swanston Street, Melbourne">Swanston Street</a></li>
</ul>
</div>
</td>
</tr>
NODE 13 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore y
Extracting POI...
CAT: Shopping
https://en.wikipedia.org/wiki/Block_Arcade,_Melbourne Block Arcade
-37.81583 144.96444
https://en.wikipedia.org/wiki/Bourke_Street,_Melbourne Bourke Street
-37.8139 144.96452
https://en.wikipedia.org/wiki/Bridge_Road,_Melbourne Bridge Road
-37.8175639 144.9903278
https://en.wikipedia.org/wiki/Brunswick_Street,_Melbourne Brunswick Street
-37.79833 144.978472
https://en.wikipedia.org/wiki/Chapel_Street,_Melbourne Chapel Street
-37.84083 144.99528
https://en.wikipedia.org/wiki/Centre_Place,_Melbourne Centre Place
-37.816583 144.9655
https://en.wikipedia.org/wiki/Collins_Street,_Melbourne Collins Street
-37.8168 144.9622
https://en.wikipedia.org/wiki/Degraves_Street,_Melbourne Degraves Street
-37.8175 144.96583
https://en.wikipedia.org/wiki/Direct_Factory_Outlets DFO South Wharf
No Geo-coordinates found
https://en.wikipedia.org/wiki/Elizabeth_Street,_Melbourne Elizabeth Street
-37.8096 144.961
https://en.wikipedia.org/wiki/Flinders_Lane,_Melbourne Flinders Lane
-37.81694 144.96556
https://en.wikipedia.org/wiki/Melbourne_General_Post_Office GPO Melbourne
-37.81384 144.963028
https://en.wikipedia.org/wiki/Harbour_Town Harbour Town Docklands
-27.9319944 153.3887222
https://en.wikipedia.org/wiki/Little_Collins_Street,_Melbourne Little Collins Street
-37.8151 144.9641
https://en.wikipedia.org/wiki/Melbourne_Central_Shopping_Centre Melbourne Central Shopping Centre
-37.81056 144.96
https://en.wikipedia.org/wiki/Myer Myer Emporium
No Geo-coordinates found
https://en.wikipedia.org/wiki/Pran_Central Pran Central
-37.847414 144.993503
https://en.wikipedia.org/wiki/Queen_Victoria_Market Queen Victoria Market
-37.806966 144.956693
https://en.wikipedia.org/wiki/Queen_Victoria_Village Queen Victoria Village
-37.81 144.9652
https://en.wikipedia.org/wiki/Royal_Arcade,_Melbourne Royal Arcade
-37.8145 144.9641
https://en.wikipedia.org/wiki/Swanston_Street,_Melbourne Swanston Street
-37.8064 144.963



------------------------------------------------------------------------------------------
NODE 14 BEGIN


NODE 14 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 15 BEGIN
<tr style="height:2px">
<td colspan="2"></td>
</tr>
NODE 15 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 16 BEGIN


NODE 16 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 17 BEGIN
<tr>
<th class="navbox-group" scope="row" style="text-align:right; width:6%;">Entertainment</th>
<td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;text-align:left;">
<div style="padding:0em 0.25em">
<ul>
<li><a href="//en.wikipedia.org/wiki/Colonial_Tramcar_Restaurant" title="Colonial Tramcar Restaurant">Tramcar Restaurant</a></li>
<li><a href="//en.wikipedia.org/wiki/Crown_Casino_and_Entertainment_Complex" title="Crown Casino and Entertainment Complex">Crown Casino and Entertainment Complex</a></li>
<li><a href="//en.wikipedia.org/wiki/Luna_Park,_Melbourne" title="Luna Park, Melbourne">Luna Park</a></li>
<li><a href="//en.wikipedia.org/wiki/Sea_Life_Melbourne_Aquarium" title="Sea Life Melbourne Aquarium">Melbourne Aquarium</a></li>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Visitor_Shuttle" title="Melbourne Visitor Shuttle">Melbourne Visitor Shuttle</a></li>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Zoo" title="Melbourne Zoo">Melbourne Zoo</a></li>
<li><i>See also: <a href="//en.wikipedia.org/wiki/List_of_theatres_in_the_Melbourne_City_Centre" title="List of theatres in the Melbourne City Centre">Theatres in the Melbourne City Centre</a></i></li>
</ul>
</div>
</td>
</tr>
NODE 17 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore y
Extracting POI...
CAT: Entertainment
https://en.wikipedia.org/wiki/Colonial_Tramcar_Restaurant Tramcar Restaurant
No Geo-coordinates found
https://en.wikipedia.org/wiki/Crown_Casino_and_Entertainment_Complex Crown Casino and Entertainment Complex
-37.822324 144.960099
https://en.wikipedia.org/wiki/Luna_Park,_Melbourne Luna Park
-37.868036 144.976369
https://en.wikipedia.org/wiki/Sea_Life_Melbourne_Aquarium Melbourne Aquarium
-37.821044 144.958017
https://en.wikipedia.org/wiki/Melbourne_Visitor_Shuttle Melbourne Visitor Shuttle
No Geo-coordinates found
https://en.wikipedia.org/wiki/Melbourne_Zoo Melbourne Zoo
-37.784762 144.952095
https://en.wikipedia.org/wiki/List_of_theatres_in_the_Melbourne_City_Centre Theatres in the Melbourne City Centre
No Geo-coordinates found



------------------------------------------------------------------------------------------
NODE 18 BEGIN


NODE 18 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 19 BEGIN
<tr style="height:2px">
<td colspan="2"></td>
</tr>
NODE 19 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 20 BEGIN


NODE 20 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 21 BEGIN
<tr>
<th class="navbox-group" scope="row" style="text-align:right; width:6%;">Public galleries</th>
<td class="navbox-list navbox-even" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;text-align:left;">
<div style="padding:0em 0.25em">
<ul>
<li><a href="//en.wikipedia.org/wiki/Australian_Centre_for_Contemporary_Art" title="Australian Centre for Contemporary Art">Australian Centre for Contemporary Art</a></li>
<li><a href="//en.wikipedia.org/wiki/Australian_Centre_for_the_Moving_Image" title="Australian Centre for the Moving Image">Australian Centre for the Moving Image</a></li>
<li><a href="//en.wikipedia.org/wiki/Ian_Potter_Museum_of_Art" title="Ian Potter Museum of Art">Ian Potter Museum of Art</a></li>
<li><a href="//en.wikipedia.org/wiki/Ian_Potter_Centre:_NGV_Australia" title="Ian Potter Centre: NGV Australia">NGV Australia</a></li>
<li><a href="//en.wikipedia.org/wiki/National_Gallery_of_Victoria" title="National Gallery of Victoria">NGV International</a></li>
<li><a href="//en.wikipedia.org/wiki/RMIT_Gallery" title="RMIT Gallery">RMIT Gallery</a></li>
<li><i>See also: <a href="//en.wikipedia.org/wiki/List_of_museums_in_Melbourne" title="List of museums in Melbourne">Museums in Melbourne</a></i></li>
</ul>
</div>
</td>
</tr>
NODE 21 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore y
Extracting POI...
CAT: Public galleries
https://en.wikipedia.org/wiki/Australian_Centre_for_Contemporary_Art Australian Centre for Contemporary Art
-37.826497 144.967014
https://en.wikipedia.org/wiki/Australian_Centre_for_the_Moving_Image Australian Centre for the Moving Image
WARN: more than one geo-coordinates detected!
please check the actual page https://en.wikipedia.org/wiki/Australian_Centre_for_the_Moving_Image
0: 37.817438°S 144.969533°E
1: 37.8176241°S 144.9685907°E
Input the index of the correct coordinates... 1
-37.8176241 144.9685907
https://en.wikipedia.org/wiki/Ian_Potter_Museum_of_Art Ian Potter Museum of Art
-37.7975 144.964111
https://en.wikipedia.org/wiki/Ian_Potter_Centre:_NGV_Australia NGV Australia
-37.817798 144.968714
https://en.wikipedia.org/wiki/National_Gallery_of_Victoria NGV International
-37.822595 144.968634
https://en.wikipedia.org/wiki/RMIT_Gallery RMIT Gallery
No Geo-coordinates found
https://en.wikipedia.org/wiki/List_of_museums_in_Melbourne Museums in Melbourne
No Geo-coordinates found



------------------------------------------------------------------------------------------
NODE 22 BEGIN


NODE 22 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 23 BEGIN
<tr style="height:2px">
<td colspan="2"></td>
</tr>
NODE 23 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 24 BEGIN


NODE 24 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 25 BEGIN
<tr>
<th class="navbox-group" scope="row" style="text-align:right; width:6%;">Institutions</th>
<td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;text-align:left;">
<div style="padding:0em 0.25em">
<ul>
<li><a class="mw-redirect" href="//en.wikipedia.org/wiki/Melbourne_General_Post_Office" title="Melbourne General Post Office">General Post Office</a></li>
<li><a href="//en.wikipedia.org/wiki/Government_House,_Melbourne" title="Government House, Melbourne">Government House</a></li>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Observatory" title="Melbourne Observatory">Melbourne Observatory</a></li>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Town_Hall" title="Melbourne Town Hall">Melbourne Town Hall</a></li>
<li><a href="//en.wikipedia.org/wiki/Old_Melbourne_Gaol" title="Old Melbourne Gaol">Old Melbourne Gaol</a></li>
<li><a href="//en.wikipedia.org/wiki/Former_Melbourne_Magistrates%27_Court" title="Former Melbourne Magistrates' Court">Old Melbourne Magistrates' Court</a></li>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Mint" title="Melbourne Mint">Old Melbourne Mint</a></li>
<li><a href="//en.wikipedia.org/wiki/Old_Treasury_Building,_Melbourne" title="Old Treasury Building, Melbourne">Old Treasury Building</a></li>
<li><a href="//en.wikipedia.org/wiki/Parliament_House,_Melbourne" title="Parliament House, Melbourne">Parliament House</a></li>
<li><a href="//en.wikipedia.org/wiki/State_Library_of_Victoria" title="State Library of Victoria">State Library of Victoria</a></li>
<li><a href="//en.wikipedia.org/wiki/Supreme_Court_of_Victoria" title="Supreme Court of Victoria">Supreme Court of Victoria</a></li>
<li><a href="//en.wikipedia.org/wiki/Victoria_Barracks,_Melbourne" title="Victoria Barracks, Melbourne">Victoria Barracks</a></li>
</ul>
</div>
</td>
</tr>
NODE 25 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore y
Extracting POI...
CAT: Institutions
https://en.wikipedia.org/wiki/Melbourne_General_Post_Office General Post Office
-37.81384 144.963028
https://en.wikipedia.org/wiki/Government_House,_Melbourne Government House
-37.827939 144.976939
https://en.wikipedia.org/wiki/Melbourne_Observatory Melbourne Observatory
-37.8297 144.9755
https://en.wikipedia.org/wiki/Melbourne_Town_Hall Melbourne Town Hall
-37.815145 144.966777
https://en.wikipedia.org/wiki/Old_Melbourne_Gaol Old Melbourne Gaol
-37.80806 144.96528
https://en.wikipedia.org/wiki/Former_Melbourne_Magistrates%27_Court Old Melbourne Magistrates' Court
-37.8087 144.966
https://en.wikipedia.org/wiki/Melbourne_Mint Old Melbourne Mint
-37.812153 144.956794
https://en.wikipedia.org/wiki/Old_Treasury_Building,_Melbourne Old Treasury Building
-37.813153 144.974121
https://en.wikipedia.org/wiki/Parliament_House,_Melbourne Parliament House
-37.811055 144.97329
https://en.wikipedia.org/wiki/State_Library_of_Victoria State Library of Victoria
-37.809801 144.964787
https://en.wikipedia.org/wiki/Supreme_Court_of_Victoria Supreme Court of Victoria
-37.814132 144.957932
https://en.wikipedia.org/wiki/Victoria_Barracks,_Melbourne Victoria Barracks
-37.827391 144.970447



------------------------------------------------------------------------------------------
NODE 26 BEGIN


NODE 26 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 27 BEGIN
<tr style="height:2px">
<td colspan="2"></td>
</tr>
NODE 27 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 28 BEGIN


NODE 28 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 29 BEGIN
<tr>
<th class="navbox-group" scope="row" style="text-align:right; width:6%;">Structures</th>
<td class="navbox-list navbox-even" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;text-align:left;">
<div style="padding:0em 0.25em">
<ul>
<li><a href="//en.wikipedia.org/wiki/Arts_Centre_Melbourne" title="Arts Centre Melbourne">Arts Centre</a></li>
<li><a href="//en.wikipedia.org/wiki/Eureka_Tower" title="Eureka Tower">Eureka Tower</a></li>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Convention_and_Exhibition_Centre" title="Melbourne Convention and Exhibition Centre">Melbourne Convention and Exhibition Centre</a></li>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Star" title="Melbourne Star">Melbourne Star</a></li>
<li><a href="//en.wikipedia.org/wiki/Royal_Exhibition_Building" title="Royal Exhibition Building">Royal Exhibition Building</a></li>
<li><a href="//en.wikipedia.org/wiki/Shrine_of_Remembrance" title="Shrine of Remembrance">Shrine of Remembrance</a></li>
<li><a href="//en.wikipedia.org/wiki/St_Paul%27s_Cathedral,_Melbourne" title="St Paul's Cathedral, Melbourne">St Paul's Cathedral</a></li>
<li><a href="//en.wikipedia.org/wiki/St_Patrick%27s_Cathedral,_Melbourne" title="St Patrick's Cathedral, Melbourne">St Patrick's Cathedral</a></li>
</ul>
</div>
</td>
</tr>
NODE 29 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore y
Extracting POI...
CAT: Structures
https://en.wikipedia.org/wiki/Arts_Centre_Melbourne Arts Centre
-37.82028 144.96833
https://en.wikipedia.org/wiki/Eureka_Tower Eureka Tower
-37.82167 144.96444
https://en.wikipedia.org/wiki/Melbourne_Convention_and_Exhibition_Centre Melbourne Convention and Exhibition Centre
-37.8256 144.9541
https://en.wikipedia.org/wiki/Melbourne_Star Melbourne Star
-37.8110723 144.9368763
https://en.wikipedia.org/wiki/Royal_Exhibition_Building Royal Exhibition Building
-37.804728 144.971225
https://en.wikipedia.org/wiki/Shrine_of_Remembrance Shrine of Remembrance
-37.830434 144.973258
https://en.wikipedia.org/wiki/St_Paul%27s_Cathedral,_Melbourne St Paul's Cathedral
-37.816853 144.967384
https://en.wikipedia.org/wiki/St_Patrick%27s_Cathedral,_Melbourne St Patrick's Cathedral
-37.81 144.97611



------------------------------------------------------------------------------------------
NODE 30 BEGIN


NODE 30 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 31 BEGIN
<tr style="height:2px">
<td colspan="2"></td>
</tr>
NODE 31 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 32 BEGIN


NODE 32 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 33 BEGIN
<tr>
<th class="navbox-group" scope="row" style="text-align:right; width:6%;">Sports stadiums</th>
<td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;text-align:left;">
<div style="padding:0em 0.25em">
<ul>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Rectangular_Stadium" title="Melbourne Rectangular Stadium">Melbourne Rectangular Stadium (AAMI Park)</a></li>
<li><a href="//en.wikipedia.org/wiki/Docklands_Stadium" title="Docklands Stadium">Docklands Stadium (Etihad Stadium)</a></li>
<li><a href="//en.wikipedia.org/wiki/Flemington_Racecourse" title="Flemington Racecourse">Flemington Racecourse</a></li>
<li><a href="//en.wikipedia.org/wiki/Margaret_Court_Arena" title="Margaret Court Arena">Margaret Court Arena</a></li>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Park_Multi-Purpose_Venue" title="Melbourne Park Multi-Purpose Venue">Melbourne Multi Purpose Venue (Hisense Arena)</a></li>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Cricket_Ground" title="Melbourne Cricket Ground">Melbourne Cricket Ground (MCG)</a></li>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Grand_Prix_Circuit" title="Melbourne Grand Prix Circuit">Melbourne Grand Prix Circuit</a></li>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Sports_and_Aquatic_Centre" title="Melbourne Sports and Aquatic Centre">Melbourne Sports and Aquatic Centre (MSAC)</a></li>
<li><a href="//en.wikipedia.org/wiki/Lakeside_Stadium" title="Lakeside Stadium">Lakeside Stadium</a></li>
<li><a class="mw-redirect" href="//en.wikipedia.org/wiki/Medibank_Icehouse" title="Medibank Icehouse">National Ice Sports Centre (O'Brien Group Arena)</a></li>
<li><a href="//en.wikipedia.org/wiki/Olympic_Park_Stadium" title="Olympic Park Stadium">Olympic Park Stadium</a></li>
<li><a href="//en.wikipedia.org/wiki/Rod_Laver_Arena" title="Rod Laver Arena">Rod Laver Arena</a></li>
<li><a href="//en.wikipedia.org/wiki/Royal_Melbourne_Golf_Club" title="Royal Melbourne Golf Club">Royal Melbourne Golf Club</a></li>
<li><a href="//en.wikipedia.org/wiki/Princes_Park_(stadium)" title="Princes Park (stadium)">Princes Park (Ikon Park)</a></li>
</ul>
</div>
</td>
</tr>
NODE 33 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore y
Extracting POI...
CAT: Sports stadiums
https://en.wikipedia.org/wiki/Melbourne_Rectangular_Stadium Melbourne Rectangular Stadium (AAMI Park)
-37.82528 144.98389
https://en.wikipedia.org/wiki/Docklands_Stadium Docklands Stadium (Etihad Stadium)
-37.81639 144.9475
https://en.wikipedia.org/wiki/Flemington_Racecourse Flemington Racecourse
-37.79028 144.9125
https://en.wikipedia.org/wiki/Margaret_Court_Arena Margaret Court Arena
-37.821112 144.97741
https://en.wikipedia.org/wiki/Melbourne_Park_Multi-Purpose_Venue Melbourne Multi Purpose Venue (Hisense Arena)
-37.82278 144.98167
https://en.wikipedia.org/wiki/Melbourne_Cricket_Ground Melbourne Cricket Ground (MCG)
-37.82 144.98333
https://en.wikipedia.org/wiki/Melbourne_Grand_Prix_Circuit Melbourne Grand Prix Circuit
-37.84972 144.96833
https://en.wikipedia.org/wiki/Melbourne_Sports_and_Aquatic_Centre Melbourne Sports and Aquatic Centre (MSAC)
-37.84667 144.96611
https://en.wikipedia.org/wiki/Lakeside_Stadium Lakeside Stadium
-37.84028 144.965
https://en.wikipedia.org/wiki/Medibank_Icehouse National Ice Sports Centre (O'Brien Group Arena)
-37.8123777 144.9355674
https://en.wikipedia.org/wiki/Olympic_Park_Stadium Olympic Park Stadium
-37.82472 144.98111
https://en.wikipedia.org/wiki/Rod_Laver_Arena Rod Laver Arena
-37.82167 144.97833
https://en.wikipedia.org/wiki/Royal_Melbourne_Golf_Club Royal Melbourne Golf Club
-37.97 145.03
https://en.wikipedia.org/wiki/Princes_Park_(stadium) Princes Park (Ikon Park)
-37.78389 144.96167



------------------------------------------------------------------------------------------
NODE 34 BEGIN


NODE 34 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 35 BEGIN
<tr style="height:2px">
<td colspan="2"></td>
</tr>
NODE 35 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 36 BEGIN


NODE 36 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 37 BEGIN
<tr>
<th class="navbox-group" scope="row" style="text-align:right; width:6%;">Parks and spaces</th>
<td class="navbox-list navbox-even" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;text-align:left;">
<div style="padding:0em 0.25em">
<ul>
<li><a href="//en.wikipedia.org/wiki/Albert_Park_and_Lake" title="Albert Park and Lake">Albert Park and Lake</a></li>
<li><a href="//en.wikipedia.org/wiki/Alexandra_Gardens,_Melbourne" title="Alexandra Gardens, Melbourne">Alexandra Gardens</a></li>
<li><a href="//en.wikipedia.org/wiki/Birrarung_Marr,_Melbourne" title="Birrarung Marr, Melbourne">Birrarung Marr</a></li>
<li><a href="//en.wikipedia.org/wiki/Carlton_Gardens" title="Carlton Gardens">Carlton Gardens</a></li>
<li><a href="//en.wikipedia.org/wiki/City_Square,_Melbourne" title="City Square, Melbourne">City Square</a></li>
<li><a href="//en.wikipedia.org/wiki/Federation_Square" title="Federation Square">Federation Square</a></li>
<li><a href="//en.wikipedia.org/wiki/Fitzroy_Gardens" title="Fitzroy Gardens">Fitzroy Gardens</a></li>
<li><a href="//en.wikipedia.org/wiki/Flagstaff_Gardens" title="Flagstaff Gardens">Flagstaff Gardens</a></li>
<li><a class="mw-redirect" href="//en.wikipedia.org/wiki/Kings_Domain,_Melbourne" title="Kings Domain, Melbourne">Kings Domain</a></li>
<li><a class="mw-redirect" href="//en.wikipedia.org/wiki/Queen_Victoria_Gardens,_Melbourne" title="Queen Victoria Gardens, Melbourne">Queen Victoria Gardens</a></li>
<li><a href="//en.wikipedia.org/wiki/Royal_Botanic_Gardens,_Melbourne" title="Royal Botanic Gardens, Melbourne">Royal Botanic Gardens</a></li>
<li><a href="//en.wikipedia.org/wiki/Royal_Park,_Melbourne" title="Royal Park, Melbourne">Royal Park</a></li>
<li><a href="//en.wikipedia.org/wiki/Treasury_Gardens" title="Treasury Gardens">Treasury Gardens</a></li>
<li><a href="//en.wikipedia.org/wiki/Yarra_Park" title="Yarra Park">Yarra Park</a></li>
</ul>
</div>
</td>
</tr>
NODE 37 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore y
Extracting POI...
CAT: Parks and spaces
https://en.wikipedia.org/wiki/Albert_Park_and_Lake Albert Park and Lake
WARN: more than one geo-coordinates detected!
please check the actual page https://en.wikipedia.org/wiki/Albert_Park_and_Lake
0: 37.846°S 144.970°E
1: 37.846°S 144.970°E
2: 37.84722°S 144.96694°E
Input the index of the correct coordinates... 1
-37.846 144.97
https://en.wikipedia.org/wiki/Alexandra_Gardens,_Melbourne Alexandra Gardens
-37.82037 144.971938
https://en.wikipedia.org/wiki/Birrarung_Marr,_Melbourne Birrarung Marr
-37.81833 144.9725
https://en.wikipedia.org/wiki/Carlton_Gardens Carlton Gardens
-37.80611 144.97028
https://en.wikipedia.org/wiki/City_Square,_Melbourne City Square
-37.816 144.967
https://en.wikipedia.org/wiki/Federation_Square Federation Square
-37.817798 144.968714
https://en.wikipedia.org/wiki/Fitzroy_Gardens Fitzroy Gardens
-37.8125641 144.9803925
https://en.wikipedia.org/wiki/Flagstaff_Gardens Flagstaff Gardens
-37.8105 144.9544
https://en.wikipedia.org/wiki/Kings_Domain,_Melbourne Kings Domain
-37.8282598 144.9775815
https://en.wikipedia.org/wiki/Queen_Victoria_Gardens,_Melbourne Queen Victoria Gardens
-37.8218 144.9716
https://en.wikipedia.org/wiki/Royal_Botanic_Gardens,_Melbourne Royal Botanic Gardens
-37.8334 144.98033
https://en.wikipedia.org/wiki/Royal_Park,_Melbourne Royal Park
-37.7901833 144.9511667
https://en.wikipedia.org/wiki/Treasury_Gardens Treasury Gardens
-37.814158 144.976194
https://en.wikipedia.org/wiki/Yarra_Park Yarra Park
-37.8180437 144.9852312



------------------------------------------------------------------------------------------
NODE 38 BEGIN


NODE 38 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 39 BEGIN
<tr style="height:2px">
<td colspan="2"></td>
</tr>
NODE 39 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 40 BEGIN


NODE 40 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 41 BEGIN
<tr>
<th class="navbox-group" scope="row" style="text-align:right; width:6%;">Transport</th>
<td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;text-align:left;">
<div style="padding:0em 0.25em">
<ul>
<li><a href="//en.wikipedia.org/wiki/Bolte_Bridge" title="Bolte Bridge">Bolte Bridge</a></li>
<li><a href="//en.wikipedia.org/wiki/Capital_City_Trail" title="Capital City Trail">Capital City Trail</a></li>
<li><a href="//en.wikipedia.org/wiki/City_Circle_Tram" title="City Circle Tram">City Circle Tram</a></li>
<li><a href="//en.wikipedia.org/wiki/CityLink" title="CityLink">CityLink</a></li>
<li><a href="//en.wikipedia.org/wiki/Flinders_Street_railway_station" title="Flinders Street railway station">Flinders Street station</a></li>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Airport" title="Melbourne Airport">Melbourne Airport</a></li>
<li><a href="//en.wikipedia.org/wiki/Melbourne_Central_railway_station" title="Melbourne Central railway station">Melbourne Central station</a></li>
<li><a href="//en.wikipedia.org/wiki/Port_of_Melbourne" title="Port of Melbourne">Melbourne Seaport</a></li>
<li><a href="//en.wikipedia.org/wiki/Southern_Cross_railway_station" title="Southern Cross railway station">Southern Cross station</a></li>
<li><a href="//en.wikipedia.org/wiki/Trams_in_Melbourne" title="Trams in Melbourne">Trams in Melbourne</a></li>
<li><a href="//en.wikipedia.org/wiki/West_Gate_Bridge" title="West Gate Bridge">West Gate Bridge</a></li>
<li><a href="//en.wikipedia.org/wiki/Yarra_River" title="Yarra River">Yarra River</a></li>
</ul>
</div>
</td>
</tr>
NODE 41 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore y
Extracting POI...
CAT: Transport
https://en.wikipedia.org/wiki/Bolte_Bridge Bolte Bridge
-37.8194778 144.932125
https://en.wikipedia.org/wiki/Capital_City_Trail Capital City Trail
-37.819744 144.968516
https://en.wikipedia.org/wiki/City_Circle_Tram City Circle Tram
No Geo-coordinates found
https://en.wikipedia.org/wiki/CityLink CityLink
No Geo-coordinates found
https://en.wikipedia.org/wiki/Flinders_Street_railway_station Flinders Street station
-37.818078 144.96681
https://en.wikipedia.org/wiki/Melbourne_Airport Melbourne Airport
-37.67333 144.84333
https://en.wikipedia.org/wiki/Melbourne_Central_railway_station Melbourne Central station
-37.81 144.96278
https://en.wikipedia.org/wiki/Port_of_Melbourne Melbourne Seaport
No Geo-coordinates found
https://en.wikipedia.org/wiki/Southern_Cross_railway_station Southern Cross station
-37.8184 144.9524
https://en.wikipedia.org/wiki/Trams_in_Melbourne Trams in Melbourne
No Geo-coordinates found
https://en.wikipedia.org/wiki/West_Gate_Bridge West Gate Bridge
-37.82944 144.89806
https://en.wikipedia.org/wiki/Yarra_River Yarra River
WARN: more than one geo-coordinates detected!
please check the actual page https://en.wikipedia.org/wiki/Yarra_River
0: 37.74917°S 146.14056°E
1: 37.85194°S 144.90833°E
2: 37.85194°S 144.90833°E
Input the index of the correct coordinates... 1
-37.85194 144.90833



------------------------------------------------------------------------------------------
NODE 42 BEGIN


NODE 42 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 43 BEGIN
<tr style="height:2px">
<td colspan="2"></td>
</tr>
NODE 43 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 44 BEGIN


NODE 44 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 45 BEGIN
<tr>
<td class="navbox-abovebelow" colspan="2" style="text-align:center">
<div>
<ul>
<li><b>See also:</b> <a href="//en.wikipedia.org/wiki/List_of_museums_in_Melbourne" title="List of museums in Melbourne">Museums in Melbourne</a></li>
<li><a href="//en.wikipedia.org/wiki/Parks_and_gardens_of_Melbourne" title="Parks and gardens of Melbourne">Parks and gardens of Melbourne</a></li>
<li><a href="//en.wikipedia.org/wiki/List_of_theatres_in_the_Melbourne_City_Centre" title="List of theatres in the Melbourne City Centre">Theatres in the Melbourne City Centre</a></li>
</ul>
</div>
</td>
</tr>
NODE 45 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



------------------------------------------------------------------------------------------
NODE 46 BEGIN


NODE 46 END
------------------------------------------------------------------------------------------
Press [Y] or [y] to extract POI, press any other key to ignore 
IGNORED.



Latitude/Longitude statistics.


In [12]:
poi_df.head()


Out[12]:
poiName poiTheme poiLat poiLon poiURL
0 Arts Precinct City precincts -37.82167 144.96778 https://en.wikipedia.org/wiki/Melbourne_Arts_P...
1 Docklands City precincts -37.81700 144.94600 https://en.wikipedia.org/wiki/Docklands,_Victoria
2 Government Precinct City precincts -37.81190 144.97300 https://en.wikipedia.org/wiki/Spring_Street,_M...
3 Little Italy City precincts -37.79972 144.96694 https://en.wikipedia.org/wiki/Little_Italy,_Me...
4 Paris End City precincts -37.81680 144.96220 https://en.wikipedia.org/wiki/Collins_Street,_...

In [13]:
print('#POIs:', poi_df.shape[0])


#POIs: 93

In [14]:
print('Latitude Range:', poi_df['poiLat'].max() - poi_df['poiLat'].min())
poi_df['poiLat'].describe()


Latitude Range: 10.0380056
Out[14]:
count    93.000000
mean    -37.711683
std       1.025451
min     -37.970000
25%     -37.822324
50%     -37.816853
75%     -37.810560
max     -27.931994
Name: poiLat, dtype: float64

In [15]:
print('Longitude Range:', poi_df['poiLon'].max() - poi_df['poiLon'].min())
poi_df['poiLon'].describe()


Longitude Range: 8.5453922
Out[15]:
count     93.000000
mean     145.055063
std        0.873807
min      144.843330
25%      144.961670
50%      144.966777
75%      144.973290
max      153.388722
Name: poiLon, dtype: float64

Scatter plot.


In [16]:
plt.figure(figsize=[10, 10])
plt.scatter(poi_df['poiLat'], poi_df['poiLon'])


Out[16]:
<matplotlib.collections.PathCollection at 0x7f059c2935f8>

The outlier is the Harbour Town Docklands in category Shopping, with a coordinates actually in Queensland, the Harbour Town shopping centre in Docklands Victoria was sold in 2014, which could likely result changes of its wiki page.

Filtering out the outliers


In [17]:
lat_range = [-39, -36]
lon_range = [143, 147]

In [18]:
poi_df = poi_df[poi_df['poiLat'] > min(lat_range)]
poi_df = poi_df[poi_df['poiLat'] < max(lat_range)]
poi_df = poi_df[poi_df['poiLon'] > min(lon_range)]
poi_df = poi_df[poi_df['poiLon'] < max(lon_range)]

Latitude/Longitude statistics.


In [19]:
print('#POIs:', poi_df.shape[0])


#POIs: 92

In [20]:
print('Latitude Range:', poi_df['poiLat'].max() - poi_df['poiLat'].min())
poi_df['poiLat'].describe()


Latitude Range: 0.29667
Out[20]:
count    92.000000
mean    -37.817983
std       0.025838
min     -37.970000
25%     -37.822392
50%     -37.816896
75%     -37.810931
max     -37.673330
Name: poiLat, dtype: float64

In [21]:
print('Longitude Range:', poi_df['poiLon'].max() - poi_df['poiLon'].min())
poi_df['poiLon'].describe()


Longitude Range: 0.18667
Out[21]:
count     92.000000
mean     144.964479
std        0.021182
min      144.843330
25%      144.961602
50%      144.966443
75%      144.973266
max      145.030000
Name: poiLon, dtype: float64

Scatter plot.


In [22]:
plt.figure(figsize=[10, 10])
plt.scatter(poi_df['poiLat'], poi_df['poiLon'])


Out[22]:
<matplotlib.collections.PathCollection at 0x7f059364e0b8>

Filtering POIs with the same wikipage and coordinates but associated with several names and categories


In [23]:
print('#POIs:', poi_df.shape[0])
print('#URLs:', poi_df['poiURL'].unique().shape[0])


#POIs: 92
#URLs: 90

In [24]:
duplicated = poi_df['poiURL'].duplicated()
duplicated[duplicated == True]


Out[24]:
15    True
37    True
Name: poiURL, dtype: bool

In [25]:
print(poi_df.loc[15, 'poiURL'])
poi_df[poi_df['poiURL'] == poi_df.loc[15, 'poiURL']]


https://en.wikipedia.org/wiki/Collins_Street,_Melbourne
Out[25]:
poiName poiTheme poiLat poiLon poiURL
4 Paris End City precincts -37.8168 144.9622 https://en.wikipedia.org/wiki/Collins_Street,_...
15 Collins Street Shopping -37.8168 144.9622 https://en.wikipedia.org/wiki/Collins_Street,_...

This is a place located at Melbourne CBD, let's choose the second item with category 'Shopping'.


In [26]:
poi_df.drop(4, axis=0, inplace=True)

In [27]:
poi_df.head()


Out[27]:
poiName poiTheme poiLat poiLon poiURL
0 Arts Precinct City precincts -37.82167 144.96778 https://en.wikipedia.org/wiki/Melbourne_Arts_P...
1 Docklands City precincts -37.81700 144.94600 https://en.wikipedia.org/wiki/Docklands,_Victoria
2 Government Precinct City precincts -37.81190 144.97300 https://en.wikipedia.org/wiki/Spring_Street,_M...
3 Little Italy City precincts -37.79972 144.96694 https://en.wikipedia.org/wiki/Little_Italy,_Me...
5 RMIT City City precincts -37.80778 144.96333 https://en.wikipedia.org/wiki/City_campus_of_t...

In [28]:
print(poi_df.loc[37, 'poiURL'])
poi_df[poi_df['poiURL'] == poi_df.loc[37, 'poiURL']]


https://en.wikipedia.org/wiki/Melbourne_General_Post_Office
Out[28]:
poiName poiTheme poiLat poiLon poiURL
19 GPO Melbourne Shopping -37.81384 144.963028 https://en.wikipedia.org/wiki/Melbourne_Genera...
37 General Post Office Institutions -37.81384 144.963028 https://en.wikipedia.org/wiki/Melbourne_Genera...

For a Post Office, Let's choose the second item with category 'Institutions'.


In [29]:
poi_df.drop(19, axis=0, inplace=True)

In [30]:
poi_df.head(20)


Out[30]:
poiName poiTheme poiLat poiLon poiURL
0 Arts Precinct City precincts -37.821670 144.967780 https://en.wikipedia.org/wiki/Melbourne_Arts_P...
1 Docklands City precincts -37.817000 144.946000 https://en.wikipedia.org/wiki/Docklands,_Victoria
2 Government Precinct City precincts -37.811900 144.973000 https://en.wikipedia.org/wiki/Spring_Street,_M...
3 Little Italy City precincts -37.799720 144.966940 https://en.wikipedia.org/wiki/Little_Italy,_Me...
5 RMIT City City precincts -37.807780 144.963330 https://en.wikipedia.org/wiki/City_campus_of_t...
6 Southbank City precincts -37.829000 144.957000 https://en.wikipedia.org/wiki/Southbank,_Victoria
7 Sports and Entertainment Precinct City precincts -37.816670 144.983330 https://en.wikipedia.org/wiki/Melbourne_Sports...
8 University of Melbourne City precincts -37.796300 144.961400 https://en.wikipedia.org/wiki/University_of_Me...
9 Block Arcade Shopping -37.815830 144.964440 https://en.wikipedia.org/wiki/Block_Arcade,_Me...
10 Bourke Street Shopping -37.813900 144.964520 https://en.wikipedia.org/wiki/Bourke_Street,_M...
11 Bridge Road Shopping -37.817564 144.990328 https://en.wikipedia.org/wiki/Bridge_Road,_Mel...
12 Brunswick Street Shopping -37.798330 144.978472 https://en.wikipedia.org/wiki/Brunswick_Street...
13 Chapel Street Shopping -37.840830 144.995280 https://en.wikipedia.org/wiki/Chapel_Street,_M...
14 Centre Place Shopping -37.816583 144.965500 https://en.wikipedia.org/wiki/Centre_Place,_Me...
15 Collins Street Shopping -37.816800 144.962200 https://en.wikipedia.org/wiki/Collins_Street,_...
16 Degraves Street Shopping -37.817500 144.965830 https://en.wikipedia.org/wiki/Degraves_Street,...
17 Elizabeth Street Shopping -37.809600 144.961000 https://en.wikipedia.org/wiki/Elizabeth_Street...
18 Flinders Lane Shopping -37.816940 144.965560 https://en.wikipedia.org/wiki/Flinders_Lane,_M...
21 Little Collins Street Shopping -37.815100 144.964100 https://en.wikipedia.org/wiki/Little_Collins_S...
22 Melbourne Central Shopping Centre Shopping -37.810560 144.960000 https://en.wikipedia.org/wiki/Melbourne_Centra...

Check distance between POIs


In [31]:
def calc_dist_vec(longitudes1, latitudes1, longitudes2, latitudes2):
    """Calculate the distance (unit: km) between two places on earth, vectorised"""
    # convert degrees to radians
    lng1 = np.radians(longitudes1)
    lat1 = np.radians(latitudes1)
    lng2 = np.radians(longitudes2)
    lat2 = np.radians(latitudes2)
    radius = 6371.0088 # mean earth radius, en.wikipedia.org/wiki/Earth_radius#Mean_radius

    # The haversine formula, en.wikipedia.org/wiki/Great-circle_distance
    dlng = np.fabs(lng1 - lng2)
    dlat = np.fabs(lat1 - lat2)
    dist =  2 * radius * np.arcsin( np.sqrt( 
                (np.sin(0.5*dlat))**2 + np.cos(lat1) * np.cos(lat2) * (np.sin(0.5*dlng))**2 ))
    return dist

In [32]:
poi_dist_df = pd.DataFrame(data=np.zeros((poi_df.shape[0], poi_df.shape[0]), dtype=np.float), \
                           index=poi_df.index, columns=poi_df.index)
for ix in poi_df.index:
    dists = calc_dist_vec(poi_df.loc[ix, 'poiLon'], poi_df.loc[ix, 'poiLat'], poi_df['poiLon'], poi_df['poiLat'])
    poi_dist_df.loc[ix] = dists

POI pairs that are less than 50 metres.


In [33]:
check_ix = []
for i in range(poi_df.index.shape[0]):
    for j in range(i+1, poi_df.index.shape[0]):
        if poi_dist_df.iloc[i, j] < 0.05:  # less 50m
            check_ix = check_ix + [poi_df.index[i], poi_df.index[j]]
            print(poi_df.index[i], poi_df.index[j])


14 18
25 46
33 35
33 76
35 76

In [34]:
poi_df.loc[check_ix]


Out[34]:
poiName poiTheme poiLat poiLon poiURL
14 Centre Place Shopping -37.816583 144.965500 https://en.wikipedia.org/wiki/Centre_Place,_Me...
18 Flinders Lane Shopping -37.816940 144.965560 https://en.wikipedia.org/wiki/Flinders_Lane,_M...
25 Queen Victoria Village Shopping -37.810000 144.965200 https://en.wikipedia.org/wiki/Queen_Victoria_V...
46 State Library of Victoria Institutions -37.809801 144.964787 https://en.wikipedia.org/wiki/State_Library_of...
33 Australian Centre for the Moving Image Public galleries -37.817624 144.968591 https://en.wikipedia.org/wiki/Australian_Centr...
35 NGV Australia Public galleries -37.817798 144.968714 https://en.wikipedia.org/wiki/Ian_Potter_Centr...
33 Australian Centre for the Moving Image Public galleries -37.817624 144.968591 https://en.wikipedia.org/wiki/Australian_Centr...
76 Federation Square Parks and spaces -37.817798 144.968714 https://en.wikipedia.org/wiki/Federation_Square
35 NGV Australia Public galleries -37.817798 144.968714 https://en.wikipedia.org/wiki/Ian_Potter_Centr...
76 Federation Square Parks and spaces -37.817798 144.968714 https://en.wikipedia.org/wiki/Federation_Square

In [35]:
print(poi_df.loc[33, 'poiURL'])
print(poi_df.loc[35, 'poiURL'])
print(poi_df.loc[76, 'poiURL'])


https://en.wikipedia.org/wiki/Australian_Centre_for_the_Moving_Image
https://en.wikipedia.org/wiki/Ian_Potter_Centre:_NGV_Australia
https://en.wikipedia.org/wiki/Federation_Square

According to the above wikipage,

  • "The Australian Centre for the Moving Image (ACMI) is a ... It is located in Federation Square, in Melbourne".
  • "The Ian Potter Centre: NGV Australia houses the Australian part of the art collection of the National Gallery of Victoria (NGV). It is located at Federation Square in Melbourne ..."

So let's just keep the Federation Square.


In [36]:
poi_df.drop(33, axis=0, inplace=True)
poi_df.drop(35, axis=0, inplace=True)

In [37]:
poi_df.head(35)


Out[37]:
poiName poiTheme poiLat poiLon poiURL
0 Arts Precinct City precincts -37.821670 144.967780 https://en.wikipedia.org/wiki/Melbourne_Arts_P...
1 Docklands City precincts -37.817000 144.946000 https://en.wikipedia.org/wiki/Docklands,_Victoria
2 Government Precinct City precincts -37.811900 144.973000 https://en.wikipedia.org/wiki/Spring_Street,_M...
3 Little Italy City precincts -37.799720 144.966940 https://en.wikipedia.org/wiki/Little_Italy,_Me...
5 RMIT City City precincts -37.807780 144.963330 https://en.wikipedia.org/wiki/City_campus_of_t...
6 Southbank City precincts -37.829000 144.957000 https://en.wikipedia.org/wiki/Southbank,_Victoria
7 Sports and Entertainment Precinct City precincts -37.816670 144.983330 https://en.wikipedia.org/wiki/Melbourne_Sports...
8 University of Melbourne City precincts -37.796300 144.961400 https://en.wikipedia.org/wiki/University_of_Me...
9 Block Arcade Shopping -37.815830 144.964440 https://en.wikipedia.org/wiki/Block_Arcade,_Me...
10 Bourke Street Shopping -37.813900 144.964520 https://en.wikipedia.org/wiki/Bourke_Street,_M...
11 Bridge Road Shopping -37.817564 144.990328 https://en.wikipedia.org/wiki/Bridge_Road,_Mel...
12 Brunswick Street Shopping -37.798330 144.978472 https://en.wikipedia.org/wiki/Brunswick_Street...
13 Chapel Street Shopping -37.840830 144.995280 https://en.wikipedia.org/wiki/Chapel_Street,_M...
14 Centre Place Shopping -37.816583 144.965500 https://en.wikipedia.org/wiki/Centre_Place,_Me...
15 Collins Street Shopping -37.816800 144.962200 https://en.wikipedia.org/wiki/Collins_Street,_...
16 Degraves Street Shopping -37.817500 144.965830 https://en.wikipedia.org/wiki/Degraves_Street,...
17 Elizabeth Street Shopping -37.809600 144.961000 https://en.wikipedia.org/wiki/Elizabeth_Street...
18 Flinders Lane Shopping -37.816940 144.965560 https://en.wikipedia.org/wiki/Flinders_Lane,_M...
21 Little Collins Street Shopping -37.815100 144.964100 https://en.wikipedia.org/wiki/Little_Collins_S...
22 Melbourne Central Shopping Centre Shopping -37.810560 144.960000 https://en.wikipedia.org/wiki/Melbourne_Centra...
23 Pran Central Shopping -37.847414 144.993503 https://en.wikipedia.org/wiki/Pran_Central
24 Queen Victoria Market Shopping -37.806966 144.956693 https://en.wikipedia.org/wiki/Queen_Victoria_M...
25 Queen Victoria Village Shopping -37.810000 144.965200 https://en.wikipedia.org/wiki/Queen_Victoria_V...
26 Royal Arcade Shopping -37.814500 144.964100 https://en.wikipedia.org/wiki/Royal_Arcade,_Me...
27 Swanston Street Shopping -37.806400 144.963000 https://en.wikipedia.org/wiki/Swanston_Street,...
28 Crown Casino and Entertainment Complex Entertainment -37.822324 144.960099 https://en.wikipedia.org/wiki/Crown_Casino_and...
29 Luna Park Entertainment -37.868036 144.976369 https://en.wikipedia.org/wiki/Luna_Park,_Melbo...
30 Melbourne Aquarium Entertainment -37.821044 144.958017 https://en.wikipedia.org/wiki/Sea_Life_Melbour...
31 Melbourne Zoo Entertainment -37.784762 144.952095 https://en.wikipedia.org/wiki/Melbourne_Zoo
32 Australian Centre for Contemporary Art Public galleries -37.826497 144.967014 https://en.wikipedia.org/wiki/Australian_Centr...
34 Ian Potter Museum of Art Public galleries -37.797500 144.964111 https://en.wikipedia.org/wiki/Ian_Potter_Museu...
36 NGV International Public galleries -37.822595 144.968634 https://en.wikipedia.org/wiki/National_Gallery...
37 General Post Office Institutions -37.813840 144.963028 https://en.wikipedia.org/wiki/Melbourne_Genera...
38 Government House Institutions -37.827939 144.976939 https://en.wikipedia.org/wiki/Government_House...
39 Melbourne Observatory Institutions -37.829700 144.975500 https://en.wikipedia.org/wiki/Melbourne_Observ...

Save POI data to file


In [38]:
#poi_ = poi_df[['poiTheme', 'poiLon', 'poiLat']].copy()
poi_ = poi_df.copy()
poi_.reset_index(inplace=True)
poi_.drop('index', axis=1, inplace=True)
poi_.index.name = 'poiID'
poi_


Out[38]:
poiName poiTheme poiLat poiLon poiURL
poiID
0 Arts Precinct City precincts -37.821670 144.967780 https://en.wikipedia.org/wiki/Melbourne_Arts_P...
1 Docklands City precincts -37.817000 144.946000 https://en.wikipedia.org/wiki/Docklands,_Victoria
2 Government Precinct City precincts -37.811900 144.973000 https://en.wikipedia.org/wiki/Spring_Street,_M...
3 Little Italy City precincts -37.799720 144.966940 https://en.wikipedia.org/wiki/Little_Italy,_Me...
4 RMIT City City precincts -37.807780 144.963330 https://en.wikipedia.org/wiki/City_campus_of_t...
5 Southbank City precincts -37.829000 144.957000 https://en.wikipedia.org/wiki/Southbank,_Victoria
6 Sports and Entertainment Precinct City precincts -37.816670 144.983330 https://en.wikipedia.org/wiki/Melbourne_Sports...
7 University of Melbourne City precincts -37.796300 144.961400 https://en.wikipedia.org/wiki/University_of_Me...
8 Block Arcade Shopping -37.815830 144.964440 https://en.wikipedia.org/wiki/Block_Arcade,_Me...
9 Bourke Street Shopping -37.813900 144.964520 https://en.wikipedia.org/wiki/Bourke_Street,_M...
10 Bridge Road Shopping -37.817564 144.990328 https://en.wikipedia.org/wiki/Bridge_Road,_Mel...
11 Brunswick Street Shopping -37.798330 144.978472 https://en.wikipedia.org/wiki/Brunswick_Street...
12 Chapel Street Shopping -37.840830 144.995280 https://en.wikipedia.org/wiki/Chapel_Street,_M...
13 Centre Place Shopping -37.816583 144.965500 https://en.wikipedia.org/wiki/Centre_Place,_Me...
14 Collins Street Shopping -37.816800 144.962200 https://en.wikipedia.org/wiki/Collins_Street,_...
15 Degraves Street Shopping -37.817500 144.965830 https://en.wikipedia.org/wiki/Degraves_Street,...
16 Elizabeth Street Shopping -37.809600 144.961000 https://en.wikipedia.org/wiki/Elizabeth_Street...
17 Flinders Lane Shopping -37.816940 144.965560 https://en.wikipedia.org/wiki/Flinders_Lane,_M...
18 Little Collins Street Shopping -37.815100 144.964100 https://en.wikipedia.org/wiki/Little_Collins_S...
19 Melbourne Central Shopping Centre Shopping -37.810560 144.960000 https://en.wikipedia.org/wiki/Melbourne_Centra...
20 Pran Central Shopping -37.847414 144.993503 https://en.wikipedia.org/wiki/Pran_Central
21 Queen Victoria Market Shopping -37.806966 144.956693 https://en.wikipedia.org/wiki/Queen_Victoria_M...
22 Queen Victoria Village Shopping -37.810000 144.965200 https://en.wikipedia.org/wiki/Queen_Victoria_V...
23 Royal Arcade Shopping -37.814500 144.964100 https://en.wikipedia.org/wiki/Royal_Arcade,_Me...
24 Swanston Street Shopping -37.806400 144.963000 https://en.wikipedia.org/wiki/Swanston_Street,...
25 Crown Casino and Entertainment Complex Entertainment -37.822324 144.960099 https://en.wikipedia.org/wiki/Crown_Casino_and...
26 Luna Park Entertainment -37.868036 144.976369 https://en.wikipedia.org/wiki/Luna_Park,_Melbo...
27 Melbourne Aquarium Entertainment -37.821044 144.958017 https://en.wikipedia.org/wiki/Sea_Life_Melbour...
28 Melbourne Zoo Entertainment -37.784762 144.952095 https://en.wikipedia.org/wiki/Melbourne_Zoo
29 Australian Centre for Contemporary Art Public galleries -37.826497 144.967014 https://en.wikipedia.org/wiki/Australian_Centr...
... ... ... ... ... ...
58 Melbourne Grand Prix Circuit Sports stadiums -37.849720 144.968330 https://en.wikipedia.org/wiki/Melbourne_Grand_...
59 Melbourne Sports and Aquatic Centre (MSAC) Sports stadiums -37.846670 144.966110 https://en.wikipedia.org/wiki/Melbourne_Sports...
60 Lakeside Stadium Sports stadiums -37.840280 144.965000 https://en.wikipedia.org/wiki/Lakeside_Stadium
61 National Ice Sports Centre (O'Brien Group Arena) Sports stadiums -37.812378 144.935567 https://en.wikipedia.org/wiki/Medibank_Icehouse
62 Olympic Park Stadium Sports stadiums -37.824720 144.981110 https://en.wikipedia.org/wiki/Olympic_Park_Sta...
63 Rod Laver Arena Sports stadiums -37.821670 144.978330 https://en.wikipedia.org/wiki/Rod_Laver_Arena
64 Royal Melbourne Golf Club Sports stadiums -37.970000 145.030000 https://en.wikipedia.org/wiki/Royal_Melbourne_...
65 Princes Park (Ikon Park) Sports stadiums -37.783890 144.961670 https://en.wikipedia.org/wiki/Princes_Park_(st...
66 Albert Park and Lake Parks and spaces -37.846000 144.970000 https://en.wikipedia.org/wiki/Albert_Park_and_...
67 Alexandra Gardens Parks and spaces -37.820370 144.971938 https://en.wikipedia.org/wiki/Alexandra_Garden...
68 Birrarung Marr Parks and spaces -37.818330 144.972500 https://en.wikipedia.org/wiki/Birrarung_Marr,_...
69 Carlton Gardens Parks and spaces -37.806110 144.970280 https://en.wikipedia.org/wiki/Carlton_Gardens
70 City Square Parks and spaces -37.816000 144.967000 https://en.wikipedia.org/wiki/City_Square,_Mel...
71 Federation Square Parks and spaces -37.817798 144.968714 https://en.wikipedia.org/wiki/Federation_Square
72 Fitzroy Gardens Parks and spaces -37.812564 144.980392 https://en.wikipedia.org/wiki/Fitzroy_Gardens
73 Flagstaff Gardens Parks and spaces -37.810500 144.954400 https://en.wikipedia.org/wiki/Flagstaff_Gardens
74 Kings Domain Parks and spaces -37.828260 144.977582 https://en.wikipedia.org/wiki/Kings_Domain,_Me...
75 Queen Victoria Gardens Parks and spaces -37.821800 144.971600 https://en.wikipedia.org/wiki/Queen_Victoria_G...
76 Royal Botanic Gardens Parks and spaces -37.833400 144.980330 https://en.wikipedia.org/wiki/Royal_Botanic_Ga...
77 Royal Park Parks and spaces -37.790183 144.951167 https://en.wikipedia.org/wiki/Royal_Park,_Melb...
78 Treasury Gardens Parks and spaces -37.814158 144.976194 https://en.wikipedia.org/wiki/Treasury_Gardens
79 Yarra Park Parks and spaces -37.818044 144.985231 https://en.wikipedia.org/wiki/Yarra_Park
80 Bolte Bridge Transport -37.819478 144.932125 https://en.wikipedia.org/wiki/Bolte_Bridge
81 Capital City Trail Transport -37.819744 144.968516 https://en.wikipedia.org/wiki/Capital_City_Trail
82 Flinders Street station Transport -37.818078 144.966810 https://en.wikipedia.org/wiki/Flinders_Street_...
83 Melbourne Airport Transport -37.673330 144.843330 https://en.wikipedia.org/wiki/Melbourne_Airport
84 Melbourne Central station Transport -37.810000 144.962780 https://en.wikipedia.org/wiki/Melbourne_Centra...
85 Southern Cross station Transport -37.818400 144.952400 https://en.wikipedia.org/wiki/Southern_Cross_r...
86 West Gate Bridge Transport -37.829440 144.898060 https://en.wikipedia.org/wiki/West_Gate_Bridge
87 Yarra River Transport -37.851940 144.908330 https://en.wikipedia.org/wiki/Yarra_River

88 rows × 5 columns


In [39]:
poi_.to_csv(fpoi, index=True)

In [71]:
#poi_df.to_csv(fpoi, index=False)

Visualise POIs on map

This is a shared Google map.


In [75]:
def generate_kml(fname, poi_df):
    k = kml.KML()
    ns = '{http://www.opengis.net/kml/2.2}'
    styid = 'style1'
    # colors in KML: aabbggrr, aa=00 is fully transparent
    sty = styles.Style(id=styid, styles=[styles.LineStyle(color='9f0000ff', width=2)]) # transparent red
    doc = kml.Document(ns, '1', 'POIs', 'POIs visualization', styles=[sty])
    k.append(doc)
    
    # Placemark for POIs
    for ix in poi_df.index:
        name = poi_df.loc[ix, 'poiName']
        cat  = poi_df.loc[ix, 'poiTheme']
        lat  = poi_df.loc[ix, 'poiLat']
        lon  = poi_df.loc[ix, 'poiLon']
        desc = ''.join(['POI Name: ', name, '<br/>Category: ', cat, '<br/>Coordinates: (%f, %f)' % (lat, lon)])
        pm = kml.Placemark(ns, str(ix), name, desc, styleUrl='#' + styid)
        pm.geometry = Point(lon, lat)
        doc.append(pm)
        
    # save to file
    kmlstr = k.to_string(prettyprint=True)
    with open(fname, 'w') as f:
        f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
        f.write(kmlstr)

In [76]:
generate_kml('./poi.kml', poi_df)