Commit 739dac9a authored by militarpancho's avatar militarpancho
Browse files

Merge branch 'master' of...

Merge branch 'master' of ssh://lab.cluster.gsi.dit.upm.es:2200/sefarad/dashboard-reddit into dbpedia
parents aa16bc5b 26d13c85
......@@ -13,7 +13,7 @@
],
"dependencies": {
"material-search": "material-search#*",
"leaflet-maps": "leaflet-maps#*",
"leaflet-maps": "leaflet-maps#2.1.1",
"paper-tabs": "paper-tabs#1.1.0",
"number-chart": "number-chart#^1.1.1",
"google-apis": "GoogleWebComponents/google-apis#^1.0.0",
......
......@@ -13,7 +13,7 @@
<link rel="import" href="/bower_components/paper-menu/paper-menu.html">
<link rel="import" href="/elements/entities-chart/entities-chart.html">
<link rel="import" href="/elements/news-chart/news-chart.html">
<link rel="import" href="/elements/leaflet-maps/leaflet-map.html">
<dom-module id="dashboard-reddit">
......@@ -111,7 +111,6 @@
</google-chart>
</div>
<div class="chart_container" style="left: 0; float: right">
<leaflet-maps></leaflet-maps>
</div>
</div>
......@@ -146,6 +145,34 @@
<div></div>
</iron-pages>
</div>
<div class="chart_container col-md-6">
<div class="top-bar">
<iron-icon icon="maps:my-location"></iron-icon>
<span>Geolocated News and Social Media</span>
</div>
<leaflet-map fit-to-markers>
<!--<template is="dom-repeat" items="[[getPoints(places.*)]]" as="place">
<leaflet-marker latitude="{{place.lat}}" longitude="{{place.lng}}" title="{{place.name}}">
<b>Name:</b>
<span>{{place.name}}</span>
</leaflet-marker>
</template>-->
<leaflet-marker latitude="40.4520074" longitude="-3.7258213" title="Demo place">
<b>Name:</b>
<span>Demo<span>
</leaflet-marker>
<leaflet-marker class="style-scope dashboard-tourpedia" latitude="41.90059" longitude="12.474896" title="Margherita">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="52.547617" longitude="13.353173" title="Hotel Arcos Appartement House">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="52.357974741256" longitude="4.9006604030728" title="ibis Styles Amsterdam City">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="52.352212775572" longitude="4.8916602507234" title="easyHotel Amsterdam">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="52.532396478848" longitude="13.380556404591" title="baxpax Mitte Hostel">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="41.908899" longitude="12.479041" title="Edy">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="48.822176" longitude="2.361568" title="Long Hoa">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="48.827534" longitude="2.370932" title="Boulangerie de Tolbiac">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="41.386084311622" longitude="2.1677023172379" title="St Christopher's Inn">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="41.38985943707" longitude="2.1471921354532" title="Sunotel Junior">
</leaflet-marker>
</leaflet-map>
</div>
</div>
</div>
......
......@@ -13,7 +13,7 @@
<link rel="import" href="/bower_components/paper-menu/paper-menu.html">
<link rel="import" href="/elements/entities-chart/entities-chart.html">
<link rel="import" href="/elements/news-chart/news-chart.html">
<link rel="import" href="/elements/leaflet-maps/leaflet-map.html">
<dom-module id="dashboard-reddit">
......@@ -111,7 +111,6 @@
</google-chart>
</div>
<div class="chart_container" style="left: 0; float: right">
<leaflet-maps></leaflet-maps>
</div>
</div>
......@@ -146,6 +145,34 @@
<div></div>
</iron-pages>
</div>
<div class="chart_container col-md-6">
<div class="top-bar">
<iron-icon icon="maps:my-location"></iron-icon>
<span>Geolocated News and Social Media</span>
</div>
<leaflet-map fit-to-markers>
<!--<template is="dom-repeat" items="[[getPoints(places.*)]]" as="place">
<leaflet-marker latitude="{{place.lat}}" longitude="{{place.lng}}" title="{{place.name}}">
<b>Name:</b>
<span>{{place.name}}</span>
</leaflet-marker>
</template>-->
<leaflet-marker latitude="40.4520074" longitude="-3.7258213" title="Demo place">
<b>Name:</b>
<span>Demo<span>
</leaflet-marker>
<leaflet-marker class="style-scope dashboard-tourpedia" latitude="41.90059" longitude="12.474896" title="Margherita">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="52.547617" longitude="13.353173" title="Hotel Arcos Appartement House">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="52.357974741256" longitude="4.9006604030728" title="ibis Styles Amsterdam City">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="52.352212775572" longitude="4.8916602507234" title="easyHotel Amsterdam">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="52.532396478848" longitude="13.380556404591" title="baxpax Mitte Hostel">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="41.908899" longitude="12.479041" title="Edy">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="48.822176" longitude="2.361568" title="Long Hoa">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="48.827534" longitude="2.370932" title="Boulangerie de Tolbiac">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="41.386084311622" longitude="2.1677023172379" title="St Christopher's Inn">
</leaflet-marker><leaflet-marker class="style-scope dashboard-tourpedia" latitude="41.38985943707" longitude="2.1471921354532" title="Sunotel Junior">
</leaflet-marker>
</leaflet-map>
</div>
</div>
</div>
......
......@@ -112,3 +112,12 @@
padding: 48px 62px 10px;
}
.top-bar{
width: 100%;
background-color: #04419B;
color: white;
text-align: center;
height: 35px;
line-height: 35px;
border-radius: 5px 5px 0 0;
}
\ No newline at end of file
leaflet-maps @ fd127f11
Subproject commit fd127f112bbacddc9ec4a281573ecf740a840a24
......@@ -6,20 +6,21 @@ import sys
s = sched.scheduler(time.time, time.sleep)
def runevery():
if sys.argv[1] == "tutorial2":
print("Tutorial 2 STARTED!")
identifier = time.time()
command = 'python -m luigi --module tutorialtask CrawlerTask --url "{url}" --id "{id}"'.format(url="isis",id=identifier)
subprocess.call(command.split(), shell= False)
elif sys.argv[1] == "tutorial3":
print("Tutorial 3 STARTED!")
identifier = time.time()
command = 'python -m luigi --module tutorialtask PipelineTask --index tutorial --doc-type news --url "{url}" --id "{id}"'.format(url="isis",id=identifier)
subprocess.call(command.split(), shell= False)
if len(sys.argv) > 1:
if sys.argv[1] == "tutorial2":
print("Tutorial 2 STARTED!")
identifier = time.time()
command = 'python -m luigi --module tutorialtask CrawlerTask --url "{url}" --id "{id}"'.format(url="isis",id=identifier)
subprocess.call(command.split(), shell= False)
elif sys.argv[1] == "tutorial3":
print("Tutorial 3 STARTED!")
identifier = time.time()
command = 'python -m luigi --module tutorialtask PipelineTask --index tutorial --doc-type news --url "{url}" --id "{id}"'.format(url="isis",id=identifier)
subprocess.call(command.split(), shell= False)
else:
identifier = time.time()
command = 'python -m luigi --module analysistask PipelineTask --index gsicrawler --doc-type news --url "{url}" --id "{id}" --analysisType "sentiments,emotions"'.format(url="isis",id=identifier)
subprocess.call(command.split(), shell= False)
s.enter(86400, 1, runevery) #Change here your cron time
s.enter(86400, 1, runevery) #Change here your cron time
s.enter(2, 1, runevery)
s.run()
\ No newline at end of file
......@@ -11,6 +11,7 @@ def retrieveCnnNews(search, num, filepath):
for newsitem in response:
if newsitem["source"] != "Internet Video Archive":
aux = dict()
aux["@context"] = ["http://schema.org","http://latest.senpy.cluster.gsi.dit.upm.es/api/contexts/Context.jsonld"]
aux["@type"] = "schema:NewsArticle"
aux["@id"] = newsitem["url"]
aux["_id"] = newsitem["url"]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment