SlideShare a Scribd company logo
1 of 32
국회의원 법안 검색 시스템
김광호 1701575, 팀장 김** 1******
Ore
국회의원 인적사항 역대 국회의원 인적사항
국회의원 발의법률안 본회의 표결정보
어떤 데이터를
사용할 것인가
목표 – 웹 페이지 시각화
감염병의 예방 및 관리에 관한 법률 일부개정법률안
공동발의자
키워드
홍길동
의원 정보
전체 법안 주요 키워드
대표발의자
홍길동
김철수, 김**, 김광호, 노진구
<POLY-NM>활빈당</POLY-NM>
<ELECT_GBN_NM>지역구</ELECT_GBN_NM>
<TEL_NO>010-1111-2222</TEL_NO>
<SEX_GBN_NM>남</SEX_GBN_NM>
표결
해당 의원이 발의한 법안
의 키워드 빈도를 표시
최종 결과
WordCloud를 이용한 시각화
PieChart를 이용한 시각화
표결 데이터
국회의원 인적사항
역대 국회의원 인적사항
발의 법안 데이터
원시 데이터
정규화
함수 종속 Diagram – 법안 Relation
함수 종속 Diagram – 국회의원 Relation
함수 종속 Diagram – 표결 Relation
함수 종속 Diagram – 공동 발의 Relation
함수 종속 Diagram – 당선 대수 Relation
함수 종속 Diagram – 형태소 분석 결과 Relation
함수 종속 Diagram – 결정자를 PK로
표결 테이블 공동발의 테이블 형태소 분석 결과 테이블
DB 재설계 - 기존
법안의 대표 발의자를 가져올 때, 법안 릴레이션의 법안ID를 이용해 발의 릴레이션에서
selection 연산을 수행해야 하고, 대표발의_여부가 TRUE인 tuple을 selection해야 한다.
DB 재설계 - 변경
반면, 법안 릴레이션에 대표 발의자 ID를 추가한다면 연산 횟수를 줄일 수 있어 효율적이다.
IE 표기법
동명이인 쿼리문
SELECT *
FROM member_of_congress
WHERE HANGUL_NAME IN (
SELECT HANGUL_NAME
FROM member_of_congress
GROUP BY HANGUL_NAME
HAVING COUNT(*) >= 2
)
국회의원 정보를 미리 INSERT 한 뒤,
동명이인 유무를 확인하기 위해 다음의
Query문 사용
법안 개요 텍스트 22개 null 메우기
비어있음
법안 개요 텍스트 22개 null 메우기
개요 텍스트 없음
법안 개요 텍스트 22개 null 메우기
PDF에서 가져옴
DB Insert 문제
def insert(cur, datas):
try:
cur.executemany(""“
INSERT INTO congress.bill(
BILL_ID,
BILL_NAME,
MAIN_PROPOSER,
PROC_RESULT, AGE, PROPOSED_DATE) VALUES(?, ?, (
SELECT MONA_CD
FROM congress.member_of_congress
WHERE HANGUL_NAME = ?
), ?, ?, ?)""", datas)
except mariadb.IntegrityError e:
print(e) as
executemany로 INSERT했지만 같은 값이 여러 번 들어가 실패
DB Insert 문제
Query문 동적 생성
DB Insert 문제
10000 개씩 INSERT
시각화
시각화 – SQL Query
SELECT BILL_NAME, bill.BILL_ID
FROM bill, bill_morpheme
WHERE bill.BILL_ID = bill_morpheme.BILL_ID AND NNP = ?
ORDER BY FREQUENCY DESC;
키워드가 포함된 법안 목록을 빈도 수로 내림차순 정렬해 표시
시각화 – SQL Query
법안 데이터와 대표 발의자 이름 가져오기
SELECT *, (
SELECT HANGUL_NAME
FROM member_of_congress
WHERE MONA_CD=bill.MAIN_PROPOSER
) AS name
FROM bill
WHERE bill.BILL_ID=?
공동 발의자 이름 목록 가져오기
SELECT (
SELECT HANGUL_NAME
FROM member_of_congress
WHERE MONA_CD = PROPOSER
) AS coname, PROPOSER
FROM proposer
WHERE BILL_ID = ?
시각화 – SQL Query
국회의원 정보 가져오기
SELECT *
FROM member_of_congress
WHERE MONA_CD = ?
대표 발의 법안 목록 가져오기
SELECT BILL_NAME, BILL_ID
FROM bill
WHERE MAIN_PROPOSER = ?
역할 분담
• 국회의원 INSERT
• 법안 INSERT
• 형태소 분석 데이터 INSERT
• 법안 공동 발의자 INSERT
• DB 물리 모델링
김**
• 표결 정보 INSERT
• 국회의원 당선 대수 INSERT
• GUI 제작
• 데이터 시각화를 위한 SQL Queries
김**
• 개념 모델링
• IE 모델링
• 함수 종속 Diagram
공동 진행
진행 일정
1주차 팀 결성 및 주제 선정
2주차 주제 선정
3주차 주제 선정 및 계획서 작성
4주차 개념 모델링
5주차 물리 모델링
6주차 중간고사 준비
7주차 중간고사
8주차 DB제작
9주차 중간 발표
10주차 DB 재설계 GUI제작 & IE모델링 정규화
11주차 검토
12주차 검토
13주차 프로젝트 발표자료 준비 및 검토
14주차 프로젝트 발표
참고 문헌 및 사이트
• 국회의원 인적사항
• https://open.assembly.go.kr/portal/data/service/selectAPIServicePage.do/OWSSC6001134T516707
• 역대 국회의원 인적사항
• https://open.assembly.go.kr/portal/data/service/selectServicePage.do/OBL7NF0011935G18076
• 국회의원 발의법률안
• https://open.assembly.go.kr/portal/data/service/selectServicePage.do/OK7XM1000938DS17215
• 국회의원 본회의 표결정보
• https://open.assembly.go.kr/portal/data/service/selectServicePage.do/OPR1MQ000998LC12535
• Node.js 참고 자료
• https://victorydntmd.tistory.com/
• MariaDB Connector Node.js
• https://github.com/mariadb-corporation/mariadb-connector-nodejs
• Bootstrap · The most popular HTML, CSS, and JS library in the world.
• https://getbootstrap.com/
시연
감사합니다

More Related Content

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

법안 검색 시스템 발표PPT

  • 1. 국회의원 법안 검색 시스템 김광호 1701575, 팀장 김** 1****** Ore
  • 2. 국회의원 인적사항 역대 국회의원 인적사항 국회의원 발의법률안 본회의 표결정보 어떤 데이터를 사용할 것인가
  • 3. 목표 – 웹 페이지 시각화 감염병의 예방 및 관리에 관한 법률 일부개정법률안 공동발의자 키워드 홍길동 의원 정보 전체 법안 주요 키워드 대표발의자 홍길동 김철수, 김**, 김광호, 노진구 <POLY-NM>활빈당</POLY-NM> <ELECT_GBN_NM>지역구</ELECT_GBN_NM> <TEL_NO>010-1111-2222</TEL_NO> <SEX_GBN_NM>남</SEX_GBN_NM> 표결 해당 의원이 발의한 법안 의 키워드 빈도를 표시
  • 4. 최종 결과 WordCloud를 이용한 시각화 PieChart를 이용한 시각화
  • 5. 표결 데이터 국회의원 인적사항 역대 국회의원 인적사항 발의 법안 데이터 원시 데이터
  • 7. 함수 종속 Diagram – 법안 Relation
  • 8. 함수 종속 Diagram – 국회의원 Relation
  • 9. 함수 종속 Diagram – 표결 Relation
  • 10. 함수 종속 Diagram – 공동 발의 Relation
  • 11. 함수 종속 Diagram – 당선 대수 Relation
  • 12. 함수 종속 Diagram – 형태소 분석 결과 Relation
  • 13. 함수 종속 Diagram – 결정자를 PK로 표결 테이블 공동발의 테이블 형태소 분석 결과 테이블
  • 14. DB 재설계 - 기존 법안의 대표 발의자를 가져올 때, 법안 릴레이션의 법안ID를 이용해 발의 릴레이션에서 selection 연산을 수행해야 하고, 대표발의_여부가 TRUE인 tuple을 selection해야 한다.
  • 15. DB 재설계 - 변경 반면, 법안 릴레이션에 대표 발의자 ID를 추가한다면 연산 횟수를 줄일 수 있어 효율적이다.
  • 17. 동명이인 쿼리문 SELECT * FROM member_of_congress WHERE HANGUL_NAME IN ( SELECT HANGUL_NAME FROM member_of_congress GROUP BY HANGUL_NAME HAVING COUNT(*) >= 2 ) 국회의원 정보를 미리 INSERT 한 뒤, 동명이인 유무를 확인하기 위해 다음의 Query문 사용
  • 18. 법안 개요 텍스트 22개 null 메우기 비어있음
  • 19. 법안 개요 텍스트 22개 null 메우기 개요 텍스트 없음
  • 20. 법안 개요 텍스트 22개 null 메우기 PDF에서 가져옴
  • 21. DB Insert 문제 def insert(cur, datas): try: cur.executemany(""“ INSERT INTO congress.bill( BILL_ID, BILL_NAME, MAIN_PROPOSER, PROC_RESULT, AGE, PROPOSED_DATE) VALUES(?, ?, ( SELECT MONA_CD FROM congress.member_of_congress WHERE HANGUL_NAME = ? ), ?, ?, ?)""", datas) except mariadb.IntegrityError e: print(e) as executemany로 INSERT했지만 같은 값이 여러 번 들어가 실패
  • 22. DB Insert 문제 Query문 동적 생성
  • 23. DB Insert 문제 10000 개씩 INSERT
  • 25. 시각화 – SQL Query SELECT BILL_NAME, bill.BILL_ID FROM bill, bill_morpheme WHERE bill.BILL_ID = bill_morpheme.BILL_ID AND NNP = ? ORDER BY FREQUENCY DESC; 키워드가 포함된 법안 목록을 빈도 수로 내림차순 정렬해 표시
  • 26. 시각화 – SQL Query 법안 데이터와 대표 발의자 이름 가져오기 SELECT *, ( SELECT HANGUL_NAME FROM member_of_congress WHERE MONA_CD=bill.MAIN_PROPOSER ) AS name FROM bill WHERE bill.BILL_ID=? 공동 발의자 이름 목록 가져오기 SELECT ( SELECT HANGUL_NAME FROM member_of_congress WHERE MONA_CD = PROPOSER ) AS coname, PROPOSER FROM proposer WHERE BILL_ID = ?
  • 27. 시각화 – SQL Query 국회의원 정보 가져오기 SELECT * FROM member_of_congress WHERE MONA_CD = ? 대표 발의 법안 목록 가져오기 SELECT BILL_NAME, BILL_ID FROM bill WHERE MAIN_PROPOSER = ?
  • 28. 역할 분담 • 국회의원 INSERT • 법안 INSERT • 형태소 분석 데이터 INSERT • 법안 공동 발의자 INSERT • DB 물리 모델링 김** • 표결 정보 INSERT • 국회의원 당선 대수 INSERT • GUI 제작 • 데이터 시각화를 위한 SQL Queries 김** • 개념 모델링 • IE 모델링 • 함수 종속 Diagram 공동 진행
  • 29. 진행 일정 1주차 팀 결성 및 주제 선정 2주차 주제 선정 3주차 주제 선정 및 계획서 작성 4주차 개념 모델링 5주차 물리 모델링 6주차 중간고사 준비 7주차 중간고사 8주차 DB제작 9주차 중간 발표 10주차 DB 재설계 GUI제작 & IE모델링 정규화 11주차 검토 12주차 검토 13주차 프로젝트 발표자료 준비 및 검토 14주차 프로젝트 발표
  • 30. 참고 문헌 및 사이트 • 국회의원 인적사항 • https://open.assembly.go.kr/portal/data/service/selectAPIServicePage.do/OWSSC6001134T516707 • 역대 국회의원 인적사항 • https://open.assembly.go.kr/portal/data/service/selectServicePage.do/OBL7NF0011935G18076 • 국회의원 발의법률안 • https://open.assembly.go.kr/portal/data/service/selectServicePage.do/OK7XM1000938DS17215 • 국회의원 본회의 표결정보 • https://open.assembly.go.kr/portal/data/service/selectServicePage.do/OPR1MQ000998LC12535 • Node.js 참고 자료 • https://victorydntmd.tistory.com/ • MariaDB Connector Node.js • https://github.com/mariadb-corporation/mariadb-connector-nodejs • Bootstrap · The most popular HTML, CSS, and JS library in the world. • https://getbootstrap.com/

Editor's Notes

  1. 안녕하세요. 국회의원 법안 검색 시스템 프로젝트를 발표할 김준석입니다. 먼저 저희 팀은 Ore로 김광호 학생, 저는 팀장 김준석입니다. 그럼 시작하겠습니다.
  2. 저희는 본회의 표결정보를 추가로 수집할 계획입니다. 표결정보는 어떤 법안에 대해 어떤 의원이 찬성 혹은 반대를 했는지를 의미하는 데이터입니다.
  3. 저희는 본회의 표결정보를 추가로 수집할 계획입니다. 표결정보는 어떤 법안에 대해 어떤 의원이 찬성 혹은 반대를 했는지를 의미하는 데이터입니다.
  4. DB에 넣고 보니
  5. 지금까지 발표를 들어 주셔서 감사합니다.
  6. 지금까지 발표를 들어 주셔서 감사합니다.
  7. 지금까지 발표를 들어 주셔서 감사합니다.
  8. 지금까지 발표를 들어 주셔서 감사합니다.
  9. 저희는 개념 모델링과 물리 모델링, 그리고 GUI 제작은 팀원 모두가 함께 진행하고, 데이터베이스 1, 2 정규화는 제가, 3정규화는 김광호 학생이 진행할 예정입니다.
  10. 진행 일정은 다음과 같습니다.
  11. 참고 문헌은 다음과 같습니다.
  12. 감사합니다.
  13. 지금까지 발표를 들어 주셔서 감사합니다.