SlideShare ist ein Scribd-Unternehmen logo
1 von 44
꿈꾸는 데이터 디자이너
Week4
OpenRefine
OpenRefine
Facebook Group에서
sample_data.zip를
다운로드 받아주세요
OpenRefine
1 OpenRefine for Beginner
•Moving columns around
•Renaming and removing columns
•Using the project history
•Sorting Data
•Transposing rows and columns
OpenRefine
•Moving columns around
•Renaming and removing columns
•Using the project history
•Sorting Data
•Transposing rows and columns
OpenRefine
•Move column to beginning
•Move column to end
•Move column to left
•Move column to right
OpenRefine
•Moving columns
•Move columns to beginning, end, left, right로 구성
•Column의 자리를 교체하기 위한 기능. Drag&Drop으로는 X
OpenRefine
•Moving columns
Function Content
Move column
to beginning
해당 Column을 가장 왼쪽 첫번째 열로 이동
Move column
to end
해당 Column을 가장 오른쪽 마지막 열로 이동
Move column
to left
현재 열의 왼쪽으로 이동
Move column
to right
현재 열의 오른쪽으로 이동
OpenRefine
•Moving columns around
•Renaming and removing columns
•Using the project history
•Sorting Data
•Transposing rows and columns
OpenRefine
•Rename this column
•Remove this column
OpenRefine
•Rename this column
•Edit column - Rename this column
•Column의 이름을 변경하기 위한 기능
OpenRefine
•Rename this column
•원하는 칼럼명을 써주고 ‘확인’
•확인 후, 변경된 것을 확인할 수 있음
OpenRefine
•Remove this column
•Edit column - Remove this column
•해당 Column을 제거하기 위한 기능
OpenRefine
•Remove this column
•해당 column이 제거된 것을 확인
•Undo를 통해 다시 복귀할 수 있음
OpenRefine
•Moving columns around
•Renaming and removing columns
•Using the project history
•Sorting Data
•Transposing rows and columns
OpenRefine
•Using the history project
•작업의 과정을 Undo / Redo를 통해서 확인
•실수한 작업과정을 되살릴 수 있다는 장점을 history로 확인
•해당 과정을 선택하면 돌아가거나 다시 복귀가 가능
OpenRefine
•Using the history project
•Extract Operation History 메뉴
•작업과정을 JSON파일 포맷으로 추출해서 관리 및 향후 사용 가능
•특정한 작업 과정만 선택해서 관리 가능
OpenRefine
•Moving columns around
•Renaming and removing columns
•Using the project history
•Sorting Data
•Transposing rows and columns
OpenRefine
•Sorting Data
•Excel의 필터링 기능과 동일
•Sort cell value as 및 Position blanks and errors 선택 가능
•해당 sorting cell마다 순서배열이 다름
OpenRefine
•Sorting Data
•text, numbers, dates, booleans로 해당 column의 성격 정의
•유효한 값, 오류, 공백 등을 어떤 순서로 나열할 것인지 결정 (Drag & Drop)
•목적에 맞는 sorting 성격을 정의한 후, 확인
OpenRefine
Function Sorting content
text
a - z 알파벳 a부터 정렬
z - a 알파벳 z부터 역정렬
numbers
smallest first 내림차순 정렬
largest first 오름차순 정렬
Dates
earliest first 빠른 날짜 순으로 정렬
latest first 늦은 날짜 순으로 정렬
booleans
false then true 참인 값부터 정렬
true then false 거짓인 값부터 정렬
•Sorting Data
OpenRefine
•Moving columns around
•Renaming and removing columns
•Using the project history
•Sorting Data
•Transposing rows and columns
OpenRefine
•Transposing rows and columns
•row와 column의 순서(배열)를 바꿈
•Transpose cells across columns into rows
•Transpose cells in rows into columns
OpenRefine
•From Column, To Column에서 정리할 Columns 영역 선택
•Key column과 Value column에서 column 변수명 설정
OpenRefine
•Serial Number 부터 birthplace까지의 열이 행으로 변환
•변환된 형식의 key, value값 확인할 수 있음
•birthprovince 이후로는 이젠 데이터 형식과 동일
2 Clean & Manage data
OpenRefine
•Add column based on column
•value.split(“”)[index]
•value.substring(index)
•value + “string”
•value.trim().length()
OpenRefine
•Add column based on column
•value.split(“”)[index]
•value.substring(index)
•value + “string”
•value.trim().length()
OpenRefine
•Add columns based on column
• 현재 column을 기반으로 새로운 column 추가
•완전히 새로운 데이터를 만드는 것이 아니라 기존의 데이터에서 변형하는 것
OpenRefine
•New column name에서 새로운 column 이름 설정
•value[0,4] 입력
•value[index1, index2]는 index1=0부터 4번째 자리까지 추출한다는 의미
•1953-06의 경우 1이 index0부터 시작한다는 것에 유의
OpenRefine
•Only Year라는 새로운 Column이 생성
•년도만 추출된 것을 확인할 수 있음
OpenRefine
•Only Year라는 새로운 Column이 생성
•년도만 추출된 것을 확인할 수 있음
OpenRefine
•Add column based on column
•value.split(“”)[index]
•value.substring(index)
•value + “string”
•value.trim().length()
OpenRefine
•Value.split(“”)[index]
•따음표 사이의 요소로 구분된 해당 index 단락만 추출
•충청북도 보은군 대북면
index0 index1 index2
•Edit cells - Transform
OpenRefine
•Add column based on column
•value.split(“”)[index]
•value.substring(index)
•value + “string”
•value.trim().length()
OpenRefine
•value.substring(“range”)
•앞에서부터 해당 범위만큼 값 날리기
•충청북도 보은군
1
•value.substring(5)는 앞에서부터 5번째 글자까지(공백포함) 날림
•따라서 충청북도+띄어쓰기 삭제
2 3 4 5
•Edit cells - Transform
OpenRefine
•Add column based on column
•value.split(“”)[index]
•value.substring(index)
•value + “string”
•value.trim().length()
OpenRefine
•value + “string”
•앞에서부터 해당 범위만큼 값 날리기
OpenRefine
•Add column based on column
•value.split(“”)[index]
•value.substring(index)
•value + “string”
•value.trim().length()
OpenRefine
•value.trim().length()
•해당 값의 길이 구하기
•나중에 데이터를 가지고 함수값 사용할 때 종종 사용
•띄어쓰기도 포함
OpenRefine
3 Linking Datasets
•Reconciling with Linked Data
OpenRefine
•Reconcile
•http://opencorporates.com/reconcile
•두 가지 value를 조화시키는 것
•Reconcile - Start reconciling
OpenRefine
•linking 하려고 하는 dataset or API 연결
1
2
OpenRefine
•왼쪽 그림과 같이 column이 변화된 것을 확인
OpenRefine
•Westminster 도시와 연관된 모든 정보가 연결
•주소, 가게, 학원 등과 같은 데이터가 연결
OpenRefine

