한국은 코로나 바이러스 방역에 잘 대처하는 국가 중 하나이다.
한국은 세계 유일의 분단 국가이다.
한국은 일인당 마늘 섭취량이 가장 많은 국가 중 하나이다.
한국은 세계 유일의 분단 국가이기 때문에 코로나 바이러스 방역에 잘 대처한다.
한국은 일인당 마늘 섭취량이 많기 때문에 코로나 바이러스 방역에 잘 대처한다.
문맹률 (교육 수준)
중앙집권적 권력 관계와 정보 흐름
사회적 자본 (연결망)
What is the impact of an intervention (X) on an outcome (Y)
The treated group and the counterfactual group should have identical characteristics on average, except for benefiting from the intervention -> only reason for different outcomes between treatment and counterfactual is the intervention
Before and After: Effect of treatment and time-varying variables on outcome cannot be separated
Compare participants to non-participants (a poor counterfactual) at the same time
What is the primary source of secondary data?
First-hand data: 댓글, 소셜미디어, 커뮤니티 etc…
Second-hand data: Source of the data on Wikipedia can be retraced?
Cross-validations
Data quality depends on the user’s purposes
Study on hashtags
Representativeness: web data can be biased
Why web data can be of higher quality for the user?
Proxies: Popularity of cellphones
Factual data vs. psychometrics
Your research ideas can be validly addressed by web data? how?
Make sure you know exactly what kind of information you need.
Find out whether there are any data sources on the Web that might provide direct or indirect information on your problem.
Develop a theory of the data generation process when looking into potential sources.
Reliability
Representativeness
Bias
Balance advantages and disadvantages of potential data sources.
Availibility
Costs
Comparability
Authoritativeness
Make a decision.
본인의 연구 관심/주제?
인과관계 추론
연구대상 선택에서의 편향 발생 가능성?
Difficulties of collecting data from the Web
- Complex HTML structures
- Web pages are dynamic
- Information retrieved from plain text
Technologies for disseminating content on the Web
In order to automatically collect data from the Web and process them with R, a basic understanding of HTML and the way it stores information is indispensable.
- eXtensible Markup Language (XML): To store and exchange data over the Web. XML is just data wrapped in user-defined tags. Both HTML and XML-style documents offer natural, often hierarchical, structures for data storage.
- JavaScript Object Notation (JSON): XML and JSON are standards that define containers for plain text data. Twitter distribute information in the JSON format.
- Plain text: unstructured data
- HyperText Transfer Protocol (HTTP): Standard language for communication between web clients (e.g., browsers) and servers
HTTP
Technologies for information extraction from web documents
XPath: Select and extract sepcific pieces of information from marked up documents like HTML/XML
JSON parser: JSON documents are easy to parse using R
Selenium: Allows us to direct commands to a browser window such as mouse clicks or keyboard inputs via R
Regular expressions: Select and extract systematic components of text
Text mining: Information -> Data -> Knowledge
R을 사용하여 웹스크래핑을 할 경우 관련 패키지를 설치하면 데이터 긁어오기, 전처리와 분석은 물론 결과의 시각화 작업을 보다 편리하고 효율적으로 수행할 수 있다.
R은 오픈 소스 소프트웨어로서 웹 스크래핑&크롤링에 특화되어있는 기능들을 잘 활용하는 것이 중요하다.
패키지는 R의 함수들이 목적에 따라 모여있는 집합체를 말한다.
라이브러리는 패키지를 다운로드 받은 장소를 말한다. 저장된 패키지를 R에 설치함으로서 우리는 포함되어 있는 함수들을 활용할 수 있게 된다. 그렇다면, R에서 어떻게 패키지를 다운로드 받고 설치할 수 있을까?
가령, 우리가 데이터를 수집, 분석하기 위해 필요한 함수들이 “stringr”, “RCurl”, “XML”, 그리고 “maps” 라는 패키지에 포함되어 있다고 가정해보자. 패키지들을 다운로드 받기위해서는 다음의 코드를 실행해야 한다.
install.packages("stringr")
install.packages("RCurl")
install.packages("XML")
install.packages("maps")
특히, install.packages
라는 함수 뒤에 괄호가 따라오게 되는데, 이 괄호 안에 패키지의 이름이 입력된다. 주의점: 패키지의 이름은 문자 코드이기 때문에 따옴표를 붙여줘야 한다.
위의 정보를 입력하면 R은 해당 패키지를 CRAN이라는 서버로부터 다운로드 받는다. 하지만 패키지를 다운로드 받았을 뿐, 해당 함수를 실행하기 위해서 패키지를 R 세션에 “로드”해야하는 과정이 필요하다. 이 작업은 library()
라는 함수로 실행한다.
library(stringr)
library(httr)
library(XML)
library(maps)
이러한 과정을 거치게 되면 우리는 오늘 R에서의 웹 스크래핑과 분석 결과의 시각화를 위한 패키지 설치를 완료하게 된다.
텍스트를 분석하기 위해 다운로드 받은 디지털 문서가 저장되어 있는 장소를 알아야 R로 파일을 불러올 수 있다. 이때 필요한 정보가 Working Directory이다. 이 폴더는 R session에서 작업하는 파일들의 주소로서 다음의 함수를 이용하면 알 수 있다.
getwd() # 현재 작업중인 디렉토리 찾기 (입력 및 출력값이 저장되는 장소)
## [1] "D:/Dropbox/2021_Class/BigData_Methodology/R"
Generate some research questions
1,121 heretage sites like the Pyramids in Egypt
Which sites are threatened and where are they located?
Are there regions in the world where sitets are more endangered than in others?
What are the reasons that put a site at risk?
Questions to be considered in data collection
What type of data is most suited to answer your question?
Is the quality of the data sufficiently high to answer your question?
Is the information systematically flowed (biased)?
Find a source of data that can be used to answer the questions
https://en.wikipedia.org/wiki/List_of_World_Heritage_in_Danger
heritage_page <- GET("https://en.wikipedia.org/wiki/List_of_World_Heritage_in_Danger")
heritage_page
## Response [https://en.wikipedia.org/wiki/List_of_World_Heritage_in_Danger]
## Date: 2021-09-16 02:54
## Status: 200
## Content-Type: text/html; charset=UTF-8
## Size: 512 kB
## <!DOCTYPE html>
## <html class="client-nojs" lang="en" dir="ltr">
## <head>
## <meta charset="UTF-8"/>
## <title>List of World Heritage in Danger - Wikipedia</title>
## <script>document.documentElement.className="client-js";RLCONF={"wgBreakFrames...
## ,"Geographic coordinate lists","Articles with Geo","Featured lists","Lists of...
## "wgGENewcomerTasksGuidanceEnabled":!0,"wgGEAskQuestionEnabled":!1,"wgGELinkRe...
## "mmv.bootstrap.autostart","ext.popups","ext.visualEditor.desktopArticleTarget...
## <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.implement("user.option...
## ...
class(heritage_page)
## [1] "response"
heritage_parsed <- htmlParse(heritage_page, encoding = "UTF-8")
class(heritage_parsed)
## [1] "HTMLInternalDocument" "HTMLInternalDocument" "XMLInternalDocument"
## [4] "XMLAbstractDocument"
tables <- readHTMLTable(heritage_parsed, stringsAsFactors = FALSE)
class(tables)
## [1] "list"
length(tables)
## [1] 5
tables[[2]][1:10,]
## V1 V2
## 1 Name Image
## 2 Abu Mena
## 3 Air and Tenere Natural Reserves
## 4 Ancient City of Aleppo
## 5 Ancient City of Bosra
## 6 Ancient City of Damascus
## 7 Ancient Villages of Northern Syria
## 8 Archaeological Site of Cyrene
## 9 Archaeological Site of Leptis Magna
## 10 Archaeological Site of Sabratha
## V3
## 1 Location
## 2 EgyAbusir,<U+00A0>Egypt.mw-parser-output .geo-default,.mw-parser-output .geo-dms,.mw-parser-output .geo-dec{display:inline}.mw-parser-output .geo-nondefault,.mw-parser-output .geo-multi-punct{display:none}.mw-parser-output .longitude,.mw-parser-output .latitude{white-space:nowrap}30°50′30″N 29°39′50″E<U+FEFF> / <U+FEFF>30.84167°N 29.66389°E<U+FEFF> / 30.84167; 29.66389<U+FEFF> (Abu Mena)
## 3 Niger1Arlit Department,<U+00A0>Niger18°17′N 8°0′E<U+FEFF> / <U+FEFF>18.283°N 8.000°E<U+FEFF> / 18.283; 8.000<U+FEFF> (Air and Tenere Natural Reserves)
## 4 Aleppo Governorate, <U+00A0>Syria36°14′N 37°10′E<U+FEFF> / <U+FEFF>36.233°N 37.167°E<U+FEFF> / 36.233; 37.167<U+FEFF> (Ancient City of Aleppo)
## 5 Daraa Governorate, <U+00A0>Syria32°31′5″N 36°28′54″E<U+FEFF> / <U+FEFF>32.51806°N 36.48167°E<U+FEFF> / 32.51806; 36.48167<U+FEFF> (Ancient City of Bosra)
## 6 Damascus Governorate, <U+00A0>Syria33°30′41″N 36°18′23″E<U+FEFF> / <U+FEFF>33.51139°N 36.30639°E<U+FEFF> / 33.51139; 36.30639<U+FEFF> (Ancient City of Damascus)
## 7 <U+00A0>Syria36°20′3″N 36°50′39″E<U+FEFF> / <U+FEFF>36.33417°N 36.84417°E<U+FEFF> / 36.33417; 36.84417<U+FEFF> (Ancient Villages of Northern Syria)
## 8 LibJebel Akhdar,<U+00A0>Libya32°49′30″N 21°51′30″E<U+FEFF> / <U+FEFF>32.82500°N 21.85833°E<U+FEFF> / 32.82500; 21.85833<U+FEFF> (Archaeological Site of Cyrene)
## 9 LibKhoms,<U+00A0>Libya32°38′18″N 14°17′35″E<U+FEFF> / <U+FEFF>32.63833°N 14.29306°E<U+FEFF> / 32.63833; 14.29306<U+FEFF> (Archaeological Site of Leptis Magna)
## 10 LibSabratha,<U+00A0>Libya32°48′19″N 12°29′6″E<U+FEFF> / <U+FEFF>32.80528°N 12.48500°E<U+FEFF> / 32.80528; 12.48500<U+FEFF> (Archaeological Site of Sabratha)
## V4 V5 V6 V7
## 1 Criteria Areaha (acre) Year (WHS) Endangered
## 2 Cultural:(iv) 182 (450) 1979 2001<U+2013>
## 3 Natural:(vii), (ix), (x) 7,736,000 (19,120,000) 1991 1992<U+2013>
## 4 Cultural:(iii)(iv) 350 (860) 1986 2013<U+2013>
## 5 Cultural:(i)(iii)(vi) <U+2014> 1980 2013<U+2013>
## 6 Cultural:(i)(ii)(iii)(iv)(vi) 86 (210) 1979 2013<U+2013>
## 7 Cultural:(iii)(iv)(v) 12,290 (30,400) 2011 2013<U+2013>
## 8 Cultural:(ii), (iii), (vi) <U+2014> 1982 2016<U+2013>
## 9 Cultural:(i), (ii), (iii) <U+2014> 1982 2016<U+2013>
## 10 Cultural:(iii) <U+2014> 1982 2016<U+2013>
## V8
## 1 Reason
## 2 Cave-ins in the area caused by the clay at the surface, which becomes semi-liquid when met with "excess water"
## 3 Military conflict and civil disturbance in the region as well as a reduction of wildlife population and degradation of the vegetation cover
## 4 Syrian Civil War, currently held by the government. Bombings continue threatening the site.
## 5 Syrian Civil War, held by the government.
## 6 Syrian Civil War, rebel gunfire and mortar shelling, mainly from adjacent Jobar suburb endangers foundations.
## 7 Syrian Civil War, some held by rebels. Reports of looting and demolitions by Islamist groups.
## 8 Libyan Civil War, presence of armed groups, already incurred and potential further damage.
## 9 Libyan Civil War, presence of armed groups, already incurred and potential further damage.
## 10 Libyan Civil War, presence of armed groups, already incurred and potential further damage.
## V9
## 1 Refs
## 2 [17][18][19]
## 3 [20][21]
## 4 [22]
## 5 [23]
## 6 [24]
## 7 [25]
## 8 [26][27]
## 9 [27][28]
## 10 [27][29]
danger_table <- tables[[2]]
class(danger_table)
## [1] "data.frame"
danger_table[1:10,]
## V1 V2
## 1 Name Image
## 2 Abu Mena
## 3 Air and Tenere Natural Reserves
## 4 Ancient City of Aleppo
## 5 Ancient City of Bosra
## 6 Ancient City of Damascus
## 7 Ancient Villages of Northern Syria
## 8 Archaeological Site of Cyrene
## 9 Archaeological Site of Leptis Magna
## 10 Archaeological Site of Sabratha
## V3
## 1 Location
## 2 EgyAbusir,<U+00A0>Egypt.mw-parser-output .geo-default,.mw-parser-output .geo-dms,.mw-parser-output .geo-dec{display:inline}.mw-parser-output .geo-nondefault,.mw-parser-output .geo-multi-punct{display:none}.mw-parser-output .longitude,.mw-parser-output .latitude{white-space:nowrap}30°50′30″N 29°39′50″E<U+FEFF> / <U+FEFF>30.84167°N 29.66389°E<U+FEFF> / 30.84167; 29.66389<U+FEFF> (Abu Mena)
## 3 Niger1Arlit Department,<U+00A0>Niger18°17′N 8°0′E<U+FEFF> / <U+FEFF>18.283°N 8.000°E<U+FEFF> / 18.283; 8.000<U+FEFF> (Air and Tenere Natural Reserves)
## 4 Aleppo Governorate, <U+00A0>Syria36°14′N 37°10′E<U+FEFF> / <U+FEFF>36.233°N 37.167°E<U+FEFF> / 36.233; 37.167<U+FEFF> (Ancient City of Aleppo)
## 5 Daraa Governorate, <U+00A0>Syria32°31′5″N 36°28′54″E<U+FEFF> / <U+FEFF>32.51806°N 36.48167°E<U+FEFF> / 32.51806; 36.48167<U+FEFF> (Ancient City of Bosra)
## 6 Damascus Governorate, <U+00A0>Syria33°30′41″N 36°18′23″E<U+FEFF> / <U+FEFF>33.51139°N 36.30639°E<U+FEFF> / 33.51139; 36.30639<U+FEFF> (Ancient City of Damascus)
## 7 <U+00A0>Syria36°20′3″N 36°50′39″E<U+FEFF> / <U+FEFF>36.33417°N 36.84417°E<U+FEFF> / 36.33417; 36.84417<U+FEFF> (Ancient Villages of Northern Syria)
## 8 LibJebel Akhdar,<U+00A0>Libya32°49′30″N 21°51′30″E<U+FEFF> / <U+FEFF>32.82500°N 21.85833°E<U+FEFF> / 32.82500; 21.85833<U+FEFF> (Archaeological Site of Cyrene)
## 9 LibKhoms,<U+00A0>Libya32°38′18″N 14°17′35″E<U+FEFF> / <U+FEFF>32.63833°N 14.29306°E<U+FEFF> / 32.63833; 14.29306<U+FEFF> (Archaeological Site of Leptis Magna)
## 10 LibSabratha,<U+00A0>Libya32°48′19″N 12°29′6″E<U+FEFF> / <U+FEFF>32.80528°N 12.48500°E<U+FEFF> / 32.80528; 12.48500<U+FEFF> (Archaeological Site of Sabratha)
## V4 V5 V6 V7
## 1 Criteria Areaha (acre) Year (WHS) Endangered
## 2 Cultural:(iv) 182 (450) 1979 2001<U+2013>
## 3 Natural:(vii), (ix), (x) 7,736,000 (19,120,000) 1991 1992<U+2013>
## 4 Cultural:(iii)(iv) 350 (860) 1986 2013<U+2013>
## 5 Cultural:(i)(iii)(vi) <U+2014> 1980 2013<U+2013>
## 6 Cultural:(i)(ii)(iii)(iv)(vi) 86 (210) 1979 2013<U+2013>
## 7 Cultural:(iii)(iv)(v) 12,290 (30,400) 2011 2013<U+2013>
## 8 Cultural:(ii), (iii), (vi) <U+2014> 1982 2016<U+2013>
## 9 Cultural:(i), (ii), (iii) <U+2014> 1982 2016<U+2013>
## 10 Cultural:(iii) <U+2014> 1982 2016<U+2013>
## V8
## 1 Reason
## 2 Cave-ins in the area caused by the clay at the surface, which becomes semi-liquid when met with "excess water"
## 3 Military conflict and civil disturbance in the region as well as a reduction of wildlife population and degradation of the vegetation cover
## 4 Syrian Civil War, currently held by the government. Bombings continue threatening the site.
## 5 Syrian Civil War, held by the government.
## 6 Syrian Civil War, rebel gunfire and mortar shelling, mainly from adjacent Jobar suburb endangers foundations.
## 7 Syrian Civil War, some held by rebels. Reports of looting and demolitions by Islamist groups.
## 8 Libyan Civil War, presence of armed groups, already incurred and potential further damage.
## 9 Libyan Civil War, presence of armed groups, already incurred and potential further damage.
## 10 Libyan Civil War, presence of armed groups, already incurred and potential further damage.
## V9
## 1 Refs
## 2 [17][18][19]
## 3 [20][21]
## 4 [22]
## 5 [23]
## 6 [24]
## 7 [25]
## 8 [26][27]
## 9 [27][28]
## 10 [27][29]
names(danger_table)
## [1] "V1" "V2" "V3" "V4" "V5" "V6" "V7" "V8" "V9"
danger_table <- danger_table[-1, c(1,3,4,6,7)]
danger_table
## V1
## 2 Abu Mena
## 3 Air and Tenere Natural Reserves
## 4 Ancient City of Aleppo
## 5 Ancient City of Bosra
## 6 Ancient City of Damascus
## 7 Ancient Villages of Northern Syria
## 8 Archaeological Site of Cyrene
## 9 Archaeological Site of Leptis Magna
## 10 Archaeological Site of Sabratha
## 11 Ashur (Qal'at Sherqat)
## 12 Chan Chan Archaeological Zone
## 13 City of Potosi
## 14 Coro and its Port
## 15 Crac des Chevaliers and Qal’at Salah El-Din
## 16 Cultural Landscape and Archaeological Remains of the Bamiyan Valley
## 17 East Rennell
## 18 Everglades National Park
## 19 Fortifications on the Caribbean Side of Panama: Portobelo-San Lorenzo
## 20 Garamba National Park
## 21 Hatra
## 22 Hebron/Al-Khalil Old Town
## 23 Historic Centre of Shakhrisyabz
## 24 Historic Centre of Vienna
## 25 Historic Town of Zab<U+012B>d
## 26 Islands and Protected Areas of the Gulf of California
## 27 Kahuzi-Biega National Park
## 28 Lake Turkana National Parks
## 29 Manovo-Gounda St Floris National Park
## 30 Minaret and Archaeological Remains of Jam
## 31 Medieval Monuments in Kosovo
## 32 Mount Nimba Strict Nature Reserve
## 33 Nan Madol: Ceremonial Centre of Eastern Micronesia
## 34 Niokolo-Koba National Park
## 35 Okapi Wildlife Reserve
## 36 Old City of Jerusalem and its Walls
## 37 Old City of Sana'a
## 38 Old Town of Ghadames
## 39 Old Towns of Djenne
## 40 Palestine: Land of Olives and Vines <U+2013> Cultural Landscape of Southern Jerusalem, Battir
## 41 Old Walled City of Shibam
## 42 Rainforests of the Atsinanana
## 43 Rio Platano Biosphere Reserve
## 44 Rock-Art Sites of Tadrart Acacus
## 45 Samarra Archaeological City
## 46 Selous Game Reserve
## 47 Site of Palmyra
## 48 Timbuktu
## 49 Tomb of Askia
## 50 Tombs of Buganda Kings at Kasubi
## 51 Tropical Rainforest Heritage of Sumatra
## 52 Virunga National Park
## 53 Ro<U+0219>ia Montan<U+0103> Mining Landscape
## V3
## 2 EgyAbusir,<U+00A0>Egypt.mw-parser-output .geo-default,.mw-parser-output .geo-dms,.mw-parser-output .geo-dec{display:inline}.mw-parser-output .geo-nondefault,.mw-parser-output .geo-multi-punct{display:none}.mw-parser-output .longitude,.mw-parser-output .latitude{white-space:nowrap}30°50′30″N 29°39′50″E<U+FEFF> / <U+FEFF>30.84167°N 29.66389°E<U+FEFF> / 30.84167; 29.66389<U+FEFF> (Abu Mena)
## 3 Niger1Arlit Department,<U+00A0>Niger18°17′N 8°0′E<U+FEFF> / <U+FEFF>18.283°N 8.000°E<U+FEFF> / 18.283; 8.000<U+FEFF> (Air and Tenere Natural Reserves)
## 4 Aleppo Governorate, <U+00A0>Syria36°14′N 37°10′E<U+FEFF> / <U+FEFF>36.233°N 37.167°E<U+FEFF> / 36.233; 37.167<U+FEFF> (Ancient City of Aleppo)
## 5 Daraa Governorate, <U+00A0>Syria32°31′5″N 36°28′54″E<U+FEFF> / <U+FEFF>32.51806°N 36.48167°E<U+FEFF> / 32.51806; 36.48167<U+FEFF> (Ancient City of Bosra)
## 6 Damascus Governorate, <U+00A0>Syria33°30′41″N 36°18′23″E<U+FEFF> / <U+FEFF>33.51139°N 36.30639°E<U+FEFF> / 33.51139; 36.30639<U+FEFF> (Ancient City of Damascus)
## 7 <U+00A0>Syria36°20′3″N 36°50′39″E<U+FEFF> / <U+FEFF>36.33417°N 36.84417°E<U+FEFF> / 36.33417; 36.84417<U+FEFF> (Ancient Villages of Northern Syria)
## 8 LibJebel Akhdar,<U+00A0>Libya32°49′30″N 21°51′30″E<U+FEFF> / <U+FEFF>32.82500°N 21.85833°E<U+FEFF> / 32.82500; 21.85833<U+FEFF> (Archaeological Site of Cyrene)
## 9 LibKhoms,<U+00A0>Libya32°38′18″N 14°17′35″E<U+FEFF> / <U+FEFF>32.63833°N 14.29306°E<U+FEFF> / 32.63833; 14.29306<U+FEFF> (Archaeological Site of Leptis Magna)
## 10 LibSabratha,<U+00A0>Libya32°48′19″N 12°29′6″E<U+FEFF> / <U+FEFF>32.80528°N 12.48500°E<U+FEFF> / 32.80528; 12.48500<U+FEFF> (Archaeological Site of Sabratha)
## 11 IraqSalah ad Din,<U+00A0>Iraq35°27′24″N 43°15′45″E<U+FEFF> / <U+FEFF>35.45667°N 43.26250°E<U+FEFF> / 35.45667; 43.26250<U+FEFF> (Ashur)
## 12 PerLa Libertad,<U+00A0>Peru8°6′40″S 79°4′30″W<U+FEFF> / <U+FEFF>8.11111°S 79.07500°W<U+FEFF> / -8.11111; -79.07500<U+FEFF> (Chan Chan Archaeological Zone)
## 13 Potosi, <U+00A0>Bolivia\n19°35′1″S 65°45′11″W<U+FEFF> / <U+FEFF>19.58361°S 65.75306°W<U+FEFF> / -19.58361; -65.75306
## 14 VenFalcon,<U+00A0>Venezuela11°25′N 69°40′W<U+FEFF> / <U+FEFF>11.417°N 69.667°W<U+FEFF> / 11.417; -69.667<U+FEFF> (Coro and its Port)
## 15 Homs and Latakia Governorates, <U+00A0>Syria34°46′54″N 36°15′47″E<U+FEFF> / <U+FEFF>34.78167°N 36.26306°E<U+FEFF> / 34.78167; 36.26306<U+FEFF> (Crac des Chevaliers and Qal’at Salah El-Din)
## 16 AfgBamyan,<U+00A0>Afghanistan34°49′55″N 67°49′36″E<U+FEFF> / <U+FEFF>34.83194°N 67.82667°E<U+FEFF> / 34.83194; 67.82667<U+FEFF> (Cultural Landscape and Archaeological Remains of the Bamiyan Valley)
## 17 Solomon IslandRennell and Bellona Province,<U+00A0>Solomon Islands11°40′59″S 160°10′59″E<U+FEFF> / <U+FEFF>11.68306°S 160.18306°E<U+FEFF> / -11.68306; 160.18306<U+FEFF> (East Rennell)
## 18 United StatesFlorida,<U+00A0>United States25°19′N 80°56′W<U+FEFF> / <U+FEFF>25.317°N 80.933°W<U+FEFF> / 25.317; -80.933<U+FEFF> (Everglades National Park)
## 19 PanColon Province,<U+00A0>Panama9°33′14″N 79°39′21″W<U+FEFF> / <U+FEFF>9.55389°N 79.65583°W<U+FEFF> / 9.55389; -79.65583<U+FEFF> (Fortifications on the Caribbean Side of Panama: Portobelo-San Lorenzo)
## 20 DemOrientale,<U+00A0>Democratic Republic of the Congo4°0′N 29°15′E<U+FEFF> / <U+FEFF>4.000°N 29.250°E<U+FEFF> / 4.000; 29.250<U+FEFF> (Garamba National Park)
## 21 IrqNineveh Governorate,<U+00A0>Iraq35°35′17″N 42°43′6″E<U+FEFF> / <U+FEFF>35.58806°N 42.71833°E<U+FEFF> / 35.58806; 42.71833<U+FEFF> (Hatra)
## 22 PalHebron Governorate,<U+00A0>Palestine31°31′27″N 35°6′32″E<U+FEFF> / <U+FEFF>31.52417°N 35.10889°E<U+FEFF> / 31.52417; 35.10889<U+FEFF> (Hebron/Al-Khalil Old Town)
## 23 UzbQashqadaryo Region,<U+00A0>Uzbekistan39°3′0″N 66°50′0″E<U+FEFF> / <U+FEFF>39.05000°N 66.83333°E<U+FEFF> / 39.05000; 66.83333<U+FEFF> (Historic Centre of Shakhrisyabz)
## 24 AutVienna, <U+00A0>Austria48°12′N 16°22′E<U+FEFF> / <U+FEFF>48.200°N 16.367°E<U+FEFF> / 48.200; 16.367<U+FEFF> (Vienna)
## 25 YemAl Hudaydah,<U+00A0>Yemen14°12′N 43°19′E<U+FEFF> / <U+FEFF>14.200°N 43.317°E<U+FEFF> / 14.200; 43.317<U+FEFF> (Historic Town of Zab<U+012B>d)
## 26 MexicoBaja California, Baja California Sur, Sonora, Sinaloa and Nayarit,<U+00A0>Mexico27°38′N 112°33′W<U+FEFF> / <U+FEFF>27.633°N 112.550°W<U+FEFF> / 27.633; -112.550<U+FEFF> (Islands and Protected Areas of the Gulf of California)
## 27 DemSouth Kivuand Maniema,<U+00A0>Democratic Republic of the Congo2°30′S 28°45′E<U+FEFF> / <U+FEFF>2.500°S 28.750°E<U+FEFF> / -2.500; 28.750<U+FEFF> (Kahuzi-Biega National Park)
## 28 Ken<U+00A0>Kenya3°3′8″N 36°30′13″E<U+FEFF> / <U+FEFF>3.05222°N 36.50361°E<U+FEFF> / 3.05222; 36.50361<U+FEFF> (Lake Turkana National Parks)
## 29 CenBamingui-Bangoran,<U+00A0>Central African Republic9°0′N 21°30′E<U+FEFF> / <U+FEFF>9.000°N 21.500°E<U+FEFF> / 9.000; 21.500<U+FEFF> (Manovo-Gounda St Floris National Park)
## 30 AfgGh<U+014D>r,<U+00A0>Afghanistan34°23′48″N 64°30′58″E<U+FEFF> / <U+FEFF>34.39667°N 64.51611°E<U+FEFF> / 34.39667; 64.51611<U+FEFF> (Minaret and Archaeological Remains of Jam)
## 31 Serbia[a]42°39′40″N 20°15′56″E<U+FEFF> / <U+FEFF>42.66111°N 20.26556°E<U+FEFF> / 42.66111; 20.26556<U+FEFF> (Medieval Monuments in Kosovo)
## 32 CotLola Prefecture,<U+00A0>Cote d'Ivoire*<U+00A0>Guinea*7°36′N 8°23′W<U+FEFF> / <U+FEFF>7.600°N 8.383°W<U+FEFF> / 7.600; -8.383<U+FEFF> (Mount Nimba Strict Nature Reserve)
## 33 MicronesiaTemwen Island,<U+00A0>Micronesia6°50′23″N 158°19′51″E<U+FEFF> / <U+FEFF>6.83972°N 158.33083°E<U+FEFF> / 6.83972; 158.33083<U+FEFF> (Nan Madol: Ceremonial Centre of Eastern Micronesia)
## 34 SenTambacounda Regionand Kedougou Region,<U+00A0>Senegal13°0′N 12°40′W<U+FEFF> / <U+FEFF>13.000°N 12.667°W<U+FEFF> / 13.000; -12.667<U+FEFF> (Niokolo-Koba National Park)
## 35 Dem Orientale,<U+00A0>Democratic Republic of the Congo2°0′N 28°30′E<U+FEFF> / <U+FEFF>2.000°N 28.500°E<U+FEFF> / 2.000; 28.500<U+FEFF> (Okapi Wildlife Reserve)
## 36 JerJerusalem(no nation named by UNESCO)[nb 3]31°46′36″N 35°14′3″E<U+FEFF> / <U+FEFF>31.77667°N 35.23417°E<U+FEFF> / 31.77667; 35.23417<U+FEFF> (Old City of Jerusalem and its Walls)
## 37 YemSana'a Governorate,<U+00A0>Yemen15°21′20″N 44°12′29″E<U+FEFF> / <U+FEFF>15.35556°N 44.20806°E<U+FEFF> / 15.35556; 44.20806<U+FEFF> (Sana'a)
## 38 LibGhadames,<U+00A0>Libya30°08′00″N 9°30′00″E<U+FEFF> / <U+FEFF>30.13333°N 9.50000°E<U+FEFF> / 30.13333; 9.50000<U+FEFF> (Old Town of Ghadames)
## 39 MalDjenne,<U+00A0>Mali13°54′23″N 4°33′18″W<U+FEFF> / <U+FEFF>13.90639°N 4.55500°W<U+FEFF> / 13.90639; -4.55500<U+FEFF> (Old Towns of Djenne)
## 40 PalBattir, <U+00A0>Palestine31°43′11″N 35°7′50″E<U+FEFF> / <U+FEFF>31.71972°N 35.13056°E<U+FEFF> / 31.71972; 35.13056<U+FEFF> (Palestine: Land of Olives and Vines <U+2013> Cultural Landscape of Southern Jerusalem, Battir)
## 41 YemHadhramaut Governorate,<U+00A0>Yemen15°55′37″N 48°37′36″E<U+FEFF> / <U+FEFF>15.92694°N 48.62667°E<U+FEFF> / 15.92694; 48.62667<U+FEFF> (Shibam)
## 42 MadEastern Madagascar,<U+00A0>Madagascar14°28′S 49°42′E<U+FEFF> / <U+FEFF>14.467°S 49.700°E<U+FEFF> / -14.467; 49.700<U+FEFF> (Rainforests of the Atsinanana)
## 43 HonLa Mosquitia,<U+00A0>Honduras15°44′40″N 84°40′30″W<U+FEFF> / <U+FEFF>15.74444°N 84.67500°W<U+FEFF> / 15.74444; -84.67500<U+FEFF> (Rio Platano Biosphere Reserve)
## 44 LibFezzan,<U+00A0>Libya24°50′N 10°20′E<U+FEFF> / <U+FEFF>24.833°N 10.333°E<U+FEFF> / 24.833; 10.333<U+FEFF> (Rock-Art Sites of Tadrart Acacus)
## 45 IraqSalah ad Din,<U+00A0>Iraq34°12′N 43°52′E<U+FEFF> / <U+FEFF>34.200°N 43.867°E<U+FEFF> / 34.200; 43.867<U+FEFF> (Samarra Archaeological City)
## 46 TanzaniaCoast, Morogoro, Lindi, Mtwara and Ruvuma Regions,\n<U+00A0>Tanzania,\n9°0′0″S 37°24′0″E<U+FEFF> / <U+FEFF>9.00000°S 37.40000°E<U+FEFF> / -9.00000; 37.40000
## 47 Homs Governorate, <U+00A0>Syria34°33′15″N 38°16′0″E<U+FEFF> / <U+FEFF>34.55417°N 38.26667°E<U+FEFF> / 34.55417; 38.26667<U+FEFF> (Site of Palmyra)
## 48 MaliTimbuktu,Timbuktu Region,<U+00A0>Mali16°46′24″N 2°59′58″W<U+FEFF> / <U+FEFF>16.77333°N 2.99944°W<U+FEFF> / 16.77333; -2.99944<U+FEFF> (Timbuktu)
## 49 MaliGao,Gao Region,<U+00A0>Mali16°17′23″N 0°02′40″W<U+FEFF> / <U+FEFF>16.28972°N 0.04444°W<U+FEFF> / 16.28972; -0.04444<U+FEFF> (Tomb of Askia)
## 50 UgandaKampala District,<U+00A0>Uganda0°19′45″N 32°33′12″E<U+FEFF> / <U+FEFF>0.32917°N 32.55333°E<U+FEFF> / 0.32917; 32.55333<U+FEFF> (Tombs of Buganda Kings at Kasubi)
## 51 IndonesiaSumatra,<U+00A0>Indonesia02°30′S 101°30′E<U+FEFF> / <U+FEFF>2.500°S 101.500°E<U+FEFF> / -2.500; 101.500<U+FEFF> (Tropical Rainforest Heritage of Sumatra)
## 52 DemNorth Kivuand Orientale,<U+00A0>Democratic Republic of the Congo0°55′N 29°10′E<U+FEFF> / <U+FEFF>0.917°N 29.167°E<U+FEFF> / 0.917; 29.167<U+FEFF> (Virunga National Park)
## 53 RomAlba County,<U+00A0>Romania46°18′22″N 23°7′50″E<U+FEFF> / <U+FEFF>46.30611°N 23.13056°E<U+FEFF> / 46.30611; 23.13056<U+FEFF> (Islands and Protected Areas of the Gulf of California)
## V4 V6 V7
## 2 Cultural:(iv) 1979 2001<U+2013>
## 3 Natural:(vii), (ix), (x) 1991 1992<U+2013>
## 4 Cultural:(iii)(iv) 1986 2013<U+2013>
## 5 Cultural:(i)(iii)(vi) 1980 2013<U+2013>
## 6 Cultural:(i)(ii)(iii)(iv)(vi) 1979 2013<U+2013>
## 7 Cultural:(iii)(iv)(v) 2011 2013<U+2013>
## 8 Cultural:(ii), (iii), (vi) 1982 2016<U+2013>
## 9 Cultural:(i), (ii), (iii) 1982 2016<U+2013>
## 10 Cultural:(iii) 1982 2016<U+2013>
## 11 Cultural:(iii), (iv) 2003 2003<U+2013>
## 12 Cultural:(i), (iii) 1986 1986<U+2013>
## 13 Cultural:\n(ii), (iv), (vi) 1987 2014<U+2013>
## 14 Cultural:(iv), (v) 1993 2005<U+2013>
## 15 Cultural:(ii)(iv) 2006 2013<U+2013>
## 16 Cultural:(i), (ii), (iii), (iv), (vi) 2003 2003<U+2013>
## 17 Natural:(ix) 1998 2013<U+2013>
## 18 Natural:(viii), (ix), (x) 1979 1993<U+2013>2007, 2010<U+2013>
## 19 Cultural:(i), (iv) 1980 2012<U+2013>
## 20 Natural:(vii), (x) 1980 1984<U+2013>1992, 1996<U+2013>
## 21 Cultural:(ii), (iii), (iv), (vi) 1985 2015<U+2013>
## 22 Cultural:(ii), (iv), (vi) 2017 2017<U+2013>
## 23 Cultural:(iii), (iv) 2000 2016<U+2013>
## 24 Cultural:(ii)(iv)(vi) 2001 2017<U+2013>
## 25 Cultural:(ii), (iv), (vi) 1993 2000<U+2013>
## 26 Natural:(vii), (ix), (x) 2005 2019<U+2013>
## 27 Natural:(x) 1980 1997<U+2013>
## 28 Natural:(viii)(x) 1997 2018<U+2013>
## 29 Natural:(ix), (x) 1988 1997<U+2013>
## 30 Cultural:(ii), (iii), (iv) 2002 2002<U+2013>
## 31 Cultural:(ii), (iii), (iv) 2004 2006<U+2013>
## 32 Natural:(ix), (x) 1981 1992<U+2013>
## 33 Cultural:(i), (iii), (iv), (vi) 2016 2016<U+2013>
## 34 Natural:(x) 1981 2007<U+2013>
## 35 Natural:(x) 1996 1997<U+2013>
## 36 Cultural: (ii), (iii), (vi) 1981 1982<U+2013>
## 37 Cultural:(iv), (v), (vi) 1986 2015<U+2013>
## 38 Cultural:(v) 1986 2016<U+2013>
## 39 Cultural:(iii), (iv) 1988 2016<U+2013>
## 40 Cultural:(iv)(v) 2014 2014<U+2013>
## 41 Cultural:(iii), (iv), (v) 1982 2015<U+2013>
## 42 Natural:(ix), (x) 2007 2010<U+2013>
## 43 Natural:(vii), (viii), (ix), (x) 1982 1996<U+2013>2007, 2011<U+2013>
## 44 Cultural:(iii) 1985 2016<U+2013>
## 45 Cultural:(ii), (iii), (iv) 2007 2007<U+2013>
## 46 Natural:\n(ix), (x) 1982 2014<U+2013>
## 47 Cultural:(i)(ii)(iv) 1980 2013<U+2013>
## 48 Cultural:(ii), (iv), (v) 1988 2012<U+2013>
## 49 Cultural:(ii), (iii), (iv) 2004 2012<U+2013>
## 50 Cultural:(i), (iii),(iv), (vi) 2001 2010<U+2013>
## 51 Natural:(vii), (ix), (x) 2004 2011<U+2013>
## 52 Natural:(vii), (viii), (x) 1979 1994<U+2013>
## 53 Cultural:(ii)(iii)(iv) 2021 2021<U+2013>
colnames(danger_table) <- c("name","location","criterion","year_des","year_end")
head(danger_table)
## name
## 2 Abu Mena
## 3 Air and Tenere Natural Reserves
## 4 Ancient City of Aleppo
## 5 Ancient City of Bosra
## 6 Ancient City of Damascus
## 7 Ancient Villages of Northern Syria
## location
## 2 EgyAbusir,<U+00A0>Egypt.mw-parser-output .geo-default,.mw-parser-output .geo-dms,.mw-parser-output .geo-dec{display:inline}.mw-parser-output .geo-nondefault,.mw-parser-output .geo-multi-punct{display:none}.mw-parser-output .longitude,.mw-parser-output .latitude{white-space:nowrap}30°50′30″N 29°39′50″E<U+FEFF> / <U+FEFF>30.84167°N 29.66389°E<U+FEFF> / 30.84167; 29.66389<U+FEFF> (Abu Mena)
## 3 Niger1Arlit Department,<U+00A0>Niger18°17′N 8°0′E<U+FEFF> / <U+FEFF>18.283°N 8.000°E<U+FEFF> / 18.283; 8.000<U+FEFF> (Air and Tenere Natural Reserves)
## 4 Aleppo Governorate, <U+00A0>Syria36°14′N 37°10′E<U+FEFF> / <U+FEFF>36.233°N 37.167°E<U+FEFF> / 36.233; 37.167<U+FEFF> (Ancient City of Aleppo)
## 5 Daraa Governorate, <U+00A0>Syria32°31′5″N 36°28′54″E<U+FEFF> / <U+FEFF>32.51806°N 36.48167°E<U+FEFF> / 32.51806; 36.48167<U+FEFF> (Ancient City of Bosra)
## 6 Damascus Governorate, <U+00A0>Syria33°30′41″N 36°18′23″E<U+FEFF> / <U+FEFF>33.51139°N 36.30639°E<U+FEFF> / 33.51139; 36.30639<U+FEFF> (Ancient City of Damascus)
## 7 <U+00A0>Syria36°20′3″N 36°50′39″E<U+FEFF> / <U+FEFF>36.33417°N 36.84417°E<U+FEFF> / 36.33417; 36.84417<U+FEFF> (Ancient Villages of Northern Syria)
## criterion year_des year_end
## 2 Cultural:(iv) 1979 2001<U+2013>
## 3 Natural:(vii), (ix), (x) 1991 1992<U+2013>
## 4 Cultural:(iii)(iv) 1986 2013<U+2013>
## 5 Cultural:(i)(iii)(vi) 1980 2013<U+2013>
## 6 Cultural:(i)(ii)(iii)(iv)(vi) 1979 2013<U+2013>
## 7 Cultural:(iii)(iv)(v) 2011 2013<U+2013>
danger_table$criterion[1:3]
## [1] "Cultural:(iv)" "Natural:(vii), (ix), (x)"
## [3] "Cultural:(iii)(iv)"
danger_table$criterion <- ifelse(str_detect(danger_table$criterion, "Natural")==TRUE, "Natural", "Cultural")
danger_table$criterion[1:3]
## [1] "Cultural" "Natural" "Cultural"
danger_table$year_des[1:3]
## [1] "1979" "1991" "1986"
danger_table$year_des <- as.numeric(danger_table$year_des)
danger_table$year_des[1:3]
## [1] 1979 1991 1986
danger_table$year_end[1:10]
## [1] "2001<U+2013>" "1992<U+2013>" "2013<U+2013>" "2013<U+2013>" "2013<U+2013>" "2013<U+2013>" "2016<U+2013>" "2016<U+2013>" "2016<U+2013>"
## [10] "2003<U+2013>"
year_end_clean <- unlist(str_extract_all(danger_table$year_end, "^[[:digit:]]{4}"))
danger_table$year_end <- as.numeric(year_end_clean)
danger_table$year_end[1:10]
## [1] 2001 1992 2013 2013 2013 2013 2016 2016 2016 2003
The location
variable contains the name of the site’s location, the country, and the geographic coordinates in several varieties.
danger_table$location[c(1, 3, 5)]
## [1] "EgyAbusir,<U+00A0>Egypt.mw-parser-output .geo-default,.mw-parser-output .geo-dms,.mw-parser-output .geo-dec{display:inline}.mw-parser-output .geo-nondefault,.mw-parser-output .geo-multi-punct{display:none}.mw-parser-output .longitude,.mw-parser-output .latitude{white-space:nowrap}30°50′30″N 29°39′50″E<U+FEFF> / <U+FEFF>30.84167°N 29.66389°E<U+FEFF> / 30.84167; 29.66389<U+FEFF> (Abu Mena)"
## [2] "Aleppo Governorate, <U+00A0>Syria36°14′N 37°10′E<U+FEFF> / <U+FEFF>36.233°N 37.167°E<U+FEFF> / 36.233; 37.167<U+FEFF> (Ancient City of Aleppo)"
## [3] "Damascus Governorate, <U+00A0>Syria33°30′41″N 36°18′23″E<U+FEFF> / <U+FEFF>33.51139°N 36.30639°E<U+FEFF> / 33.51139; 36.30639<U+FEFF> (Ancient City of Damascus)"
reg_y <- "[/][ -]*[[:digit:]]*[.]*[[:digit:]]*[;]"
reg_x <- "[;][ -]*[[:digit:]]*[.]*[[:digit:]]*"
y_coords <- str_extract(danger_table$location, reg_y)
y_coords
## [1] "/ 30.84167;" "/ 18.283;" "/ 36.233;" "/ 32.51806;" "/ 33.51139;"
## [6] "/ 36.33417;" "/ 32.82500;" "/ 32.63833;" "/ 32.80528;" "/ 35.45667;"
## [11] "/ -8.11111;" "/ -19.58361;" "/ 11.417;" "/ 34.78167;" "/ 34.83194;"
## [16] "/ -11.68306;" "/ 25.317;" "/ 9.55389;" "/ 4.000;" "/ 35.58806;"
## [21] "/ 31.52417;" "/ 39.05000;" "/ 48.200;" "/ 14.200;" "/ 27.633;"
## [26] "/ -2.500;" "/ 3.05222;" "/ 9.000;" "/ 34.39667;" "/ 42.66111;"
## [31] "/ 7.600;" "/ 6.83972;" "/ 13.000;" "/ 2.000;" "/ 31.77667;"
## [36] "/ 15.35556;" "/ 30.13333;" "/ 13.90639;" "/ 31.71972;" "/ 15.92694;"
## [41] "/ -14.467;" "/ 15.74444;" "/ 24.833;" "/ 34.200;" "/ -9.00000;"
## [46] "/ 34.55417;" "/ 16.77333;" "/ 16.28972;" "/ 0.32917;" "/ -2.500;"
## [51] "/ 0.917;" "/ 46.30611;"
y_coords <- as.numeric(str_sub(y_coords, 3, -2))
y_coords
## [1] 30.84167 18.28300 36.23300 32.51806 33.51139 36.33417 32.82500
## [8] 32.63833 32.80528 35.45667 -8.11111 -19.58361 11.41700 34.78167
## [15] 34.83194 -11.68306 25.31700 9.55389 4.00000 35.58806 31.52417
## [22] 39.05000 48.20000 14.20000 27.63300 -2.50000 3.05222 9.00000
## [29] 34.39667 42.66111 7.60000 6.83972 13.00000 2.00000 31.77667
## [36] 15.35556 30.13333 13.90639 31.71972 15.92694 -14.46700 15.74444
## [43] 24.83300 34.20000 -9.00000 34.55417 16.77333 16.28972 0.32917
## [50] -2.50000 0.91700 46.30611
danger_table$y_coords <- y_coords
x_coords <- str_extract(danger_table$location, reg_x)
x_coords
## [1] "; 29.66389" "; 8.000" "; 37.167" "; 36.48167" "; 36.30639"
## [6] "; 36.84417" "; 21.85833" "; 14.29306" "; 12.48500" "; 43.26250"
## [11] "; -79.07500" "; -65.75306" "; -69.667" "; 36.26306" "; 67.82667"
## [16] "; 160.18306" "; -80.933" "; -79.65583" "; 29.250" "; 42.71833"
## [21] "; 35.10889" "; 66.83333" "; 16.367" "; 43.317" "; -112.550"
## [26] "; 28.750" "; 36.50361" "; 21.500" "; 64.51611" "; 20.26556"
## [31] "; -8.383" "; 158.33083" "; -12.667" "; 28.500" "; 35.23417"
## [36] "; 44.20806" "; 9.50000" "; -4.55500" "; 35.13056" "; 48.62667"
## [41] "; 49.700" "; -84.67500" "; 10.333" "; 43.867" "; 37.40000"
## [46] "; 38.26667" "; -2.99944" "; -0.04444" "; 32.55333" "; 101.500"
## [51] "; 29.167" "; 23.13056"
x_coords <- as.numeric(str_sub(x_coords, 3, -1))
x_coords
## [1] 29.66389 8.00000 37.16700 36.48167 36.30639 36.84417
## [7] 21.85833 14.29306 12.48500 43.26250 -79.07500 -65.75306
## [13] -69.66700 36.26306 67.82667 160.18306 -80.93300 -79.65583
## [19] 29.25000 42.71833 35.10889 66.83333 16.36700 43.31700
## [25] -112.55000 28.75000 36.50361 21.50000 64.51611 20.26556
## [31] -8.38300 158.33083 -12.66700 28.50000 35.23417 44.20806
## [37] 9.50000 -4.55500 35.13056 48.62667 49.70000 -84.67500
## [43] 10.33300 43.86700 37.40000 38.26667 -2.99944 -0.04444
## [49] 32.55333 101.50000 29.16700 23.13056
danger_table$x_coords <- x_coords
danger_table$location <- NULL
danger_table
## name
## 2 Abu Mena
## 3 Air and Tenere Natural Reserves
## 4 Ancient City of Aleppo
## 5 Ancient City of Bosra
## 6 Ancient City of Damascus
## 7 Ancient Villages of Northern Syria
## 8 Archaeological Site of Cyrene
## 9 Archaeological Site of Leptis Magna
## 10 Archaeological Site of Sabratha
## 11 Ashur (Qal'at Sherqat)
## 12 Chan Chan Archaeological Zone
## 13 City of Potosi
## 14 Coro and its Port
## 15 Crac des Chevaliers and Qal’at Salah El-Din
## 16 Cultural Landscape and Archaeological Remains of the Bamiyan Valley
## 17 East Rennell
## 18 Everglades National Park
## 19 Fortifications on the Caribbean Side of Panama: Portobelo-San Lorenzo
## 20 Garamba National Park
## 21 Hatra
## 22 Hebron/Al-Khalil Old Town
## 23 Historic Centre of Shakhrisyabz
## 24 Historic Centre of Vienna
## 25 Historic Town of Zab<U+012B>d
## 26 Islands and Protected Areas of the Gulf of California
## 27 Kahuzi-Biega National Park
## 28 Lake Turkana National Parks
## 29 Manovo-Gounda St Floris National Park
## 30 Minaret and Archaeological Remains of Jam
## 31 Medieval Monuments in Kosovo
## 32 Mount Nimba Strict Nature Reserve
## 33 Nan Madol: Ceremonial Centre of Eastern Micronesia
## 34 Niokolo-Koba National Park
## 35 Okapi Wildlife Reserve
## 36 Old City of Jerusalem and its Walls
## 37 Old City of Sana'a
## 38 Old Town of Ghadames
## 39 Old Towns of Djenne
## 40 Palestine: Land of Olives and Vines <U+2013> Cultural Landscape of Southern Jerusalem, Battir
## 41 Old Walled City of Shibam
## 42 Rainforests of the Atsinanana
## 43 Rio Platano Biosphere Reserve
## 44 Rock-Art Sites of Tadrart Acacus
## 45 Samarra Archaeological City
## 46 Selous Game Reserve
## 47 Site of Palmyra
## 48 Timbuktu
## 49 Tomb of Askia
## 50 Tombs of Buganda Kings at Kasubi
## 51 Tropical Rainforest Heritage of Sumatra
## 52 Virunga National Park
## 53 Ro<U+0219>ia Montan<U+0103> Mining Landscape
## criterion year_des year_end y_coords x_coords
## 2 Cultural 1979 2001 30.84167 29.66389
## 3 Natural 1991 1992 18.28300 8.00000
## 4 Cultural 1986 2013 36.23300 37.16700
## 5 Cultural 1980 2013 32.51806 36.48167
## 6 Cultural 1979 2013 33.51139 36.30639
## 7 Cultural 2011 2013 36.33417 36.84417
## 8 Cultural 1982 2016 32.82500 21.85833
## 9 Cultural 1982 2016 32.63833 14.29306
## 10 Cultural 1982 2016 32.80528 12.48500
## 11 Cultural 2003 2003 35.45667 43.26250
## 12 Cultural 1986 1986 -8.11111 -79.07500
## 13 Cultural 1987 2014 -19.58361 -65.75306
## 14 Cultural 1993 2005 11.41700 -69.66700
## 15 Cultural 2006 2013 34.78167 36.26306
## 16 Cultural 2003 2003 34.83194 67.82667
## 17 Natural 1998 2013 -11.68306 160.18306
## 18 Natural 1979 1993 25.31700 -80.93300
## 19 Cultural 1980 2012 9.55389 -79.65583
## 20 Natural 1980 1984 4.00000 29.25000
## 21 Cultural 1985 2015 35.58806 42.71833
## 22 Cultural 2017 2017 31.52417 35.10889
## 23 Cultural 2000 2016 39.05000 66.83333
## 24 Cultural 2001 2017 48.20000 16.36700
## 25 Cultural 1993 2000 14.20000 43.31700
## 26 Natural 2005 2019 27.63300 -112.55000
## 27 Natural 1980 1997 -2.50000 28.75000
## 28 Natural 1997 2018 3.05222 36.50361
## 29 Natural 1988 1997 9.00000 21.50000
## 30 Cultural 2002 2002 34.39667 64.51611
## 31 Cultural 2004 2006 42.66111 20.26556
## 32 Natural 1981 1992 7.60000 -8.38300
## 33 Cultural 2016 2016 6.83972 158.33083
## 34 Natural 1981 2007 13.00000 -12.66700
## 35 Natural 1996 1997 2.00000 28.50000
## 36 Cultural 1981 1982 31.77667 35.23417
## 37 Cultural 1986 2015 15.35556 44.20806
## 38 Cultural 1986 2016 30.13333 9.50000
## 39 Cultural 1988 2016 13.90639 -4.55500
## 40 Cultural 2014 2014 31.71972 35.13056
## 41 Cultural 1982 2015 15.92694 48.62667
## 42 Natural 2007 2010 -14.46700 49.70000
## 43 Natural 1982 1996 15.74444 -84.67500
## 44 Cultural 1985 2016 24.83300 10.33300
## 45 Cultural 2007 2007 34.20000 43.86700
## 46 Natural 1982 2014 -9.00000 37.40000
## 47 Cultural 1980 2013 34.55417 38.26667
## 48 Cultural 1988 2012 16.77333 -2.99944
## 49 Cultural 2004 2012 16.28972 -0.04444
## 50 Cultural 2001 2010 0.32917 32.55333
## 51 Natural 2004 2011 -2.50000 101.50000
## 52 Natural 1979 1994 0.91700 29.16700
## 53 Cultural 2021 2021 46.30611 23.13056
round(danger_table$y_coords, 2)[1:3]
## [1] 30.84 18.28 36.23
round(danger_table$x_coords, 2)[1:3]
## [1] 29.66 8.00 37.17
length(danger_table$y_coords)
## [1] 52
length(danger_table$x_coords)
## [1] 52
dim(danger_table)
## [1] 52 6
head(danger_table)
## name criterion year_des year_end y_coords
## 2 Abu Mena Cultural 1979 2001 30.84167
## 3 Air and Tenere Natural Reserves Natural 1991 1992 18.28300
## 4 Ancient City of Aleppo Cultural 1986 2013 36.23300
## 5 Ancient City of Bosra Cultural 1980 2013 32.51806
## 6 Ancient City of Damascus Cultural 1979 2013 33.51139
## 7 Ancient Villages of Northern Syria Cultural 2011 2013 36.33417
## x_coords
## 2 29.66389
## 3 8.00000
## 4 37.16700
## 5 36.48167
## 6 36.30639
## 7 36.84417
pch <- ifelse(danger_table$criterion == "Natural", 19, 2)
map("world", col = "darkgrey", lwd = 0.5, mar = c(0.1, 0.1, 0.1, 0.1))
points(danger_table$x_coords, danger_table$y_coords, pch = pch)
box()
table(danger_table$criterion)
##
## Cultural Natural
## 36 16
hist(danger_table$year_end, freq=TRUE,
xlab = "Year when site was put on the list of endangered sites",
main = "")
duration <- danger_table$year_end - danger_table$year_des
hist(duration, freq = TRUE,
xlab = "Years it took to become an endangered site",
main = "")