key term list should be dynamic

Issue #19 resolved
Ali Hürriyetoglu repo owner created an issue

currently the key terms that can be selected are just a static list. Enable the automatic calculation, get the most frequent n.

Comments (2)

  1. ugur ozcan

    I pushed the codes in my branch views.py. I got the keywords from the database with pymongo. I used mongodb query(distinct) to get keywords from the database.

    pymongo_local_client=pymongo.MongoClient() # connecting local mongodb client on ugur's computer.
    pymongo_local_db=pymongo_local_client.myugurdb # connecting local mongodb database on ugur's computer.
    pymongo_local_keywordlist=pymongo_local_db.floodtags20140729.distinct( "keywords") # getting the keywords descending order from floodtags20140729 collection.
    print(pymongo_local_keywordlist) # you can see the keywords on terminal after running codes.
    keywordlist = pymongo_local_keywordlist[:11] # getting the top 10 keywords from the dataset. 
    
  2. Log in to comment