In [3]:
import sys; sys.path.append(_dh[0].split("knowknow")[0])
from knowknow import *

database_name = 'sociology-wos-all'
In [4]:
groups = load_variable("%s.groups"%database_name)
cits = get_cnt("%s.doc"%database_name, ['c'])
Loaded keys: dict_keys(['c'])
Available keys: ['c', 'c.c', 'c.fj', 'c.fy', 'fj', 'fj.fy', 'fy', 'ty', 'ty.ty']
In [5]:
# books

import json
toprint = 20
printed = 0
printi = 0
while printed < toprint:
    
    myparts = ["%s (%s)" % (k,cits['c'][(k,)]) for k,v in groups.items() if v==printi]
    printi += 1
    
    if len(myparts[0].split("|")) != 2:
        continue
           
    pstr = "\n".join(myparts)
    
    
    if len(myparts) == 1:
        continue
        
    print(pstr)
    print()
    
    printed += 1
Campbell, A.|quality am life perc (206)
Campbell, A.|quality am life 1978 (5)

International, W.|pers wellb ind (23)
International, W.|pers wellb ind ad (5)
International, W.|pers wellb ind ad pw (5)
International, W.|pers wellb ind man (3)

Bellah, R.|habits heart individ (318)
Bellah, R.|habits heart (209)
Bellah, R.|habits heart middle (2)
Bellah, R.|habits of heart (15)

Easterlin, R.|nations households e (84)
Easterlin, R.|nations household ec (4)

Inglehart, R.|modernization postmo (261)
Inglehart, R.|modernization cultur (111)

Nussbaum, M.|fragility goodness l (10)
Nussbaum, M.|fragility goodness (7)

Putnam, R.|bowling alone collap (1111)
Puttnam, R.|bowling alone (2)
Putnam, R.|bowling alone the co (7)
Putnam, R.|bowling alone (137)
Putnam, R.|bowling collapse rev (46)

Snijders, T.|multilevel anal intr (371)
Snijders, T.|intro multilevel ana (4)
Snijders, T.|multilevel anal (44)

Almond, G.|civic culture politi (105)
Almond, G.|civic cult (3)
Almond, G.|civic culture (206)
Almond, G.|civic culture revisi (11)

Brubaker, R.|citizenship nationho (151)
Brubaker, W.|citizenship nationho (11)

Durkheim, E.|division labor soc (985)
Durkheim, E.|division labor (30)
Durkheim, E.|divison labor soc (4)
Durkheim, E.|division labor socie (26)
Durkheim, E.|divions labor soc (2)

Huntington, S.|clash civilizations (145)
Huntington, S.|clash civilization r (10)

Inglehart, R.|culture shift adv in (279)
Inglehart, R.|cultural shift adv i (31)
Inglehart, R.|culture shift (13)

Parsons, T.|social system (1070)
Parsons, T.|social systems evolu (35)

Blau, P.|exchange power socia (603)
Blau, P.|exchange power soc (14)
Blau, P.|exchange power (3)
Blau, P.|exchange social life (3)

Bronfenbrenner, U.|ecology human dev (73)
Bronfenbrenner, U.|ecology human dev ex (101)

Coleman, J.|adolescent soc (303)
Coleman, J.|adolescent soc socia (89)
Coleman, J.|adolescent society (21)
Coleman, J.|the adolescent socie (2)

Coleman, J.|public private high (81)
Coleman, J.|public private sch i (30)
Coleman, J.|public private sch d (3)

Lortie, D.|schoolteacher sociol (36)
Lortie, D.|schoolteacher (23)
Lortie, D.|schoolteacher soc st (3)
Lortie, D.|sch teacher soc stud (5)

Luhmann, N.|trust power (90)
Luhmann, N.|trust power 2 works (12)

In [6]:
# articles

import json
toprint = 20
printed = 0
printi = 0
    
for gid, count in Counter(gid for x,gid in groups.items() if len(x.split("|"))>2).most_common(toprint*2)[toprint:]:
    
    myparts = ["%s (%s)" % (k,cits['c'][(k,)]) for k,v in groups.items() if v==gid]
    printi += 1
    
    if len(myparts[0].split("|")) == 2:
        continue
    
    if len(myparts) == 1:
        continue
        
    pstr = "\n".join(myparts)
    
    print(pstr)
    print()
    
    printed += 1
Schermelleh-Engel, K.|2003|methods psychol res,v8,p23 (6)
Schermelleh-Engel, K.|2003|methods psychol res,v2,p23 (15)

Sampson, R.|1997|science,v277,p918 (390)
Sampson, R.|1997|science,v227,p918 (8)

Granovetter, M.|1983|sociological theory,v1,p201 (175)
Granovetter, M.|1983|sociological theory,v1,p203 (5)

Coleman, J.|1988|am j sociol,v94,ps95 (709)
Coleman, J.|1988|am j sociol,v94,ps94 (16)

Mcpherson, M.|2001|annu rev sociol,v27,p415 (584)
Mcpherson, J.|2001|annu rev sociol,v27,p415 (8)

Vanrees, C.|1996|poetics,v23,p317 (5)
Vanrees, K.|1996|poetics,v23,p317 (9)

Granovetter, M.|1976|am j sociol,v81,p1287 (39)
Granovetter, M.|1973|am j sociol,v81,p1287 (3)

Portes, A.|1998|annu rev sociol,v24,p1 (472)
Portes, A.|1998|annu rev sociol,v22,p1 (13)

Portes, A.|1993|ann am acad polit ss,v530,p74 (359)
Portes, A.|1993|ann am acad polit ss,v530,p75 (4)

Crane, J.|1991|am j sociol,v96,p1226 (103)
Crane, J.|1991|am j sociol,v96,p1126 (8)

Mccarthy, J.|1977|am j sociol,v82,p1212 (466)
Mccarthy, J.|1997|am j sociol,v82,p1212 (32)

Snyder, D.|1979|am j sociol,v84,p1096 (97)
Snyder, D.|1979|am j sociol,v84,p1097 (7)

Hardin, G.|1968|science,v162,p1243 (261)
Hardin, G.|1968|science,v162,p1248 (25)

Walton, J.|1990|am sociol rev,v55,p876 (37)
Walton, J.|1990|am sociol rev,v55,p875 (3)

Freudenburg, W.|2005|soc forces,v84,p89 (16)
Freudenburg, W.|2005|soc forces,v94,p89 (4)

Massey, D.|1987|am sociol rev,v52,p802 (110)
Masey, D.|1987|am sociol rev,v52,p802 (2)

Elder, G.|1998|hdb child psychol,v1,p939 (44)
Elder, G.|1997|hdb child psychol,v1,p939 (3)

Kasarda, J.|1974|am sociol rev,v39,p328 (185)
Kasarda, J.|1974|am sociol rev,v39,p329 (2)

Downey, D.|1995|am sociol rev,v60,p746 (88)
Downey, D.|1995|am sociol rev,v60,p747 (3)

West, C.|1987|gender soc,v1,p125 (712)
West, C.|1987|gender soc,v1,p121 (4)

In [7]:
Counter(gid for x,gid in groups.items() if len(x.split("|"))>2).most_common(10)
Out[7]:
[(43383, 8),
 (45416, 8),
 (53059, 6),
 (47211, 5),
 (105626, 4),
 (42059, 3),
 (43136, 3),
 (45314, 3),
 (45991, 3),
 (46835, 3)]
In [ ]: