Commit 3f1d57e6 authored by Alberto Pascual's avatar Alberto Pascual Committed by J. Fernando Sánchez

orchestrator tasks installed via pip

parent c22c2594
...@@ -4,4 +4,5 @@ rdflib ...@@ -4,4 +4,5 @@ rdflib
requests requests
sqlalchemy sqlalchemy
ftfy ftfy
rdflib-jsonld rdflib-jsonld
\ No newline at end of file soneti_tasks
docker-compose exec orchestrator python -m luigi --module somedi-usecase.workflow StoreTask --query restauranteslateral --number 10 --source facebook --algorithm sentiment140 --lang es --id 5
docker-compose exec orchestrator python -m luigi --module somedi-usecase.workflow StoreTask --query rest_lateral --number 10 --source twitter --algorithm sentiment140 --lang es --id 6
docker-compose exec orchestrator python -m luigi --module somedi-usecase.workflow StoreTask --query 100MontaditosSpain --number 10 --source facebook --algorithm sentiment140 --lang es --id 7
docker-compose exec orchestrator python -m luigi --module somedi-usecase.workflow StoreTask --query 100montaditos --number 10 --source twitter --algorithm sentiment140 --lang es --id 8
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
<img style="width: 30%; margin:0 auto;"src="/images/somedi.png"> <img style="width: 30%; margin:0 auto;"src="/images/somedi.png">
</div> </div>
<paper-tabs selected="{{selected}}"> <paper-tabs selected="{{selected}}">
<paper-tab>Dashboard</paper-tab> <paper-tab>Brand Overview</paper-tab>
<!-- <paper-tab>Sparql Editor</paper-tab> --> <paper-tab>Competitors Comparision</paper-tab>
<paper-tab>About</paper-tab> <paper-tab>About</paper-tab>
</paper-tabs> </paper-tabs>
......
...@@ -545,12 +545,12 @@ Data can be provided in one of three ways: ...@@ -545,12 +545,12 @@ Data can be provided in one of three ways:
datos[fechacompleta]['propio'] = datos[fechacompleta]['propio'] + 1 datos[fechacompleta]['propio'] = datos[fechacompleta]['propio'] + 1
} else datos[fechacompleta]['propio'] = 1 } else datos[fechacompleta]['propio'] = 1
} }
else if(entry._source['schema:creator'] != ('rest_lateral' || 'restauranteslateral')){ else if(entry._source['schema:creator'] != ('rest_lateral' || 'restauranteslateral' || '100montaditos' || '100MontaditosSpain')){
if (datos[fechacompleta].hasOwnProperty('otro')){ if (datos[fechacompleta].hasOwnProperty('otro')){
datos[fechacompleta]['otro'] = datos[fechacompleta]['otro'] + 1 datos[fechacompleta]['otro'] = datos[fechacompleta]['otro'] + 1
} else datos[fechacompleta]['otro'] = 1 } else datos[fechacompleta]['otro'] = 1
} }
if(entry._source['schema:author'] == 'facebook'){ if(entry._source['schema:creator'] == 'restauranteslateral'){
if (datos[fechacompleta].hasOwnProperty('otro')){ if (datos[fechacompleta].hasOwnProperty('otro')){
//console.log( entry._source['comments']['data'].length) //console.log( entry._source['comments']['data'].length)
datos[fechacompleta]['otro'] = datos[fechacompleta]['otro'] + entry._source['comments']['data'].length datos[fechacompleta]['otro'] = datos[fechacompleta]['otro'] + entry._source['comments']['data'].length
...@@ -570,12 +570,12 @@ Data can be provided in one of three ways: ...@@ -570,12 +570,12 @@ Data can be provided in one of three ways:
datos[fechacompleta]['propio'] = datos[fechacompleta]['propio'] + 1 datos[fechacompleta]['propio'] = datos[fechacompleta]['propio'] + 1
} else datos[fechacompleta]['propio'] = 1 } else datos[fechacompleta]['propio'] = 1
} }
else if(entry._source['schema:creator'] != ('rest_lateral' || 'restauranteslateral')){ else if(entry._source['schema:creator'] != ('rest_lateral' || 'restauranteslateral' || '100montaditos' || '100MontaditosSpain')){
if (datos[fechacompleta].hasOwnProperty('otro')){ if (datos[fechacompleta].hasOwnProperty('otro')){
datos[fechacompleta]['otro'] = datos[fechacompleta]['otro'] + 1 datos[fechacompleta]['otro'] = datos[fechacompleta]['otro'] + 1
} else datos[fechacompleta]['otro'] = 1 } else datos[fechacompleta]['otro'] = 1
} }
if(entry._source['schema:author'] == 'facebook'){ if(entry._source['schema:creator'] == 'restauranteslateral'){
if (datos[fechacompleta].hasOwnProperty('otro')){ if (datos[fechacompleta].hasOwnProperty('otro')){
//console.log( entry._source['comments']['data'].length) //console.log( entry._source['comments']['data'].length)
datos[fechacompleta]['otro'] = datos[fechacompleta]['otro'] + entry._source['comments']['data'].length datos[fechacompleta]['otro'] = datos[fechacompleta]['otro'] + entry._source['comments']['data'].length
......
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
if (that.type == 'official'){ if (that.type == 'official'){
if((entry._source['schema:creator'] == 'rest_lateral') || (entry._source['schema:creator'] == 'restauranteslateral')) results.push(entry._source); if((entry._source['schema:creator'] == 'rest_lateral') || (entry._source['schema:creator'] == 'restauranteslateral')) results.push(entry._source);
} else { } else {
if((entry._source['schema:creator'] != 'rest_lateral') && (entry._source['schema:creator'] != 'restauranteslateral')) results.push(entry._source); if((entry._source['schema:creator'] != 'rest_lateral') && (entry._source['schema:creator'] != 'restauranteslateral') && (entry._source['schema:creator'] != '100montaditos') && (entry._source['schema:creator'] != '100MontaditosSpain')) results.push(entry._source);
} }
}); });
//console.log(results) //console.log(results)
......
...@@ -83,8 +83,8 @@ Polymer({ ...@@ -83,8 +83,8 @@ Polymer({
var selected = 0; var selected = 0;
var words = [] var words = []
hits.forEach(function(entry) { hits.forEach(function(entry) {
//console.log(entry) console.log(entry)
if (entry.key != 'restauranteslateral' && entry.key != 'rest_lateral'){ if (entry.key != 'restauranteslateral' && entry.key != 'rest_lateral' && entry.key != '100montaditos' && entry.key != '100MontaditosSpain'){
words.push({'text': entry.key, 'weight' : entry.doc_count}) words.push({'text': entry.key, 'weight' : entry.doc_count})
} }
}); });
......
import luigi import luigi
from luigi.contrib.esindex import CopyToIndex from luigi.contrib.esindex import CopyToIndex
from orchestrator.SenpyAnalysis import SenpyAnalysis from soneti_tasks.SenpyAnalysis import SenpyAnalysis
from orchestrator.GSICrawlerScraper import GSICrawlerScraper from soneti_tasks.GSICrawlerScraper import GSICrawlerScraper
from orchestrator.CopyToFuseki import CopyToFuseki from soneti_tasks.CopyToFuseki import CopyToFuseki
class ScrapyTask(GSICrawlerScraper): class ScrapyTask(GSICrawlerScraper):
......
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