김연우

modify csv files/add read csv

category,x,y,name
소주,37.2484474,127.0786515,남대감
소주,37.2482929,127.0772083,국가대표생고기
소주,37.2520347,127.0756454,곱창가
소주,37.2521347,127.076667,승도리네곱도리탕
소주,37.252615,127.0743758,육회독존
소주,37.2482643,127.0774375,수포차
이자카야,37.2494892,127.0791269,이자카야이틀
이자카야,37.2479601,127.0789043,선영이자카야
이자카야,37.2510131,127.0752194,쿄쿄식당
이자카야,37.2524417,127.0756132,청담이상
이자카야,37.2524416,127.0757205,사라
이자카야,37.2514259,127.0759177,몽
막걸리,37.2524916,127.078913,파전한판
막걸리,37.2534804,127.0769635,전술
막걸리,37.2502342,127.0738999,전과부침개맛있는집
막걸리,37.2522389,127.07653,인생역전
맥주,37.2482952,127.0771754,치킨마루
맥주,37.2520347,127.0756454,꼬꼬아찌
맥주,37.2494453,127.0790406,짠
맥주,37.2492063,127.0783289,순덕이네비어
맥주,37.2512417,127.074719,비어캐빈
맥주,37.2514259,127.0759177,노가리슈퍼
category,x,y,name
감성,37.2429832,127.0749535,카페 서천
감성,37.2494891,127.0789843,하울즈
감성,37.2490524,127.0785731,라이킷
감성,37.2514463,127.0771019,카페 쏘칼로
감성,37.2532119,127.0758202,카인드엉클
감성,37.2524338,127.073904,카페 운트
카공,37.2483107,127.0778776,스위티두
카공,37.2479316,127.0765116,카페 칸나
카공,37.2499818,127.0789709,카페아라
카공,37.2500215,127.0767893,앙코르보아
카공,37.2494746,127.0774245,하추다방
카공,37.2523121,127.0780532,서동진의커피랩
카공,37.2488122,127.0781646,NS커피빈
디저트,37.2482716,127.0755212,화이트스노우
디저트,37.2488175,127.0773439,유멜로우
디저트,37.2496031,127.0778854,전광수커피하우스
디저트,37.2496272,127.0775212,이너프
디저트,37.2495858,127.0793057,고씨커피
No preview for this file type
category,x,y,name
양식,37.2479399,127.0773456,soulP
양식,37.24882,127.0778973,익스프레스 파스타 앤 피자
양식,37.2495852,127.0781529,쏘니스 썬프란시스코 마켓
양식,37.2494033,127.0781698,훌리스 다이너
양식,37.2505475,127.0753716,BLEND
양식,37.2468082,127.0768973,도스마스
양식,37.251797,127.078941,그로또
한식,37.247954,127.0762724,수누리감자탕
한식,37.2491309,127.079413,이모찌마
한식,37.2516354,127.0792135,핏제리아도우
한식,37.2506694,127.07575,장인족발
한식,37.2479229,127.0772427,부대통령
한식,37.2484668,127.0767395,꽃찬찜닭
한식,37.2530818,127.0768128,복희족발
한식,37.252686,127.0779686,대덕골
한식,37.2514259,127.0759177,육회지존
한식,37.2482929,127.0772083,국가대표
한식,37.2498503,127.0799149,청진옥
한식,37.2467707,127.0733652,방울엄마국밥
한식,37.2512338,127.0763348,예감쪽갈비
중식,37.2503893,127.0762224,얜시부
중식,37.2509186,127.0753423,라메이즈 마라탕
중식,37.2494931,127.0741598,짬뽕타임
중식,37.2504425,127.0755364,칭따오양꼬치
중식,37.2527445,127.0759625,탕화쿵푸
중식,37.2510924,127.0749885,팔선생
일식,37.2487574,127.0790157,미미카츠
일식,37.2482967,127.0761075,키와마루아지
일식,37.2484365,127.0759689,겐코
일식,37.2493807,127.0796557,쿠지라
일식,37.248208,127.0794295,부타센세
일식,37.248811,127.0766282,호식당
일식,37.25189,127.0752335,이루카
일식,37.2516576,127.0723896,호랑이초밥
일식,37.2408506,127.0735766,뚱보아저씨
일식,37.2523127,127.0780063,초밥쟁이
일식,37.251627,127.0770495,우재초밥
기타,37.2483826,127.0788856,투고샐러드
기타,37.2514617,127.0793621,포케올데이
기타,37.2504996,127.0760452,교촌치킨
기타,37.2519012,127.0758635,노랑통닭
기타,37.2487948,127.0765056,BHC치킨
기타,37.2527536,127.0734351,청년다방
기타,37.2527536,127.0734351,낭사이공
기타,37.2488561,127.076146,보용만두
기타,37.2514259,127.0759177,꿀꿀이네곱창볶음
기타,37.2514259,127.0759177,미소곱창
No preview for this file type
......@@ -9,6 +9,7 @@
"version": "1.0.0",
"dependencies": {
"@types/selenium-webdriver": "^4.1.0",
"csv-parser": "^3.0.0",
"eslint": "^8.15.0",
"mocha": "^10.0.0",
"selenium-webdriver": "^4.1.2"
......@@ -358,6 +359,20 @@
"node": ">= 8"
}
},
"node_modules/csv-parser": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/csv-parser/-/csv-parser-3.0.0.tgz",
"integrity": "sha512-s6OYSXAK3IdKqYO33y09jhypG/bSDHPuyCme/IdEHfWpLf/jKcpitVFyOC6UemgGk8v7Q5u2XE0vvwmanxhGlQ==",
"dependencies": {
"minimist": "^1.2.0"
},
"bin": {
"csv-parser": "bin/csv-parser"
},
"engines": {
"node": ">= 10"
}
},
"node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
......@@ -1026,6 +1041,11 @@
"node": ">=10"
}
},
"node_modules/minimist": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"node_modules/mocha": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz",
......@@ -1889,6 +1909,14 @@
"which": "^2.0.1"
}
},
"csv-parser": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/csv-parser/-/csv-parser-3.0.0.tgz",
"integrity": "sha512-s6OYSXAK3IdKqYO33y09jhypG/bSDHPuyCme/IdEHfWpLf/jKcpitVFyOC6UemgGk8v7Q5u2XE0vvwmanxhGlQ==",
"requires": {
"minimist": "^1.2.0"
}
},
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
......@@ -2379,6 +2407,11 @@
"brace-expansion": "^2.0.1"
}
},
"minimist": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"mocha": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz",
......
......@@ -14,6 +14,7 @@
"license": "",
"dependencies": {
"@types/selenium-webdriver": "^4.1.0",
"csv-parser": "^3.0.0",
"eslint": "^8.15.0",
"mocha": "^10.0.0",
"selenium-webdriver": "^4.1.2"
......
category,x,y,name
노래방,37.2483107,127.0778776,복면가황코인노래방
노래방,37.2479573,127.0781975,킹노래방
노래방,37.2529038,127.0751144,팝스타코인노래방
노래방,37.2492425,127.0795086,준노래연습장
피시방,37.247951,127.0784298,더쉐프피씨카페
피시방,37.2479573,127.0781975,아이센스리그PC
피시방,37.2468082,127.0768973,케이스타PC
피시방,37.252161,127.0754319,크리드PC방
피시방,37.2529149,127.0752886,1프로PC아레나
기타,37.2526449,127.0744214,골드타임이스케이프
기타,37.2479573,127.0781975,경희당구클럽
기타,37.2527036,127.0716535,메가박스
기타,37.2524416,127.0757205,레드버튼 보드게임카페
기타,37.2512789,127.0747596,타이틀보드게임카페
기타,37.2529149,127.0752886,히어로보드게임카페
No preview for this file type
const csv = require('csv-parser')
const fs = require('fs')
const results = [];
var choice = "놀거리"
//대분류 선택 과정 필요
if(choice == "카페"){
fs.createReadStream('cafe_list.csv')
.pipe(csv())
.on('data', (data) => results.push(data))
.on('end', () => {
console.log(results);
});
}
else if (choice == "식사"){
fs.createReadStream('meal_list.csv')
.pipe(csv())
.on('data', (data) => results.push(data))
.on('end', () => {
console.log(results);
});
}
else if (choice == "놀거리"){
fs.createReadStream('play_list.csv')
.pipe(csv())
.on('data', (data) => results.push(data))
.on('end', () => {
console.log(results);
});
}
else if (choice == "술집"){
fs.createReadStream('bar_list.csv')
.pipe(csv())
.on('data', (data) => results.push(data))
.on('end', () => {
console.log(results);
});
}
\ No newline at end of file