<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Knowledge Tier Platform for Graph Mining in (Smart) Cities</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Universidad del Pacfico Av.</institution>
          <addr-line>Salaverry 2020 Lima -</addr-line>
          <country country="PE">Peru</country>
        </aff>
      </contrib-group>
      <fpage>110</fpage>
      <lpage>113</lpage>
      <abstract>
        <p>In the present effort, we present a knowledge tier platform to collect information from cities in a form of graphs. This platform enables people to share the information of the area where they live allowing them to inform about pollution, crime levels, traffic jams, streets topology, commerces, markets, etc. The main objective is to provide information, stored in Elastic about a city to find spatio-temporal patterns using Graph Mining techniques based on Apache Spark GraphX.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        In the last years, we have seen the explosion of
data from on-line activity, user content generated,
health, scientific computing, mobile phones
activity, etc. This data increments due to the daily
transaction of people in urban centers and still
grows. By 2030, 60% of the worldwide
population will live in cities appearing 27 megacities
greater than 10 million inhabitants
        <xref ref-type="bibr" rid="ref2">(Chourabi et
al., 2012)</xref>
        . One technique to solve this problem
is to generate new instruments for gathering and
combining information continuously
        <xref ref-type="bibr" rid="ref4">(Herna´ndezMun˜oz et al., 2011)</xref>
        . Consequently, there is an
increment of collaborative platforms to collect data.
For instance, a platform, called WebCar, to
collect GPS data from vehicles to estimate traffic in a
city
        <xref ref-type="bibr" rid="ref6">(Lo et al., 2008)</xref>
        . In the field of human health,
Psychlog
        <xref ref-type="bibr" rid="ref3">(Gaggioli et al., 2013)</xref>
        is a mobile phone
platform designed to collect users psychological,
physiological, and activity information for mental
health research relying on a self-report
questionnaire. The last example developed an Internet site
and implemented the collection of data for a
multicenter study of ethical decision-making
        <xref ref-type="bibr" rid="ref1">(Avidan
et al., 2005)</xref>
        .
      </p>
      <p>In the present effort, we present a knowledge
tire platform to collect information on cities in a
form of graphs. This platform enables people to
share the knowledge of the area where they live
allowing them to inform about pollution, crime
levels, traffic jams, streets topology, commerces,
markets, etc. The primary objective is to provide
information about the city to find spatio-temporal
patterns using Graph Mining techniques.</p>
      <p>The present paper is organized as follows.
Section 2 introduce some basic concepts, while
Section 3 describes the platform architecture.
Sections 4 and 5 show some preliminary results and
present the discussion about the platform. Finally,
Section 6 concludes the paper and presents future
works.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Basic Concepts</title>
      <p>In the current section, we introduce some
basic concepts, such as graph, knowledge tiers and
Spark for describing the platform.
2.1</p>
      <sec id="sec-2-1">
        <title>Graph</title>
        <p>A graph is a mathematical structure composed of
vertices, nodes or points, which are connected
through edges, lines or arcs as depicted in Figure
1. A graph (G = (V, E)) is composed of a set of
V vertices and E edges. in our context this
structure allows us to represent street intersections as
geo-referenced nodes and roads as edges.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Haversine distance</title>
        <p>
          The Haversine distance
          <xref ref-type="bibr" rid="ref11">(Shumaker and Sinnott,
1984)</xref>
          computes the shortest distance between two
points represented by latitude and longitude in the
earth’s surface.
        </p>
        <p>dlon
dlat
a
c =
d =
= lon2 lon1
= lat2 lat1
= (sin( dl2at ))2 + cos(lat1)⇥
cos(lat2) ⇥ (sin( dlon ))2</p>
        <p>2