Weitere ähnliche Inhalte

Mehr von neuroassociates

Mehr von neuroassociates (20)

[Week20] D3.js_Mapping
[Week20] D3.js_Mapping[Week20] D3.js_Mapping
[Week20] D3.js_Mapping
 
[week17] D3.js_Tooltip
[week17] D3.js_Tooltip[week17] D3.js_Tooltip
[week17] D3.js_Tooltip
 
[week16] D3.js_Transition
[week16] D3.js_Transition[week16] D3.js_Transition
[week16] D3.js_Transition
 
[week8] 데이터읽어주는남자
[week8] 데이터읽어주는남자[week8] 데이터읽어주는남자
[week8] 데이터읽어주는남자
 
[Week15] D3.js_Scatter_Chart
[Week15] D3.js_Scatter_Chart[Week15] D3.js_Scatter_Chart
[Week15] D3.js_Scatter_Chart
 
[Week14] D3.js_Scale and Axis (보충자료)
[Week14] D3.js_Scale and Axis (보충자료)[Week14] D3.js_Scale and Axis (보충자료)
[Week14] D3.js_Scale and Axis (보충자료)
 
[Week14] D3.js_Scale and Axis
[Week14] D3.js_Scale and Axis[Week14] D3.js_Scale and Axis
[Week14] D3.js_Scale and Axis
 
[Week13] D3.js_Bar Chart
[Week13] D3.js_Bar Chart[Week13] D3.js_Bar Chart
[Week13] D3.js_Bar Chart
 
[Week12] D3.js_Basic2
[Week12] D3.js_Basic2[Week12] D3.js_Basic2
[Week12] D3.js_Basic2
 
[week7] 데이터읽어주는남자
[week7] 데이터읽어주는남자[week7] 데이터읽어주는남자
[week7] 데이터읽어주는남자
 
[week6] 데이터읽어주는남자
[week6] 데이터읽어주는남자[week6] 데이터읽어주는남자
[week6] 데이터읽어주는남자
 
[week12] D3.js_Basic
[week12] D3.js_Basic[week12] D3.js_Basic
[week12] D3.js_Basic
 
[week11] R_ggmap, leaflet
[week11] R_ggmap, leaflet[week11] R_ggmap, leaflet
[week11] R_ggmap, leaflet
 
[week9]R_statics
[week9]R_statics[week9]R_statics
[week9]R_statics
 
[Week8]R_ggplot2
[Week8]R_ggplot2[Week8]R_ggplot2
[Week8]R_ggplot2
 
[week7]R_Wrangling(2)
[week7]R_Wrangling(2)[week7]R_Wrangling(2)
[week7]R_Wrangling(2)
 
[week6]R_Wrangling
[week6]R_Wrangling[week6]R_Wrangling
[week6]R_Wrangling
 
[Week5]데이터읽어주는남자
[Week5]데이터읽어주는남자[Week5]데이터읽어주는남자
[Week5]데이터읽어주는남자
 
[Week5]R_scraping
[Week5]R_scraping[Week5]R_scraping
[Week5]R_scraping
 
[Week4]데이터읽어주는남자
[Week4]데이터읽어주는남자[Week4]데이터읽어주는남자
[Week4]데이터읽어주는남자
 

[week4] Cleaning data with openrefine2