ghdms

csv 파일 정리 및 중간보고서 수정

1,명량,"135,757,221,810","17,615,658","1,587","188,716"
2,극한직업,"139,653,039,516","16,265,855","2,003","292,665"
3,신과함께-죄와 벌,"115,707,627,637","14,411,775","1,912","213,316"
4,국제시장,"110,944,262,730","14,263,940","1,044","212,693"
5,베테랑,"105,170,856,250","13,414,484","1,115","199,307"
6,도둑들,"93,672,361,700","12,984,692","1,091","155,485"
7,7번방의 선물,"91,434,811,670","12,811,714",866,"166,855"
8,암살,"98,468,525,781","12,706,829","1,519","175,214"
9,"광해, 왕이 된 남자","88,913,283,469","12,324,062","1,001","203,464"
10,신과함께-인과 연,"102,677,675,409","12,276,350","2,235","180,043"
11,택시운전사,"95,871,287,649","12,189,654","1,906","184,200"
12,부산행,"93,187,397,548","11,567,662","1,788","151,530"
13,변호인,"82,874,748,788","11,375,123",925,"152,284"
14,해운대,"81,027,925,000","11,324,958",764,"154,329"
15,괴물,"66,717,700,300","10,917,400",647,"113,105"
16,왕의 남자,"66,018,145,400","10,513,976",313,"111,180"
17,기생충,"87,274,446,675","10,289,601","1,948","200,496"
18,검사외전,"77,320,403,264","9,707,581","1,812","153,532"
19,엑시트,"79,232,932,162","9,426,131","1,660","202,225"
20,설국열차,"67,027,834,500","9,352,604","1,128","125,417"
21,관상,"66,009,826,500","9,135,806","1,240","125,107"
22,해적: 바다로 간 산적,"66,372,140,706","8,666,208",910,"133,354"
23,수상한 그녀,"62,720,514,849","8,660,623","1,027","137,007"
24,백두산,"69,816,164,300","8,251,749","1,971","174,313"
25,과속스캔들,"53,801,341,400","8,223,342",408,"145,556"
26,국가대표,"57,570,773,000","8,035,181",570,"131,671"
27,디워,"49,340,084,700","7,855,474",622,"96,439"
28,공조,"63,783,303,326","7,817,654","1,392","142,991"
29,히말라야,"60,175,363,015","7,759,761","1,095","142,715"
30,밀정,"61,270,079,831","7,500,457","1,444","138,162"
31,최종병기 활,"55,827,861,500","7,470,633",615,"130,055"
32,써니,"54,038,534,700","7,363,139",546,"149,154"
33,1987,"58,169,776,145","7,232,387","1,299","138,226"
34,베를린,"52,358,372,637","7,166,688",894,"111,760"
35,마스터,"58,068,236,865","7,150,586","1,501","126,927"
36,터널,"57,530,028,417","7,120,780","1,105","113,214"
37,내부자들,"56,604,868,557","7,073,516","1,129","152,763"
38,인천상륙작전,"55,112,241,303","7,051,237","1,049","97,035"
39,럭키,"56,445,323,256","6,975,631","1,234","155,991"
40,은밀하게 위대하게,"48,700,887,413","6,959,083","1,341","117,462"
41,범죄도시,"56,322,153,349","6,880,546","1,315","149,389"
42,곡성,"55,864,308,382","6,879,989","1,485","130,332"
43,화려한 휴가,"44,098,824,600","6,855,433",551,"96,536"
44,"좋은 놈, 나쁜 놈, 이상한 놈","43,755,980,300","6,686,075",824,"93,589"
45,늑대소년,"46,594,814,400","6,655,068",854,"109,166"
46,군함도,"50,510,565,168","6,592,151","2,027","108,775"
47,웰컴 투 동막골,"40,329,355,500","6,436,900",356,"72,129"
48,사도,"48,846,045,501","6,247,651","1,210","124,264"
49,아저씨,"47,104,059,000","6,178,665",501,"109,891"
50,미녀는 괴로워,"36,292,848,900","6,081,480",418,"87,141"
51,전우치,"44,093,407,200","6,065,474",612,"102,357"
52,연평해전,"45,567,755,830","6,045,049","1,013","114,489"
53,타짜,"36,182,617,500","5,685,715",492,"76,887"
54,청년경찰,"44,382,020,516","5,653,444","1,102","118,547"
55,숨바꼭질,"39,602,995,500","5,604,106",779,"88,066"
56,덕혜옹주,"44,397,617,609","5,599,995",964,"97,327"
57,더 테러 라이브,"39,870,954,381","5,584,295",809,"93,489"
58,감시자들,"39,389,732,679","5,509,019",949,"100,349"
59,검은 사제들,"42,412,952,592","5,443,232","1,109","131,179"
60,안시성,"46,342,006,026","5,441,020","1,540","110,444"
61,의형제,"40,154,381,000","5,416,923",569,"118,251"
62,더 킹,"43,492,782,535","5,318,007","1,310","107,986"
63,완득이,"38,533,831,000","5,311,353",629,"117,850"
64,완벽한 타인,"44,356,976,474","5,294,154","1,325","143,075"
65,타워,"37,656,008,000","5,181,244",638,"81,151"
66,투사부일체,"31,959,686,000","5,074,314",407,"54,339"
67,독전,"43,486,831,113","5,063,844","1,532","140,008"
68,추격자,"33,986,959,000","5,046,096",433,"106,805"
69,공작,"42,795,690,816","4,975,517","1,317","99,122"
70,바람과 함께 사라지다,"34,614,720,161","4,909,950",694,"78,594"
71,"님아, 그 강을 건너지 마오","37,358,296,079","4,802,416",806,"93,456"
72,봉오동 전투,"40,588,648,538","4,787,538","1,476","107,030"
73,조선명탐정 : 각시투구꽃의 비밀,"35,841,769,500","4,786,259",634,"84,189"
74,군도: 민란의 시대,"36,990,394,499","4,775,811","1,394","67,259"
75,남산의 부장들,"41,223,567,650","4,750,100","1,659","140,046"
76,범죄와의 전쟁: 나쁜놈들 전성시대,"36,540,417,500","4,720,060",713,"91,893"
77,신세계,"34,892,973,605","4,684,571",671,"90,717"
78,도가니,"35,567,476,000","4,662,926",756,"88,345"
79,내 아내의 모든 것,"34,224,467,500","4,598,985",563,"91,777"
80,판도라,"36,069,197,064","4,585,116","1,184","100,273"
81,나쁜 녀석들: 더 무비,"39,560,195,124","4,573,902","1,511","113,938"
82,가문의 위기(가문의 영광2),"28,622,355,500","4,529,876",351,"61,009"
83,연가시,"32,176,550,664","4,516,063",759,"71,932"
84,강철비,"35,490,346,466","4,452,850","1,426","80,359"
85,강철중: 공공의 적 1-1,"28,638,465,100","4,313,102",707,"74,158"
86,아가씨,"35,220,812,991","4,288,908","1,171","90,384"
87,말아톤,"26,285,057,000","4,196,859",238,"59,495"
88,용의자,"30,037,521,000","4,131,338",807,"69,124"
89,건축학개론,"30,242,262,900","4,113,696",593,"106,578"
90,댄싱퀸,"30,130,775,500","4,058,225",544,"80,987"
91,7급 공무원,"26,380,710,000","4,039,891",475,"90,779"
92,우리 생애 최고의 순간,"26,119,898,000","4,018,872",418,"70,724"
93,꾼,"31,313,568,795","4,018,341","1,314","117,419"
94,타짜-신의 손,"32,373,120,927","4,015,361",890,"80,584"
95,박수건달,"28,379,548,569","3,897,969",603,"60,604"
96,조선명탐정 : 사라진 놉의 딸,"30,456,879,428","3,872,015",825,"80,499"
97,역린,"29,895,031,890","3,849,700","1,054","83,304"
98,남한산성,"31,225,419,792","3,849,129","1,229","71,102"
99,암수살인,"32,998,321,048","3,789,553","1,177","126,128"
100,국가부도의 날,"30,893,315,837","3,755,233","1,180","101,077"
101,쌍화점,"25,411,823,400","3,749,034",532,"72,498"
102,신기전,"24,326,406,000","3,728,439",585,"78,464"
103,82년생 김지영,"30,305,744,310","3,679,019","1,486","145,461"
104,귀향,"27,250,291,990","3,587,252",876,"90,289"
105,신의 한 수,"28,812,027,456","3,566,852",794,"77,110"
106,태풍,"22,209,675,300","3,471,150",481,"47,155"
107,부러진 화살,"25,938,096,000","3,460,212",530,"71,607"
108,끝까지 간다,"27,007,303,900","3,450,305",645,"84,876"
109,스파이,"24,513,098,305","3,436,092",785,"72,805"
110,그것만이 내 세상,"27,456,960,382","3,420,199",956,"95,438"
111,돈,"28,870,244,062","3,389,125","1,431","120,809"
112,악인전,"29,133,760,150","3,364,712","1,307","97,351"
113,이끼,"25,437,344,000","3,350,311",740,"58,200"
114,한반도,"20,597,497,600","3,331,593",483,"49,539"
115,포화속으로,"23,831,968,600","3,330,326",742,"80,093"
116,시동,"28,107,024,360","3,317,847","1,515","93,433"
117,아이 캔 스피크,"25,551,269,986","3,283,470","1,140","93,074"
118,마녀,"27,242,029,463","3,189,091","1,117","90,843"
119,탐정: 리턴즈,"26,909,514,678","3,152,895","1,137","107,909"
120,공공의 적 2,"20,091,142,000","3,134,424",299,"40,643"
121,퀵,"22,960,890,000","3,125,069",514,"60,714"
122,친절한 금자씨,"20,503,781,593","3,122,056",386,"41,575"
123,감기,"21,774,884,000","3,117,859",806,"55,046"
124,스물,"23,563,705,686","3,044,859",926,"100,167"
125,거북이 달린다,"20,618,276,000","3,024,666",432,"69,946"
126,헬로우 고스트,"22,057,866,500","3,019,960",472,"57,579"
127,하모니,"21,641,865,000","3,018,154",384,"77,732"
128,오싹한 연애,"22,011,287,000","3,009,406",544,"62,079"
129,방자전,"22,490,392,000","2,985,556",495,"67,573"
130,형,"23,133,206,693","2,982,514",993,"83,599"
131,마더,"19,989,614,800","2,981,953",642,"71,509"
132,그놈 목소리,"17,598,617,600","2,972,299",498,"48,673"
133,친구 2,"21,804,687,513","2,971,475",968,"69,865"
134,식객,"18,984,549,500","2,965,359",406,"67,339"
135,26년,"21,242,367,145","2,963,652",611,"50,679"
136,고지전,"21,968,680,600","2,945,151",585,"53,745"
137,워낭소리,"19,077,014,900","2,934,883",274,"63,274"
138,프리즌,"23,790,276,987","2,931,897","1,047","89,024"
139,가장 보통의 연애,"24,885,803,430","2,924,563","1,073","111,527"
140,말모이,"23,989,598,520","2,866,453","1,203","87,843"
141,극비수사,"22,389,535,897","2,860,786",894,"66,211"
142,표적,"22,256,881,300","2,841,884",716,"72,256"
143,너의 결혼식,"23,676,244,369","2,820,969",970,"98,193"
144,내가 살인범이다,"20,392,518,000","2,729,827",547,"58,415"
145,부당거래,"21,000,698,100","2,723,773",502,"69,796"
146,소원,"18,529,944,600","2,711,094",651,"72,331"
147,너는 내 운명,"17,656,835,000","2,701,974",306,"46,699"
148,시라노; 연애조작단,"19,838,443,000","2,684,798",415,"77,739"
149,곤지암,"21,444,236,144","2,675,883","1,124","88,553"
150,살인자의 기억법,"21,375,287,492","2,658,589","1,064","88,686"
151,마파도,"16,751,202,503","2,636,857",178,"49,473"
152,후궁 : 제왕의 첩,"19,330,736,000","2,636,385",624,"69,119"
153,탐정 : 더 비기닝,"20,463,956,973","2,625,686",764,"54,995"
154,지금 만나러 갑니다,"20,800,916,128","2,602,273","1,191","97,482"
155,가문의 부활 - 가문의 영광3,"15,996,330,400","2,598,859",444,"51,434"
156,위험한 상견례,"19,174,920,500","2,595,625",524,"75,068"
157,아수라,"20,582,479,662","2,594,695","1,278","68,060"
158,보안관,"20,844,488,409","2,588,628","1,091","63,709"
159,기술자들,"19,894,297,783","2,564,340",641,"43,224"
160,굿모닝 프레지던트,"18,567,863,300","2,554,960",586,"69,955"
161,태극기 휘날리며,"15,688,614,500","2,545,566",115,"22,422"
162,라스트 갓파더,"18,511,991,000","2,541,603",547,"46,450"
163,1번가의 기적,"15,494,122,100","2,535,450",340,"54,566"
164,증인,"20,483,149,331","2,534,793","1,047","89,574"
165,목격자,"21,737,061,097","2,524,720","1,021","71,403"
166,조작된 도시,"20,144,704,587","2,515,590","1,019","62,242"
167,블랙머니,"20,871,409,010","2,480,145","1,141","77,508"
168,반창꼬,"17,911,274,787","2,475,797",466,"46,879"
169,우리들의 행복한 시간,"14,938,924,000","2,472,160",414,"47,315"
170,조선명탐정: 흡혈괴마의 비밀,"19,822,789,764","2,444,136","1,249","74,953"
171,화차,"18,463,007,000","2,436,884",548,"62,653"
172,이웃사람,"18,089,332,369","2,434,435",600,"56,755"
173,재심,"19,266,319,637","2,421,197",935,"68,402"
174,히트맨,"20,610,780,500","2,405,882","1,122","87,774"
175,사바하,"20,008,066,194","2,398,581","1,174","78,097"
176,화이: 괴물을 삼킨 아이,"17,695,683,795","2,394,487",817,"59,051"
177,의뢰인,"17,797,131,500","2,393,103",522,"58,416"
178,가문의 영광4 - 가문의 수난,"17,792,219,500","2,368,267",537,"48,432"
179,블라인드,"18,390,012,500","2,367,942",404,"49,359"
180,박열,"18,096,420,795","2,359,707","1,176","78,504"
181,미인도,"15,655,329,500","2,342,579",450,"69,523"
182,음란서생,"14,944,551,700","2,304,368",347,"38,967"
183,내 생애 가장 아름다운 일주일,"14,710,541,000","2,290,709",296,"41,058"
184,하녀,"17,038,839,500","2,267,579",555,"59,625"
185,황해,"17,497,165,500","2,260,512",618,"42,102"
186,7광구,"19,391,653,500","2,242,510",812,"47,346"
187,타짜: 원 아이드 잭,"19,687,491,214","2,229,281","1,429","66,480"
188,박쥐,"14,857,692,000","2,208,165",499,"45,533"
189,마당을 나온 암탉,"14,683,917,500","2,204,374",363,"39,527"
190,악의 연대기,"17,361,815,332","2,192,525",776,"64,351"
191,강남 1970,"17,718,699,499","2,192,276",841,"53,304"
192,신의 한 수: 귀수편,"18,480,216,050","2,159,081","1,246","82,189"
193,마이 웨이,"15,995,187,000","2,142,670",645,"52,027"
194,나의 사랑 나의 신부,"16,636,404,305","2,141,155",629,"69,684"
195,바르게 살자,"13,944,930,000","2,135,606",372,"55,993"
196,내 사랑 내 곁에,"15,584,755,500","2,135,509",478,"65,168"
197,초능력자,"15,374,798,000","2,130,645",612,"58,009"
198,굿바이 싱글,"16,913,282,195","2,108,561",841,"56,390"
199,몽타주,"15,002,458,500","2,095,592",544,"53,195"
200,명당,"17,900,775,524","2,087,474","1,117","58,450"
명량,"17,615,658"
극한직업,"16,265,855"
신과함께-죄와 벌,"14,411,775"
국제시장,"14,263,940"
베테랑,"13,414,484"
도둑들,"12,984,692"
7번방의 선물,"12,811,714"
암살,"12,706,829"
"광해, 왕이 된 남자","12,324,062"
신과함께-인과 연,"12,276,350"
택시운전사,"12,189,654"
부산행,"11,567,662"
변호인,"11,375,123"
해운대,"11,324,958"
괴물,"10,917,400"
왕의 남자,"10,513,976"
기생충,"10,289,601"
검사외전,"9,707,581"
엑시트,"9,426,131"
설국열차,"9,352,604"
관상,"9,135,806"
해적: 바다로 간 산적,"8,666,208"
수상한 그녀,"8,660,623"
백두산,"8,251,749"
과속스캔들,"8,223,342"
국가대표,"8,035,181"
디워,"7,855,474"
공조,"7,817,654"
히말라야,"7,759,761"
밀정,"7,500,457"
최종병기 활,"7,470,633"
써니,"7,363,139"
1987,"7,232,387"
베를린,"7,166,688"
마스터,"7,150,586"
터널,"7,120,780"
내부자들,"7,073,516"
인천상륙작전,"7,051,237"
럭키,"6,975,631"
은밀하게 위대하게,"6,959,083"
범죄도시,"6,880,546"
곡성,"6,879,989"
화려한 휴가,"6,855,433"
"좋은 놈, 나쁜 놈, 이상한 놈","6,686,075"
늑대소년,"6,655,068"
군함도,"6,592,151"
웰컴 투 동막골,"6,436,900"
사도,"6,247,651"
아저씨,"6,178,665"
미녀는 괴로워,"6,081,480"
전우치,"6,065,474"
연평해전,"6,045,049"
타짜,"5,685,715"
청년경찰,"5,653,444"
숨바꼭질,"5,604,106"
덕혜옹주,"5,599,995"
더 테러 라이브,"5,584,295"
감시자들,"5,509,019"
검은 사제들,"5,443,232"
안시성,"5,441,020"
의형제,"5,416,923"
더 킹,"5,318,007"
완득이,"5,311,353"
완벽한 타인,"5,294,154"
타워,"5,181,244"
투사부일체,"5,074,314"
독전,"5,063,844"
추격자,"5,046,096"
공작,"4,975,517"
바람과 함께 사라지다,"4,909,950"
"님아, 그 강을 건너지 마오","4,802,416"
봉오동 전투,"4,787,538"
조선명탐정 : 각시투구꽃의 비밀,"4,786,259"
군도: 민란의 시대,"4,775,811"
남산의 부장들,"4,750,100"
범죄와의 전쟁: 나쁜놈들 전성시대,"4,720,060"
신세계,"4,684,571"
도가니,"4,662,926"
내 아내의 모든 것,"4,598,985"
판도라,"4,585,116"
나쁜 녀석들: 더 무비,"4,573,902"
가문의 위기(가문의 영광2),"4,529,876"
연가시,"4,516,063"
강철비,"4,452,850"
강철중: 공공의 적 1-1,"4,313,102"
아가씨,"4,288,908"
말아톤,"4,196,859"
용의자,"4,131,338"
건축학개론,"4,113,696"
댄싱퀸,"4,058,225"
7급 공무원,"4,039,891"
우리 생애 최고의 순간,"4,018,872"
꾼,"4,018,341"
타짜-신의 손,"4,015,361"
박수건달,"3,897,969"
조선명탐정 : 사라진 놉의 딸,"3,872,015"
역린,"3,849,700"
남한산성,"3,849,129"
암수살인,"3,789,553"
국가부도의 날,"3,755,233"
쌍화점,"3,749,034"
신기전,"3,728,439"
82년생 김지영,"3,679,019"
귀향,"3,587,252"
신의 한 수,"3,566,852"
태풍,"3,471,150"
부러진 화살,"3,460,212"
끝까지 간다,"3,450,305"
스파이,"3,436,092"
그것만이 내 세상,"3,420,199"
돈,"3,389,125"
악인전,"3,364,712"
이끼,"3,350,311"
한반도,"3,331,593"
포화속으로,"3,330,326"
시동,"3,317,847"
아이 캔 스피크,"3,283,470"
마녀,"3,189,091"
탐정: 리턴즈,"3,152,895"
공공의 적 2,"3,134,424"
퀵,"3,125,069"
친절한 금자씨,"3,122,056"
감기,"3,117,859"
스물,"3,044,859"
거북이 달린다,"3,024,666"
헬로우 고스트,"3,019,960"
하모니,"3,018,154"
오싹한 연애,"3,009,406"
방자전,"2,985,556"
형,"2,982,514"
마더,"2,981,953"
그놈 목소리,"2,972,299"
친구 2,"2,971,475"
식객,"2,965,359"
26년,"2,963,652"
고지전,"2,945,151"
워낭소리,"2,934,883"
프리즌,"2,931,897"
가장 보통의 연애,"2,924,563"
말모이,"2,866,453"
극비수사,"2,860,786"
표적,"2,841,884"
너의 결혼식,"2,820,969"
내가 살인범이다,"2,729,827"
부당거래,"2,723,773"
소원,"2,711,094"
너는 내 운명,"2,701,974"
시라노; 연애조작단,"2,684,798"
곤지암,"2,675,883"
살인자의 기억법,"2,658,589"
마파도,"2,636,857"
후궁 : 제왕의 첩,"2,636,385"
탐정 : 더 비기닝,"2,625,686"
지금 만나러 갑니다,"2,602,273"
가문의 부활 - 가문의 영광3,"2,598,859"
위험한 상견례,"2,595,625"
아수라,"2,594,695"
보안관,"2,588,628"
기술자들,"2,564,340"
굿모닝 프레지던트,"2,554,960"
태극기 휘날리며,"2,545,566"
라스트 갓파더,"2,541,603"
1번가의 기적,"2,535,450"
증인,"2,534,793"
목격자,"2,524,720"
조작된 도시,"2,515,590"
블랙머니,"2,480,145"
반창꼬,"2,475,797"
우리들의 행복한 시간,"2,472,160"
조선명탐정: 흡혈괴마의 비밀,"2,444,136"
화차,"2,436,884"
이웃사람,"2,434,435"
재심,"2,421,197"
히트맨,"2,405,882"
사바하,"2,398,581"
화이: 괴물을 삼킨 아이,"2,394,487"
의뢰인,"2,393,103"
가문의 영광4 - 가문의 수난,"2,368,267"
블라인드,"2,367,942"
박열,"2,359,707"
미인도,"2,342,579"
음란서생,"2,304,368"
내 생애 가장 아름다운 일주일,"2,290,709"
하녀,"2,267,579"
황해,"2,260,512"
7광구,"2,242,510"
타짜: 원 아이드 잭,"2,229,281"
박쥐,"2,208,165"
마당을 나온 암탉,"2,204,374"
악의 연대기,"2,192,525"
강남 1970,"2,192,276"
신의 한 수: 귀수편,"2,159,081"
마이 웨이,"2,142,670"
나의 사랑 나의 신부,"2,141,155"
바르게 살자,"2,135,606"
내 사랑 내 곁에,"2,135,509"
초능력자,"2,130,645"
굿바이 싱글,"2,108,561"
몽타주,"2,095,592"
명당,"2,087,474"
from igraph import *
import pymongo
conn = pymongo.MongoClient("localhost")
db = conn.test
MOVIE = db.movie
cur = MOVIE.find()
audience = {}
for c in cur:
audience[c["name"]] = c["audience"]
data = {
"명량": "최민식,류승룡,조진웅,김명곤,진구,이정현,권율,노민우,이승준,박보검,김원해,이해영,장준녕,김길동,김강일,강태영,김민석,박노식,최덕문,조복래,문영동,이주실,주석태,고경표,김태훈,한이진,신유람",
"극한직업": "류승룡,이하늬,이동휘,공명,진선규,홍은진,양현민,장진희,오정세,이중옥,송영규,신하균,김의성,김종수,허준석",
"신과함께-죄와 벌": "하정우,차태현,주지훈,김향기,마동석,김동욱,도경수,오달수,임원희,장광,정해균,김수안,정지훈,예수정,이준혁",
"국제시장": " 황정민,김윤진,오달수,정진영,장영남,라미란,김슬기,정영기,맹세창,박재우,김재철",
"베테랑": "황정민,유아인,유해진,오달수,장윤주,김시후,오대환,정웅인,정만식,송영창,진경,유인영,박소담,이동휘,배성우,천호진",
"도둑들": "김윤석,김혜수,이정재,전지현,김해숙,오달수,김수현,최덕문,최진호,예수정",
"7번방의 선물": "류승룡,박신혜,갈소원,오달수,박원상,김정태,정만식,김기천,조덕현,조재윤,박길수",
"암살": "전지현,이정재,하정우,오달수,조진웅,이경영,최덕문,김의성,박병은,김홍파,진경,김인우,심희섭,허지원,허정도,정인겸",
"광해, 왕이 된 남자": "이병헌,류승룡,한효주,장광,김인권,심은경,김명곤,박지아,이양희,전국향",
"신과함께-인과 연": "하정우,주지훈,김향기,마동석,김동욱,도경수,이준혁,정지훈,조한철,장광",
"택시운전사": "송강호,류준열,유해진,박혁권,최귀화,이정은,차순배,이봉련,류성현,허정도",
"부산행": "공유,정유미,마동석,김수안,최우식,안소희,김의성,예수정,박명신",
"변호인": "송강호,김영애,오달수,곽도원,임시완,송영창,정원중,조민기,이항나,이성민,차광수,한기중,심희섭,김동현,조완기,차은재",
"해운대": "설경구,하지원,박중훈,엄정화,이민기,강대규,김원영,김유빈,신정원,성유경,박재홍,나승현,김재경,장원준,임동우,김정곤,정종원,이지애,최재섭,장명갑,지대한,천보근,강예원,김희미",
"괴물": "송강호,변희봉,박해일,배두나,고아성,오달수,박노식,고수희,윤제문,김뢰하,이재응,이왕우",
"왕의 남자": "감우성,이준기,유해진,정진영,강성연,이동수,김주홍,장항선,정석용",
"기생충": "송강호,이선균,조여정,최우식,박소담,이정은,장혜진,박명훈,현승민,정현준",
"검사외전": "황정민,강동원,이성민,박성웅,김응수,신소율,주진모,김원해,김홍파,김병옥,박종환,전배수,박지환,손종학,김종수,한재영,이석준,이선주,민무제",
"엑시트": "조정석,윤아,설도희,최재영,고두심,김환영,변건우,황지현,황효은,박인환,김지영,강기영,배유람,유수빈,정민성,박성일,신세휘,김강훈,김병순,김종구,이봉련",
"설국열차": "송강호,고아성",
"관상": "송강호,이정재,백윤식,조정석,이종석,김혜수,이도엽,김의성",
"해적: 바다로 간 산적": "김남길,손예진,신정근,유해진,이경영,오달수,김태우,박철민,김원해,조달환,조희봉,정성화,최진리,이이경,권성영,김재학,김한준,안내상,이대연",
"수상한 그녀": "심은경,나문희,박인환,성동일,이진욱,김현숙,황정민,김슬기,박형우,진영,김동희,한지은,정인기,이장유,하연주,박혜진",
"백두산": "이병헌,하정우,마동석,전혜진,배수지,이상원,옥자연,한수현,강신철,이경영,조한철,최광일,김시아,임형국,박주환,남성준,서현우,김민식,박지홍,김준원,남문철,박성근",
"과속스캔들": "차태현,박보영,왕석현,임지규,황우슬혜,정원중,김기방",
"국가대표": "하정우,성동일,김지석,김동욱,최재환,이재응,이은성,방수연,심영,이한위,이혜숙,김지영,쥬니,황하나",
"공조": "현빈,유해진,김주혁,장영남,이해영,윤아,이동휘,박형수,공정환,엄효섭,신현빈",
"히말라야": "황정민,정우,조성하,김인권,라미란,김원해,이해영,전배수,유선",
"밀정": "송강호,공유,한지민,엄태구,신성록,서영주,정유안,이수광,고준,최유화,허성태,김동영,곽자형,조영규",
"최종병기 활": "박해일,류승룡,김무열,문채원,이한위,김구택,이경영,박기웅,이승준,이재구,박노식,이다윗,전민서,문영동",
"써니": "유호정,심은경,강소라,고수희,홍진희,김민영,김선경,김보미,이연경,남보라,민효린,조민수,박진주,박영서,김예원,천우희,정원중,김영옥,김시후,김혜옥",
"1987": "김윤석,하정우,유해진,김태리,이희준,박희순,서현우,박지환,이화룡,이창훈,김수진,박경혜,현봉식,김승훈,김경덕",
"베를린": "하정우,한석규,류승범,전지현,이경영,최무성,곽도원,김서형,백승익,배정남",
"마스터": "이병헌,강동원,김우빈,엄지원,오달수,박해수,진경,김정우,우도환,배정남,조현철,정원중,주석태",
"터널": "하정우,배두나,오달수,김종수,조현철",
"내부자들": "이병헌,조승우,백윤식,이경영,김홍파,배성우,조재윤,김대명,조우진,이엘,정만식,김병옥,김의성,박진우,남일우",
"인천상륙작전": "이정재,이범수,진세연,정준호,박철민,김병옥,이창세,박정원,김희진,진용욱,성혁",
"럭키": "유해진,이준,조윤희,임지연,전혜빈,이동휘,고준,차엽,이성욱,정희태,김민상",
"은밀하게 위대하게": "김수현,박기웅,이현우,손현주,신정근,박혜숙,김성균,고창석,장광,홍경인,이채영,박은빈,최우식,이연경,조영진",
"범죄도시": "마동석,윤계상,조재윤,최귀화,김성규,유지연,진선규,허동원,박지환,허성태,홍기준,하준",
"곡성": "곽도원,황정민,천우희,김환희,허진,장소연,김도윤,손강국,전배수,박성연",
"화려한 휴가": "김상경,안성기,이요원,이준기,박철민,김하림,김철기,이정국,손병호,이얼,엄효섭,권태원",
"좋은 놈, 나쁜 놈, 이상한 놈": "송강호,이병헌,정우성,엄지원,오달수,김광일,손병호,이청아,김선영,성정훈,송승현,신상우,조화성,박광복,송영창,윤영우,정성우,양명헌,윤제문,류승수",
"늑대소년": "송중기,박보영,장영남,유연석,김향기,장서이,이영란,유승목,서동수,남정희",
"군함도": "황정민,소지섭,송중기,이정현,김수안,이경영,장성범,백승철,윤경호,김인우",
"웰컴 투 동막골": "신하균,정재영,강혜정,리민,류덕환,임하룡,강남석,손재영,이다운,서재경,유승목,심원철",
"사도": "송강호,유아인,문근영,전혜진,김해숙,박원상,진지희,박소담,서예지,김민규,이대연,최덕문,정석용,최민철,조승연,박명신",
"아저씨": "원빈,김새론,김희원,김성오,김호연,김효서,조영아,이상하,남경읍,송영창,이종필,김태훈",
"미녀는 괴로워": "김아중,주진모,김현숙,조아영,이보라,박노식,이한위",
"전우치": "강동원,임수정,김윤석,유해진,김시권,주진모,선우선,강동균,정혜란,손선영,송진영,김혜지,신수현,박용범,박민규,조운,김현식,박지희,안성진,노남석,한연호,김고은,김규연,고준영,박남희,윤대원,이석원,이성두,정영훈,정우철,박연수,오준석,정지인,이우희,이대로,송영창,김서현,김상호,이용녀,공정환,권태원,김기천",
"연평해전": "김무열,진구,이현우,이완,천민희,이한종,송재호,박정학,이철민,장의수,한이진",
"타짜": "조승우,김혜수,백윤식,유해진,이수경,김응수,김상호,김윤석,주진모,김정난,조상건,서동수,백도빈,김민경,오정세,장원영,권태원",
"청년경찰": "박서준,강하늘,성동일,박하선,고준,이호정",
"숨바꼭질": "손현주,문정희,전미선,김수안,김원해,노수산나,정준원,성유빈,정민성",
"덕혜옹주": "손예진,박해일,윤제문,라미란,정상훈,박수영,김소현,박주미,안내상,김재욱,금새록,김승훈",
"더 테러 라이브": "하정우,이경영,전혜진,이다윗,김홍파,김대명,최진호,김소진,강진아,강신철,한성천",
"감시자들": "설경구,정우성,한효주,진경,이준호,손민석,김대진,이태형,강신하,이동휘,이화정,김진곤,김지훈,신성일,변요한,정우근,장원형,박지연,김병옥",
"검은 사제들": "김윤석,강동원,박소담,김병옥,김의성,이호재,남일우,손종학,조수향,민진웅",
"안시성": "조인성,남주혁,박성웅,김동진,배성우,엄태구,설현,박병은,오대환,성동일,정은채,유오성,정지훈,김욱,장광",
"의형제": "송강호,강동원,전국환,박혁권,윤희석,최정우,정인기,설진욱,강명희,차엽,권범택",
"더 킹": "조인성,정우성,배성우,류준열,김의성,이석호,김민재,정성모,정은채,김소진,황승언,이주연,박정민,김규선,남명렬,오대환,정원중,정인기,이열음",
"완득이": "김윤석,유아인,조병찬,조세현,강별,박효주,김영재,김상호,박수영,김동영",
"완벽한 타인": "유해진,조진웅,이서진,염정아,김지수,송하윤,윤경호,지우",
# "타워": "",
# "투사부일체": "",
# "독전": "",
# "추격자": "",
# "공작": "",
# "바람과 함께 사라지다": "",
# "님아, 그 강을 건너지 마오": "",
# "봉오동 전투": "",
# "조선명탐정 : 각시투구꽃의 비밀": "",
# "군도: 민란의 시대": "",
# "남산의 부장들": "",
# "범죄와의 전쟁: 나쁜놈들 전성시대": "",
# "신세계": "",
# "도가니": "",
# "내 아내의 모든 것": "",
# "판도라": "",
# "나쁜 녀석들: 더 무비": "",
# "가문의 위기(가문의 영광2)": "",
# "연가시": "",
# "강철비": "",
# "강철중: 공공의 적 1-1": "",
# "아가씨": "",
# "말아톤": "",
# "용의자": "",
# "건축학개론": "",
"댄싱퀸": "황정민,엄정화,정성화,오나라,박정민,박사랑,안은정,라미란,이대연,이한위,최우리,권병길,서동원",
# "7급 공무원": "",
# "우리 생애 최고의 순간": "",
# "꾼": "",
# "타짜-신의 손": "",
# "박수건달": "",
# "조선명탐정 : 사라진 놉의 딸": "",
# "역린": "",
# "남한산성": "",
# "암수살인": "",
# "국가부도의 날": "", #100위
# "쌍화점": "",
# "신기전": "",
# "82년생 김지영": "",
# "귀향": "",
# "신의 한 수": "",
# "태풍": "",
# "부러진 화살": "",
# "끝까지 간다": "",
# "스파이": "",
# "그것만이 내 세상": "",
# "돈": "",
# "악인전": "",
# "이끼": "",
# "한반도": "",
# "포화속으로": "",
# "시동": "",
# "아이 캔 스피크": "",
# "마녀": "",
# "탐정: 리턴즈": "",
# "공공의 적 2": "",
# "퀵": "",
# "친절한 금자씨": "",
# "감기": "",
# "스물": "",
# "거북이 달린다": "",
# "헬로우 고스트": "",
# "하모니": "",
# "오싹한 연애": "",
# "방자전": "",
# "형": "",
# "마더": "",
# "그놈 목소리": "",
# "친구 2": "",
# "식객": "",
# "26년": "",
# "고지전": "",
# "워낭소리": "",
# "프리즌": "",
# "가장 보통의 연애": "",
# "말모이": "",
# "극비수사": "",
# "표적": "",
# "너의 결혼식": "",
# "내가 살인범이다": "",
# "부당거래": "",
# "소원": "",
# "너는 내 운명": "",
# "시라노; 연애조작단": "",
# "곤지암": "",
# "살인자의 기억법": "",
# "마파도": "",
# "후궁 : 제왕의 첩": "",
# "탐정 : 더 비기닝": "",
# "지금 만나러 갑니다": "",
# "가문의 부활 - 가문의 영광3": "",
# "위험한 상견례": "",
# "아수라": "",
# "보안관": "",
# "기술자들": "",
# "굿모닝 프레지던트": "",
# "태극기 휘날리며": "",
# "라스트 갓파더": "",
# "1번가의 기적": "",
# "증인": "",
# "목격자": "",
# "조작된 도시": "",
# "블랙머니": "",
# "반창꼬": "",
# "우리들의 행복한 시간": "",
# "조선명탐정: 흡혈괴마의 비밀": "",
# "화차": "",
# "이웃사람": "",
# "재심": "",
# "히트맨": "",
# "사바하": "",
# "화이: 괴물을 삼킨 아이": "",
# "의뢰인": "",
# "가문의 영광4 - 가문의 수난": "",
# "블라인드": "",
# "박열": "",
# "미인도": "",
# "음란서생": "",
# "내 생애 가장 아름다운 일주일": "",
# "하녀": "",
# "황해": "",
# "7광구": "",
# "타짜: 원 아이드 잭": "",
# "박쥐": "",
# "마당을 나온 암탉": "",
# "악의 연대기": "",
# "강남 1970": "",
# "신의 한 수: 귀수편": "",
# "마이 웨이": "",
# "나의 사랑 나의 신부": "",
# "바르게 살자": "",
# "내 사랑 내 곁에": "",
# "초능력자": "",
# "굿바이 싱글": "",
# "몽타주": "",
# "명당": "",
}
g = Graph()
names = []
vertex_weight = []
vertex_color = []
edge_weight = []
for movie in data:
g.add_vertices(1)
names.append(movie)
vertex_color.append("red")
actors = data[movie].split(",")
newActors = []
for actor in actors:
if(actor not in names):
newActors.append(actor)
names += newActors
g.add_vertices(len(newActors))
vertex_color += ["blue"] * len(newActors)
edges = []
s = names.index(movie)
for actor in actors:
e = names.index(actor)
edges.append((s, e))
g.add_edges(edges)
vertex_weight.append(audience[movie])
vertex_weight += [1] * len(newActors)
edge_weight += [audience[movie]] * len(actors)
g.vs["name"] = names
g.vs["label"] = g.vs["name"]
g.vs["color"] = vertex_color
g.es["weight"] = edge_weight
bn = g.betweenness(weights=edge_weight)
names1, names2 = g.vs["name"][:], g.vs["name"][:]
print(sorted(names1, key=lambda n: bn[names2.index(n)], reverse=True)[:10])
print(sorted(bn, reverse=True)[:10])
bn_norm = [int((float(i)/max(bn)) * 40) + 10 for i in bn]
out = plot(g,
bbox = (1600, 1600),
vertex_size = 20,
vertex_label_size = 12,
vertex_label_dist = 1,
vertex_label_angle = 2,
autocurve = True,
layout = g.layout("fr")
)
out.save("test.png")
......@@ -5,9 +5,14 @@ conn = pymongo.MongoClient("localhost")
db = conn.test
MOVIE = db.movie
cur = MOVIE.find()
audience = {}
audiences = {}
salesPerScreens = []
for c in cur:
audience[c["name"]] = c["audience"]
audiences[c["name"]] = c["audiences"]
salesPerScreens.append({"name": c["name"], "value": c["sales"] / c["screens"]})
salesPerScreensTmp = salesPerScreens[:]
salesPerScreensSorted = sorted(salesPerScreensTmp, key=lambda n: salesPerScreens[salesPerScreens.index(n)]["value"], reverse=True)[:100]
data = {
"명량": "최민식,류승룡,조진웅,김명곤,진구,이정현,권율,노민우,이승준,박보검,김원해,이해영,장준녕,김길동,김강일,강태영,박노식,최덕문,조복래,문영동,이주실,주석태,고경표,김태훈,한이진,최창균,신창수,김현태,정재우,김구택,이재구,조하석",
......@@ -36,6 +41,7 @@ data = {
"백두산": "이병헌,하정우,마동석,전혜진,배수지,이상원,옥자연,한수현,강신철,이경영,조한철,최광일,김시아,임형국,박주환,남성준,서현우,김민식,박지홍,김준원,남문철,박성근",
"과속스캔들": "차태현,박보영,왕석현,임지규,황우슬혜,임승대,정원중,김기방,박영서",
"국가대표": "하정우,성동일,김지석,김동욱,최재환,이재응,이은성,이한위,이혜숙,김지영,현쥬니,황하나",
#"디워": "", #외국 배우
"공조": "현빈,유해진,김주혁,장영남,이해영,윤아,이동휘,공정환,엄효섭,신현빈,박민하,전국환,이이경,박진우,박형수",
"히말라야": "황정민,정우,조성하,김인권,라미란,김원해,이해영,전배수,정규수,성병숙",
"밀정": "송강호,공유,한지민,엄태구,신성록,허성태,서영주,정유안,이수광,고준,최유화,김동영,곽자형,조영규,이설구,권수현,이환,유상재,한수연,남문철,김수웅,최장원,허형규,백인권,정도원,신성일,김의건",
......@@ -79,7 +85,7 @@ data = {
"추격자": "김윤석,하정우,서영희,박효주,김유정,최정우,정인기,구본웅,민경진",
"공작": "황정민,이성민,조진웅,주지훈,김홍파,정소리,기주봉,김응수,채용,박진영,남문철,최병모,김인우,정기섭,이승준,양현민,허승,엄지만,백승익,권범택,최정인,김소진,박혜영,김지나,곽자형,조주희",
"바람과 함께 사라지다": "차태현,오지호,민효린,성동일,신정근,고창석,송종호,이채영,김길동,김향기,천보근,김구택,독고준",
# "님아, 그 강을 건너지 마오": "", #영화배우가 아님
#"님아, 그 강을 건너지 마오": "", #영화배우가 아님
"봉오동 전투": "유해진,류준열,조우진,박지환,최유화,성유빈,이재인,홍상표,원풍연,양현민",
"조선명탐정 : 각시투구꽃의 비밀": "김명민,한지민,오달수,최무성,우현,이재용,예수정,정인기",
"군도: 민란의 시대": "하정우,강동원,조진웅,마동석,정만식,김성균,주진모,이경영,이성민,윤지혜,김재영,송영창,김병옥,임현성,강현중",
......@@ -145,7 +151,7 @@ data = {
# "식객": "",
# "26년": "",
# "고지전": "",
# "워낭소리": "",
"워낭소리": "",
# "프리즌": "",
# "가장 보통의 연애": "",
# "말모이": "",
......@@ -155,11 +161,11 @@ data = {
# "내가 살인범이다": "",
# "부당거래": "",
# "소원": "",
# "너는 내 운명": "",
"너는 내 운명": "",
# "시라노; 연애조작단": "",
# "곤지암": "",
# "살인자의 기억법": "",
# "마파도": "",
"마파도": "이정진,이문식,여운계,김수미,김을동,김형자,길해연,오달수,서영희",
# "후궁 : 제왕의 첩": "",
# "탐정 : 더 비기닝": "",
# "지금 만나러 갑니다": "",
......@@ -169,7 +175,7 @@ data = {
# "보안관": "",
# "기술자들": "",
# "굿모닝 프레지던트": "",
# "태극기 휘날리며": "",
"태극기 휘날리며": "장동건,원빈,이은주,공형진,장민호,이영란",
# "라스트 갓파더": "",
# "1번가의 기적": "",
# "증인": "",
......@@ -232,6 +238,10 @@ def named_union(graph1, graph2): #두 그래프 합성
Z.vs["label"] = Z.vs["name"][:]
return Z
for i in range(0, 100):
if(salesPerScreensSorted[i]["name"] not in data):
print(i, salesPerScreensSorted[i])
frequency = {}
weight = {}
keys = []
......@@ -263,12 +273,12 @@ for movie in data:
join = join[0]+","+join[1]
if(join not in weight):
weight[join] = {
"audience": audience[movie],
"audiences": audiences[movie],
"count": 1
}
keys.append(join)
else:
weight[join]["audience"] += audience[movie]
weight[join]["audiences"] += audiences[movie]
weight[join]["count"] += 1
topten = sorted(keys, key=lambda n: weight[n]["count"], reverse=True)[:10]
......
......@@ -6,9 +6,12 @@ db = conn.test
MOVIE = db.movie
MOVIE.delete_many({}) #reset
csvfile = open('kobis2.csv', mode='r')
csvfile = open('C:\\Users\\ghdms\\2014104137\\소스코드\\kobis1.csv', mode='r')
reader = list(csv.reader(csvfile))
for row in reader:
num = int(row[1].replace(",", ""))
print(num)
MOVIE.insert_one({"name": row[0], "audience": num})
name = row[1]
for i in range(2, 6):
row[i] = row[i].replace(",", "")
sales, audiences, screens, plays = int(row[2]), int(row[3]), int(row[4]), int(row[5])
print(name, sales, audiences, screens, plays)
MOVIE.insert_one({"name": name, "sales": sales, "audiences": audiences, "screens": screens, "plays": plays})
\ No newline at end of file
......