2 ⇥ atan2(p a, p 1 a)
R ⇥ c
(1)
Since we are able to model street network of a city
in the form of a graph. Note that each node and
edge could have a weight representing different
phenomena of a city, such as: (1) congestion, (2)
crime, (3) pollution, (4) population density, (5)
urban transportation, (6) subway network, etc. Thus,
for each phenomenon, we have a graph
modeling this particular fact. Finally, we can stack each
node as depicted in Figure 2 to have a knowledge
stack.
Apache Spark is an open source cluster developed
by the University of Berkeley. Then, the code
was maintained by Apache Software Foundation.
Apache provides distributed computation taking
charge of task dispatching, scheduling, and basic
I/O functionalities. These functionalities are
available through Java, Python, Scala and R interfaces.</p>
        <p>1Fereshteh ASGARI, Inferring User Multimodal
Trajectories from Cellular Network Metadata in Metropolitan
Areas</p>
        <p>As shown in Figure 3 Apache Spark provides
at the top of its framework a tool for graph mining
call GraphX2. This API allows parallel graph
computation and integrates tools for extraction,
transformation and load. More detail about the
architecture as well as the capabilities of Spark is given
in the next section.
3</p>
        <p>System Overview
In the current section, we describe the architecture
of our platform. As illustrated in Figure 4, our
platform allows collecting data from Open Street
Maps 3 (OSM) to build the graph representing
streets and intersections in the form of a comma
separated values CSV files. Then, these CSV files
are stored in a NoSQL database. We use
Elasticsearch4 as NoSQL database due to its scalable,
flexible and performant search and analytics
engine (c.f., Figure 5).</p>
        <p>Once data is saved in the NoSQL database, we
are able to analyze the knowledge tiers represented
and combined in form of graphs trough Spark
2GraphX: http://spark.apache.org/graphx/
3OSM: https://www.openstreetmap.org/
4Elasticsearch :https://www.elastic.
co/guide/en/elasticsearch/reference/
current/index.html
GraphX as depicted in Figure 5. For instance, with
this platform, we could optimize supply chain in
cities minimizing cost, avoiding traffic jams and
passing over low crime rate zones. We can also
discover spatial patterns to understand common
features of high crime rates areas in a city. All
these analytics could be performed using
programming languages such as: Scala5, Java6, Python7 or
R8.</p>
        <p>Finally, we implement a Python script to
visualize the result of the pattern mining process
using Google Maps9. In the next section, we present
some preliminary visualization of graphs stored in
the platform.
4</p>
        <sec id="sec-2-2-1">
          <title>Preliminary results</title>
          <p>In this section, we present some preliminary
results, of the Knowledge Tier Platform, about data
gathering, and visualizations.</p>
          <p>Concerning the data collection, we have done
two campaigns to collect data from streets and
tweets in Lima, Peru. The former campaign
was performed in the month of May collecting
1˜00 000 and 4˜20 000 nodes and vertices,
respectively. The latter campaign was carried on between
the months of April to Jun obtaining 7˜,1 millions
of geolocated tweets.</p>
          <p>About visualization, the platform allows to plot
a graph over a cartography, where the nodes are
placed in the intersections of the streets and the
5Scala: www.scala-lang.org
6Java: www.java.com
7Python: www.python.org
8R: www.r-project.org
9Google Maps: /maps.google.com
edges model the streets connecting nodes or
intersections as shown in Figure 6.</p>
          <p>Another possibility of visualization are
Heatmaps. In our case, Heatmaps are generated
based on nodes weight. For example, Figure
7 presents a Heatmap of collected tweets in
the platform. It is worth noting that tweets are
affected to the nearest node relying on latitude
and longitude of both nodes and tweets. We use
as distance function the Haversine function (c.f.,
Subsection 2.2). In the next section, we argue
about the platform, and we present our vision of
its application to research on Smart Cities.
5</p>
        </sec>
        <sec id="sec-2-2-2">
          <title>Discussion</title>
          <p>
            We firmly believe in the potential of this project as
the cornerstone to enable new research directions.
Graphs have been widely used to model different
kinds of phenomena ranging from: urban street
network
            <xref ref-type="bibr" rid="ref5">(Jiang and Claramunt, 2004)</xref>
            , urban and
regional models
            <xref ref-type="bibr" rid="ref9">(O’Sullivan, 2001)</xref>
            , macroscopic
model of city traffic
            <xref ref-type="bibr" rid="ref10">(Prasanna et al., 2009)</xref>
            , model
city evacuation plan
            <xref ref-type="bibr" rid="ref12">(Yamada, 1996)</xref>
            , to plan
strategy for vehicular ad hoc network in a city
environments
            <xref ref-type="bibr" rid="ref7">(Lochert et al., 2003)</xref>
            to mobility models
            <xref ref-type="bibr" rid="ref8">(Mogre et al., 2007)</xref>
            . In this project, we plan to
use this graph model representing streets and
intersections to study:
Supply chain from a transportation point of view.
          </p>
          <p>When cities have more nanostores than
retailers, it is more complicated to transport
products to small spare stores.</p>
          <p>Multi-modal transportation is a problem in
urban context where individuals need to
optimize their movements within a city by using
different massive transportation mode.</p>
          <p>Crime patterns could be extracted by combining
different features from the graph model.
Pollution dispersion could be modeled by a street
and intersection models to represent and
forecast particles of matter dynamic in a city.
Social network activity levels could be
represented in the urban graph to detect social
activity for extracting the hot spots in a city.
Privacy perception to understand how people
consider privacy and what are the real
dangers and risks.</p>
          <p>The aforementioned list of possible research
directions is not limited to these topics. There are
many issues related to smart cities still opened.
6</p>
          <p>Conclusions
In the present work, we have detailed the
architecture of the Knowledge tier platform. The novelty
of this platform is to gather diverse kind of data
from different knowledge layers to extract
spatiotemporal patterns for smart cities applications. We
have shown the potential of this platform as the
stone corner for many research question in the near
future.</p>
        </sec>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <given-names>Alexander</given-names>
            <surname>Avidan</surname>
          </string-name>
          , Charles Weissman, and Charles L Sprung.
          <year>2005</year>
          .
          <article-title>An internet web site as a data collection platform for multicenter research</article-title>
          .
          <source>Anesthesia &amp; Analgesia</source>
          ,
          <volume>100</volume>
          (
          <issue>2</issue>
          ):
          <fpage>506</fpage>
          -
          <lpage>511</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <given-names>Hafedh</given-names>
            <surname>Chourabi</surname>
          </string-name>
          , Taewoo Nam, Shawn Walker,
          <string-name>
            <given-names>J Ramon</given-names>
            <surname>Gil-Garcia</surname>
          </string-name>
          , Sehl Mellouli, Karine Nahon,
          <article-title>Theresa A Pardo,</article-title>
          and Hans Jochen Scholl.
          <year>2012</year>
          .
          <article-title>Understanding smart cities: An integrative framework</article-title>
          .
          <source>In System Science (HICSS)</source>
          ,
          <year>2012</year>
          45th Hawaii International Conference on, pages
          <fpage>2289</fpage>
          -
          <lpage>2297</lpage>
          . IEEE.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <given-names>Andrea</given-names>
            <surname>Gaggioli</surname>
          </string-name>
          , Giovanni Pioggia, Gennaro Tartarisco, Giovanni Baldus, Daniele Corda, Pietro Cipresso, and
          <string-name>
            <given-names>Giuseppe</given-names>
            <surname>Riva</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>A mobile data collection platform for mental health research</article-title>
          .
          <source>Personal and Ubiquitous Computing</source>
          ,
          <volume>17</volume>
          (
          <issue>2</issue>
          ):
          <fpage>241</fpage>
          -
          <lpage>251</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Jose´ M Herna</surname>
          </string-name>
          <article-title>´ndez-Mun˜oz, Jesu´s Bernat Vercher</article-title>
          , Luis Mun˜oz, Jose´ A Galache,
          <article-title>Mirko Presser, Luis A Herna´ndez Go´mez, and</article-title>
          <string-name>
            <given-names>Jan</given-names>
            <surname>Pettersson</surname>
          </string-name>
          .
          <year>2011</year>
          .
          <article-title>Smart cities at the forefront of the future internet</article-title>
          .
          <source>In The Future Internet Assembly</source>
          , pages
          <fpage>447</fpage>
          -
          <lpage>462</lpage>
          . Springer.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <given-names>Bin</given-names>
            <surname>Jiang</surname>
          </string-name>
          and
          <string-name>
            <given-names>Christophe</given-names>
            <surname>Claramunt</surname>
          </string-name>
          .
          <year>2004</year>
          .
          <article-title>A structural approach to the model generalization of an urban street network</article-title>
          .
          <source>GeoInformatica</source>
          ,
          <volume>8</volume>
          (
          <issue>2</issue>
          ):
          <fpage>157</fpage>
          -
          <lpage>171</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>Chia-Hao</surname>
            <given-names>Lo</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wen-Chih</surname>
            <given-names>Peng</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chien-Wen</surname>
            <given-names>Chen</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>TingYu</given-names>
            <surname>Lin</surname>
          </string-name>
          , and
          <string-name>
            <surname>Chun-Shuo Lin</surname>
          </string-name>
          .
          <year>2008</year>
          .
          <article-title>Carweb: A traffic data collection platform</article-title>
          .
          <source>In The Ninth International Conference on Mobile Data Management (mdm 2008)</source>
          , pages
          <fpage>221</fpage>
          -
          <lpage>222</lpage>
          . IEEE.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <given-names>Christian</given-names>
            <surname>Lochert</surname>
          </string-name>
          , Hannes Hartenstein, Jing Tian, Holger Fussler, Dagmar Hermann, and
          <string-name>
            <given-names>Martin</given-names>
            <surname>Mauve</surname>
          </string-name>
          .
          <year>2003</year>
          .
          <article-title>A routing strategy for vehicular ad hoc networks in city environments</article-title>
          .
          <source>In Intelligent Vehicles Symposium</source>
          ,
          <year>2003</year>
          . Proceedings. IEEE, pages
          <fpage>156</fpage>
          -
          <lpage>161</lpage>
          . IEEE.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Parag S Mogre</surname>
            , Matthias Hollick, Nico d'Heureuse, Hans Werner Heckel, Tronje Krop, and
            <given-names>Ralf</given-names>
          </string-name>
          <string-name>
            <surname>Steinmetz</surname>
          </string-name>
          .
          <year>2007</year>
          .
          <article-title>A graph-based simple mobility model</article-title>
          .
          <source>In Communication in Distributed Systems (KiVS)</source>
          ,
          <source>2007 ITG-GI Conference</source>
          , pages
          <fpage>1</fpage>
          -
          <lpage>12</lpage>
          . VDE.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <surname>David O'Sullivan</surname>
          </string-name>
          .
          <year>2001</year>
          .
          <article-title>Graph-cellular automata: a generalised discrete urban and regional model</article-title>
          .
          <source>Environment and Planning B: Planning and Design</source>
          ,
          <volume>28</volume>
          (
          <issue>5</issue>
          ):
          <fpage>687</fpage>
          -
          <lpage>705</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <given-names>UR</given-names>
            <surname>Prasanna</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M</given-names>
            <surname>Srinivas</surname>
          </string-name>
          , and
          <string-name>
            <given-names>L</given-names>
            <surname>Umanand</surname>
          </string-name>
          .
          <year>2009</year>
          .
          <article-title>Macroscopic model of city traffic using bond graph modelling</article-title>
          .
          <source>International Journal of Engineering Systems Modelling and Simulation</source>
          ,
          <volume>1</volume>
          (
          <issue>2</issue>
          -3):
          <fpage>176</fpage>
          -
          <lpage>183</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <source>BP Shumaker and RW Sinnott</source>
          .
          <year>1984</year>
          .
          <article-title>Astronomical computing: 1. computing under the open sky. 2. virtues of the haversine</article-title>
          .
          <source>Sky and telescope</source>
          ,
          <volume>68</volume>
          :
          <fpage>158</fpage>
          -
          <lpage>159</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <string-name>
            <given-names>Takeo</given-names>
            <surname>Yamada</surname>
          </string-name>
          .
          <year>1996</year>
          .
          <article-title>A network flow approach to a city emergency evacuation planning</article-title>
          .
          <source>International Journal of Systems Science</source>
          ,
          <volume>27</volume>
          (
          <issue>10</issue>
          ):
          <fpage>931</fpage>
          -
          <lpage>936</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>