Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.37 KB | None | 0 0
  1. structure(list(ID = structure(c(3L, 4L, 4L, 4L, 4L, 4L, 1L, 5L,
  2. 2L, 2L), .Label = c("015753e0-8574-4b13-88d7-627292d52272", "2721a25c-cc0e-43d3-abd2-b29a0da8b9d0",
  3. "60a7614a-63bb-4bb9-91ac-520549853c19", "86735a77-b822-4320-b16e-1ff2b5535f5d",
  4. "8ff4d254-291b-47d4-970a-82f29f8a51fb"), class = "factor"), Impact = structure(c(1L,
  5. 1L, 1L, 1L, 1L, 1L, 3L, 2L, 3L, 3L), .Label = c("Extreme impact",
  6. "Moderate impact", "Strong impact"), class = "factor"), Size_bribe = structure(c(1L,
  7. 3L, 3L, 3L, 3L, 3L, 2L, 4L, 1L, 1L), .Label = c("10,000 Afs",
  8. "100 Afs", "100,000 Afs", "No payment made"), class = "factor"),
  9. Abuse_type = structure(c(2L, 3L, 3L, 3L, 3L, 3L, 2L, 1L,
  10. 2L, 2L), .Label = c("Delay of service", "Payment of money",
  11. "Threat of incarceration"), class = "factor"), service_worst_problem = structure(c(3L,
  12. 1L, 1L, 1L, 1L, 1L, 2L, 4L, 3L, 3L), .Label = c("Obtaining a judgement",
  13. "Other", "Reporting a offence/crime to the police", "Vehicle registration"
  14. ), class = "factor"), Gender = structure(c(2L, 2L, 2L, 2L,
  15. 2L, 2L, 2L, 1L, 2L, 2L), .Label = c("Female", "Male"), class = "factor"),
  16. Age = structure(c(3L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 2L), .Label = c("26 - 35",
  17. "36 - 45", "46 - 55"), class = "factor"), Education = structure(c(4L,
  18. 2L, 2L, 2L, 2L, 2L, 1L, 3L, 1L, 1L), .Label = c("I do not have any formal education",
  19. "Primary education", "University or post-graduate education",
  20. "Vocational training after Secondary / High School"), class = "factor"),
  21. Madrassa = structure(c(1L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 1L,
  22. 1L), .Label = c("No", "Yes, on a regular basis", "Yes, some"
  23. ), class = "factor"), Monthly_income = structure(c(2L, 1L,
  24. 1L, 1L, 1L, 1L, 4L, 2L, 3L, 3L), .Label = c("20,001 - 25,000 AFN",
  25. "6001 - 8000 AFN", "8001 - 10,000 AFN", "Less than 2,000 AFN"
  26. ), class = "factor"), local_influence = structure(c(1L, 1L,
  27. 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = "No", class = "factor"),
  28. basis_local_influence = structure(c(1L, 2L, 2L, 2L, 2L, 2L,
  29. 2L, 2L, 1L, 1L), .Label = c("", "None of the above"), class = "factor"),
  30. current_occupation = structure(c(1L, 2L, 2L, 2L, 2L, 2L,
  31. 2L, 2L, 2L, 2L), .Label = c("Other", "Paid worker in any sector"
  32. ), class = "factor"), ethinic_group = structure(c(3L, 2L,
  33. 2L, 2L, 2L, 2L, 1L, 3L, 3L, 3L), .Label = c("Aimaq", "Pashtun",
  34. "Tajik"), class = "factor"), location = structure(c(1L, 1L,
  35. 1L, 1L, 1L, 1L, 2L, 1L, 2L, 2L), .Label = c("Herat PD1 - Dawlat Khana",
  36. "Herat PD9 - Baghcha-e-Mastufi"), class = "factor"), City = structure(c(1L,
  37. 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = "Herat", class = "factor"),
  38. NarrID = c(173L, 174L, 174L, 174L, 174L, 174L, 175L, 177L,
  39. 178L, 178L), Stone.Num = c(1L, 1L, 2L, 3L, 4L, 5L, 4L, 1L,
  40. 1L, 2L), NarrID_Stone = c(173.01, 174.01, 174.02, 174.03,
  41. 174.04, 174.05, 175.04, 177.01, 178.01, 178.02), Stone.Name.L1 = structure(c(3L,
  42. 3L, 4L, 1L, 5L, 2L, 5L, 3L, 3L, 4L), .Label = c("District Officials",
  43. "Malik / Wakil-e-Guzar", "Police", "Provincial Officials",
  44. "Religious Leaders"), class = "factor"), Canvas01.AdjXRightValue = c(0.7299,
  45. 0.8994, 0.8615, 0.2399, 0.9103, NA, 0.8757, 0.0916, 0.1725,
  46. 0.351), Canvas01.AdjYTopValue = c(0.2903, 0.8374, 0.6583,
  47. 0.8183, 0.2167, NA, 0.8374, 0.7678, 0.705, 0.7239), Canvas01.Quadrant = structure(c(3L,
  48. 4L, 4L, 2L, 3L, 1L, 4L, 2L, 2L, 2L), .Label = c("", "2. Upper Left",
  49. "3. Lower Right", "4. Upper Right"), class = "factor"),
  50. Canvas02.AdjXRightValue = c(0.2113, 0.8892, 0.8102, 0.1629,
  51. 0.8911, NA, 0.9206, 0.7614, 0.4365, 0.143), Canvas02.AdjYTopValue = c(0.2375,
  52. 0.8305, 0.7514, 0.8385, 0.1948, NA, 0.2521, 0.8824, 0.5588,
  53. 0.7078), Canvas02.Quadrant = structure(c(2L, 5L, 5L, 3L,
  54. 4L, 1L, 4L, 5L, 3L, 3L), .Label = c("", "1. Lower Left",
  55. "2. Upper Left", "3. Lower Right", "4. Upper Right"), class = "factor"),
  56. Canvas03.AdjXRightValue = c(0.2945, 0.8503, 0.7177, 0.2971,
  57. 0.9026, NA, 0.1442, 0.6663, 0.1856, 0.6509), Canvas03.AdjYTopValue = c(0.2849,
  58. 0.7296, 0.7228, 0.7445, 0.1675, NA, 0.836, 0.8469, 0.7808,
  59. 0.8319), Canvas03.Quadrant = structure(c(2L, 5L, 5L, 3L,
  60. 4L, 1L, 3L, 5L, 3L, 5L), .Label = c("", "1. Lower Left",
  61. "2. Upper Left", "3. Lower Right", "4. Upper Right"), class = "factor"),
  62. Canvas04.AdjXRightValue = c(0.2804, 0.9165, 0.8147, 0.7183,
  63. 0.1924, 0.6477, 0.6946, 0.0608, 0.1211, 0.3215), Canvas04.AdjYTopValue = c(0.2808,
  64. 0.8114, 0.7282, 0.7064, 0.2767, 0.7391, 0.746, 0.3553, 0.615,
  65. 0.6246), Canvas04.Quadrant = structure(c(1L, 3L, 3L, 3L,
  66. 1L, 3L, 3L, 1L, 2L, 2L), .Label = c("1. Lower Left", "2. Upper Left",
  67. "4. Upper Right"), class = "factor"), Canvas05.AdjXRightValue = c(0.2817,
  68. 0.2078, 0.2065, 0.1205, 0.2958, 0.1166, 0.1115, 0.1532, 0.2642,
  69. 0.143), Canvas05.AdjYTopValue = c(0.2535, 0.2167, 0.3122,
  70. 0.1455, 0.2399, 0.3094, 0.8169, 0.2789, 0.2883, 0.2453),
  71. Canvas05.Quadrant = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L,
  72. 1L, 1L, 1L), .Label = c("1. Lower Left", "2. Upper Left"
  73. ), class = "factor")), row.names = c(NA, 10L), class = "data.frame")
  74.  
  75. ggplotly(
  76. ggplot(df_f, aes(x=Canvas01.AdjXRightValue, y=Canvas01.AdjYTopValue, colour=Gender)) +
  77. geom_point(aes(text=map(paste('<b>Canvas:</b>',"1 size and frequency",
  78. '<br>', '<b>Stone:</b>', Stone.Name.L1,
  79. '<br>', '<b>Quadrant:</b>', Canvas01.Quadrant,
  80. '<br>', '<b>About the Respondents Experience</b>'," ",
  81. '<br>', '<b>Impact:</b>', Impact,
  82. '<br>', '<b>Size of bribe:</b>', Size_bribe,
  83. '<br>', '<b>Type of abuse:</b>', Abuse_type,
  84. '<br>', '<b>Service with worst problem:</b>', service_worst_problem,
  85. '<br>', '<b>About the Respondent</b>'," ",
  86. '<br>', '<b>Gender:</b>', Gender,
  87. '<br>', '<b>Age:</b>', Age,
  88. '<br>', '<b>Education:</b>', Education,
  89. '<br>', '<b>Madrassa:</b>', Madrassa,
  90. '<br>', '<b>Monthly income:</b>', Monthly_income,
  91. '<br>', '<b>Local influence?:</b>', local_influence,
  92. '<br>', '<b>Basis of local influence:</b>', basis_local_influence,
  93. '<br>', '<b>Current occupation:</b>', current_occupation,
  94. '<br>', '<b>Ethnic group:</b>', ethinic_group,
  95. '<br>', '<b>Location:</b>', location,
  96. '<br>', '<b>Default text</b>'," "), HTML)))+
  97. xlab("Asked for small bribes or abused power minimally") +
  98. ylab("Asked for bribes or abused power infrequently") +
  99. ggtitle("1 size and frequency") + geom_hline(aes(yintercept=0.5),colour="black") +
  100. theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
  101. panel.background = element_blank())+theme(legend.title = element_blank())+
  102. geom_vline(aes(xintercept=0.5), colour="black"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement