forked from ronilp/Finding-Influencers-in-Social-Networks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase.py
47 lines (35 loc) · 990 Bytes
/
database.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from pymongo import MongoClient
client = MongoClient()
db = client.Facebook
def getFriendsCollection():
collection = db.fbfriends
return collection
def getLikesCollection():
collection = db.fblikes
return collection
def getPageCollection():
collection = db.fbpages
return collection
def getPageDataCollection():
collection= db.fbpagesdata
return collection
#cluster : [pageids]
def getClusterCollection():
collection = db.cluster
return collection
#pageId : cluster, peopleId, count
def getPagesClusterInfoCollection():
collection = db.fbpagesclusterinfo
return collection
def getClusterInfluencerScoreCollection():
collection = db.clusterInfluencerScore
return collection
def getUserClusterContributionCollection():
collection = db.userClusterContribution
return collection
def getFullInfluenceScoreCollection():
collection = db.fullInfluenceScore
return collection
def getclusterLevelResultCollection():
collection = db.clusterLevelResult
return collection