Keyword Title Script - RaspPywriter/web_scraper GitHub Wiki

Purpose

This script groups the search by job title for jobs that have SQL in the description, and then returns the count for each job title.

print('SQL') results = db.jobs.aggregate( { $match : {jobDesc : /.sql./i} }, {"$group" : { _id:"$jobTitle", total : { $sum : 1 } } } ) while ( results.hasNext() ) { printjson(results.next() ); } print('Python') results = db.jobs.aggregate( { $match : {jobDesc : /.python./i} }, {"$group" : { _id:"$jobTitle", total : { $sum : 1 } } } ) while ( results.hasNext() ) { printjson(results.next() ); }