-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfigures.py
623 lines (585 loc) · 19.2 KB
/
figures.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
import matplotlib.pyplot as plt
import numpy as np
import parallelProcessing
import math
import statistics
alexa_hosts = parallelProcessing.fetch_domains(type = "alexa", n = 100000)
alexa_hosts = [host.decode().replace("www.", "") for host in alexa_hosts]
plt.rcParams['figure.figsize'] = 9, 8
# plt.rcParams['figure.figsize'] = 7, 5
plt.rcParams['figure.dpi'] = 100
# plt.rcParams['axes.labelsize']=34
plt.rcParams['axes.labelsize']=34
plt.rcParams['xtick.labelsize']=30
plt.rcParams['ytick.labelsize']=30
plt.rcParams['legend.fontsize']=28
def find_rank(host):
return alexa_hosts.index(host) + 1
fig = None
def cdf(x, xlabel, ylabel, title, save=False, name="figure.pdf", label=None):
global fig
x, y = sorted(x), np.arange(len(x)) / len(x)
fig = plt.figure()
plt.plot(x, y, linewidth=3, label=label, ls="solid")
# For Figure 3B
# plt.plot([0.1, 0.1], [0, 1], c='r', linestyle='solid')
# plt.plot([0.4, 0.4], [0, 1], c='g', linestyle='solid')
plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.margins(0.001)
ax = fig.gca()
ax.xaxis.set_tick_params(width=2)
ax.yaxis.set_tick_params(width=2)
# ax.set_yscale('log')
# ax.set_xticks(np.arange(0, 260, 50))
# ax.set_xlim([0, 255])
# Remove ticks if desired
# ax.xaxis.get_major_ticks()[0].draw = lambda *args: None
plt.xticks(rotation=35)
plt.grid(linestyle='dotted', c="#393b3d")
if not save:
# plt.title(title)
# plt.show()
pass
else:
fig.savefig(name, bbox_inches="tight")
# FIGURE 3A - NUMBER OF INTERNAL LINKS THAT WERE CRAWLED
num_pages = []
hosts_num_pages = {}
files = ["analysis-data/v2Results/top100k/numpagesresults.txt",
"analysis-data/v2Results/bottom10k/numpagesresults.txt"]
for f in files:
with open(f) as pages_file:
lines = pages_file.readlines()
for line in lines:
x = int(line.strip().split(" *** ")[1])
if x == 0:
continue
hosts_num_pages[line.strip().split(" *** ")[0].strip()] = min(250, x)
num_pages.append(min(250,x))
print(statistics.mean(num_pages))
print(len(hosts_num_pages))
cdf(num_pages, "Number of internal links", "CDF", "CDF for internal links crawled", save=True, name="ratio_internal_links.pdf")
index = 0
for el in sorted(num_pages):
if el >= 250:
print("err:", index, el)
break
else:
index+=1
print(len(num_pages))
index = 0
print("SAVING ratio_internal_links.pdf...")
# exit(0)
# FIGURE 3B - CDF VISIBLE DISTANCE
results = {}
with open("analysis-data/v2Results/diff-cdf.txt") as cd_file:
for line in cd_file.readlines():
items = line.strip().split(" * ")
if items[0] not in results:
results[items[0]] = []
results[items[0]].append(float(items[1]))
num = []
count = 0
for r in results:
count += 1
for x in (results[r]):
num.append(x)
# if count == 10000:
# break
print((num))
cdf(num, "Visible-text distance", "CDF", "", save=True, name="alpha.pdf")
sorted_arr = sorted(num)
print("Total", len(sorted_arr))
index = 0
for el in sorted_arr:
if el >= 0.1:
print(index)
break
else:
index+=1
print(num.count(0.0))
print("SAVING alpha.pdf...")
# exit(0)
# FIGURE 3C - NOT CRAWL REASONS
hosts_reasons = {}
with open("analysis-data/v2Results/top100k/numreasonsresults.txt") as pages_file:
lines = pages_file.readlines()
for line in lines:
reason = (line.strip().split(" *** ")[1])
hosts_reasons[line.strip().split(" *** ")[0]] = reason
bins_wanted = 10
div_num = len(alexa_hosts) / bins_wanted
bins = {}
for i in range(1, bins_wanted + 1):
bins[i] = []
for host in hosts_reasons:
rank = find_rank(host.replace("www.", ""))
bins[ math.ceil(rank/div_num)].append(hosts_reasons[host])
print("*bins*")
x = []
https_not = []
robots_not = []
misc = []
for bin in bins:
x.append(bin)
https_not.append(bins[bin].count("<domain not https friendly>"))
robots_not.append(bins[bin].count("<robots.txt check>"))
misc.append(bins[bin].count("unknown"))
# ADD BOTTOM 10k RESULTS
bottom_reasons = []
with open("analysis-data/v2Results/bottom10k/numreasonsresults.txt") as pages_file:
lines = pages_file.readlines()
for line in lines:
reason = (line.strip().split(" *** ")[1])
bottom_reasons.append(reason)
x.append(11)
https_not.append(bins[bin].count("<domain not https friendly>"))
robots_not.append(bins[bin].count("<robots.txt check>"))
misc.append(bins[bin].count("unknown"))
fig = plt.figure()
p1 = plt.plot(x, https_not, linewidth=3, ls="dashdot")
p3 = plt.plot(x, misc, linewidth=3, ls="dotted")
p2 = plt.plot(x, robots_not, linewidth=3, ls="dashed")
plt.ylabel('Number of sites')
plt.xlabel('Alexa rank')
plt.grid(linestyle='dotted', c="#393b3d")
# plt.title('Distribution of reasons for not crawling')
ticks = []
for x in np.arange(1,12,1):
if x == 11:
ticks.append("100k+")
ticks.append(str(x) + "0k")
plt.xticks(np.arange(1,12,1), ticks, rotation=35)
# plt.yticks(np.arange(0, 81, 10))
# plt.margins(0.001)
ax = fig.gca()
# Bound legend if desired
ax.xaxis.set_tick_params(width=2)
ax.yaxis.set_tick_params(width=2)
# ax.set_xticks(np.arange(0, 12, 1))
# ax.set_yticks(np.arange(0, 12., 1))
plt.legend((p1[0], p2[0], p3[0]), ('HTTPS not available', 'Robots.txt restriction', 'Miscellaneous'))
plt.ylim((0, 5000))
#plt.legend(bbox_to_anchor=(0,4010,20,20), loc="lower left",
# mode="expand", borderaxespad=0, ncol=3)
fig.savefig('not_crawl_reasons.pdf', bbox_inches="tight")
print("Done saving...")
print("SAVING not_crawl_reasons.pdf...")
# exit(0)
# FIGURE 4A: CDF FOR # OF INCONSISTENCIES
error_num = {}
files = ["analysis-data/v2Results/diffresultsALL.txt"]
urls_proc = set()
for f in files:
with open(f) as diff_r:
for line in diff_r.readlines():
items = line.split("***")
domain = items[0].strip()
url = items[1].strip()
if not url in urls_proc:
if domain not in error_num:
error_num[domain] = 1
else:
error_num[domain] += 1
urls_proc.add(url)
# Correction for duplicate results for a handful of sites
err = []
for dom in error_num:
if error_num[dom] > 250:
error_num[dom] = 250
err.append(error_num[dom])
print(statistics.mean(err), "hi-cd")
print(len(err))
cdf(err, "Number of content-differences", "CDF", "CDF for errors found", save=False)
diffs_cdf = err[:]
# Find point > 50 pages
# sorted_arr = sorted(diffs_cdf)
# print(len(sorted_arr))
# index = 0
# for el in sorted_arr:
# if el == 51:
# print("point", index)
# break
# else:
# index+=1
error_num = {}
files = ["analysis-data/v2Results/inacresultsALL-withouTIMEOUTwithoutCONNECTION.txt"]
for f in files:
with open(f) as diff_r:
for line in diff_r.readlines():
items = line.split("***")
domain = items[0].strip()
if domain not in error_num:
error_num[domain] = 1
else:
error_num[domain] += 1
err = []
for dom in error_num:
err.append(error_num[dom])
print(statistics.mean(err), "hi-ca")
print(err)
print(len(err))
cdf(err, "Number of content inconsistencies", "CDF", "CDF for errors found", save=False, label="Content unavailabilities")
x = diffs_cdf
x, y = sorted(x), np.arange(len(x)) / len(x)
plt.plot(x, y, linewidth =3, ls="dashdot", label="Content differences")
plt.legend(loc='lower right')
ax = fig.gca()
ax.xaxis.set_tick_params(width=2)
ax.yaxis.set_tick_params(width=2)
plt.grid(linestyle='dotted', c="#393b3d")
plt.xticks(rotation=35)
fig.savefig('cdf_inconsistencies.pdf', bbox_inches="tight")
print("SAVING cdf_inconsistencies.pdf...")
# exit(0)
# FIGURE 4B - POPULARITY VS PRESENCE
def host_included(host, exact_match = True, bottom = False):
if bottom:
alex_hosts = parallelProcessing.fetch_domains(type="alexa", n=1000000)
alex_hosts = [host.decode() for host in alex_hosts]
else:
alex_hosts = alexa_hosts
for rank in range(0, len(alex_hosts)):
if host.strip() == alex_hosts[rank].strip():
return True, rank + 1
if not exact_match:
if host.endswith("." + alex_hosts[rank]):
return True, rank + 1
return False, -1
https_avail = set()
dom = 0
with open("analysis-data/v2Results/top100k/numpagesresults.txt") as cf_https:
lines = cf_https.readlines()
for line in lines:
items = line.split(" *** ")
assert len(items) == 2
dom += 1
if items[1].strip() != "0":
https_avail.add(items[0].replace("www.", "").strip())
https_avail_bottom = set()
dom = 0
with open("analysis-data/v2Results/bottom10k/numpagesresults.txt") as cf_https:
lines = cf_https.readlines()
for line in lines:
items = line.split(" *** ")
assert len(items) == 2
dom += 1
if items[1].strip() != "0":
https_avail_bottom.add(items[0].replace("www.", "").strip())
inac_hosts = {}
reasons = {}
with open("analysis-data/v2Results/top100k/inacresults-without-timeout.txt") as cf_inac:
lines = cf_inac.readlines()
for line in lines:
if ":80" in line.split(" *** ")[0].split("/")[0]:
continue
host = line.split(" *** ")[0].strip().split(":")[0].split("/")[0].split("?")[0]
host.replace("www.", "")
if host.startswith("www."):
host = host.replace("www.", "", 1)
error = line.split(" *** ")[2]
inac_hosts[host] = (line.split(" *** ")[0], error)
if error not in reasons:
reasons[error] = 0
reasons[error] += 1
bins_wanted = 100
div_num = len(alexa_hosts) / bins_wanted
bins = {}
bins_supp = {}
for i in range(1, bins_wanted + 1):
bins[i] = []
bins_supp[i] = 0
# Compute bins HTTPS support
for host in https_avail:
bins_supp[math.ceil(find_rank(host)/div_num)] += 1
count = 0
for host in inac_hosts:
inc, rank = host_included(host, exact_match=True)
if inc:
bins[ math.ceil(rank/div_num)].append(host)
else:
count += 1
print(host)
print("cu check inc fail: ", count)
print("*inac bins*")
x2 = []
y2 = []
for bin in bins:
x2.append(bin)
y2.append((len(bins[bin]) / (bins_supp[bin])))
cd_hosts = {}
with open("analysis-data/v2Results/top100k/top-diffresults-contd.txt") as cf_inac:
lines = cf_inac.readlines()
for line in lines:
if ":80" in line.split("***")[0].strip().split("/")[0]:
continue
host = line.split("***")[0].strip().split(":")[0].split("/")[0].split("?")[0]
host.replace("www.", "")
if host.startswith("www."):
host = host.replace("www.", "", 1)
error = line.split("***")[1]
cd_hosts[host] = (line.split(" *** ")[0], error)
bins_wanted = 100
div_num = len(alexa_hosts) / bins_wanted
bins = {}
for i in range(1, bins_wanted + 1):
bins[i] = []
# bins[11] = []
print("cd check")
count = 0
for host in cd_hosts:
inc, rank = host_included(host, exact_match=True)
if inc:
bins[ math.ceil(rank/div_num)].append(host)
else:
count += 1
print("cd check inc fail: ", count)
print("*cd bins*")
x = []
y = []
for bin in bins:
x.append(bin)
y.append((len(bins[bin]) / (bins_supp[bin])))
fig = plt.figure()
ax = fig.gca()
ax.xaxis.set_tick_params(width=2)
ax.yaxis.set_tick_params(width=2)
plt.grid(linestyle='dotted', c="#393b3d")
plt.xticks(rotation=35)
#circle1=plt.Circle((101,53 / len(https_avail_bottom)),0.002,color='r')
#plt.gcf().gca().add_artist(circle1)
plt.plot(x2, y2, label="Content unavailabilities", linewidth=2, zorder=1)
plt.plot(x, y, label="Content differences", linewidth=2, zorder=1)
plt.scatter(110, 58 / len(https_avail_bottom), s=80, c='#1f77b4', marker="o", zorder=2)
plt.scatter(110, 166 / len(https_avail_bottom), s=80, c='#ff7f0e', marker="o", zorder=2)
import numpy as np
x.append(110)
y.append(166 / len(https_avail_bottom))
x2.append(110)
y2.append(58 / len(https_avail_bottom))
x_ticks_org = list(np.arange(0, 120, 20))
x_ticks_org.append(110)
x_ticks_mod = list(np.arange(0, 120, 20))
x_ticks_mod.append("(LT)")
plt.xticks(x_ticks_org, x_ticks_mod)
plt.legend(loc='upper right')
# plt.suptitle('How website popularity influences results?')
plt.xlabel('Number of bins')
plt.ylabel('Presence of inconsistencies')
fig.savefig('scatter_error_presence.pdf', bbox_inches="tight")
print(np.corrcoef(x, y), "--cd")
print(np.corrcoef(x2, y2), "--inac")
print("SAVING scatter_error_presence.pdf...")
# FIGURE 4C - POPULARITY VS PREVALENCE
error_num = {}
files = ["analysis-data/v2Results/top100k/top-diffresults-contd.txt"]
for f in files:
with open(f) as diff_r:
for line in diff_r.readlines():
items = line.split("***")
domain = items[0].strip()
if domain not in error_num:
error_num[domain] = 1
else:
error_num[domain] += 1
bins_wanted = 100
div_num = len(alexa_hosts) / bins_wanted
bins = {}
for i in range(1, bins_wanted + 1):
bins[i] = []
for host in error_num:
rank = find_rank(host.replace("www.", ""))
bins[ math.ceil(rank/div_num)].append(error_num[host])
print("*bins*")
x_cd = []
y_cd = []
y_err = []
for bin in bins:
x_cd.append(bin)
y_cd.append(statistics.mean(bins[bin]))
try:
y_err.append(statistics.stdev(bins[bin]))
except:
print(bin)
err = []
for dom in error_num:
err.append(error_num[dom])
print(statistics.mean(err), "hi-cd")
error_num = {}
files = ["analysis-data/v2Results/top100k/inacresults-without-timeout.txt"]
for f in files:
with open(f) as diff_r:
for line in diff_r.readlines():
items = line.split("***")
domain = items[0].strip()
if domain not in error_num:
error_num[domain] = 1
else:
error_num[domain] += 1
err = []
for dom in error_num:
err.append(error_num[dom])
print(statistics.mean(err), "hi-ca")
print(err)
print(len(err))
bins_wanted = 100
div_num = len(alexa_hosts) / bins_wanted
bins = {}
for i in range(1, bins_wanted + 1):
bins[i] = []
for host in error_num:
rank = find_rank(host.replace("www.", ""))
bins[ math.ceil(rank/div_num)].append(error_num[host])
print("*bins*")
x = []
y = []
y_err = []
for bin in bins:
x.append(bin)
y.append(statistics.mean(bins[bin]))
try:
y_err.append(statistics.stdev(bins[bin]))
except:
print(bin)
# cdf(err, "Number of content-unavailability errors", "Ratio", "CDF for errors found", save=False)
fig = plt.figure()
ax = fig.gca()
ax.xaxis.set_tick_params(width=2)
ax.yaxis.set_tick_params(width=2)
plt.grid(linestyle='dotted', c="#393b3d")
plt.xticks(rotation=35)
plt.plot(x, y, label="Content unavailabilities", linewidth=2, zorder=1)
plt.plot(x_cd, y_cd, label="Content differences", linewidth=2, zorder=1)
plt.scatter(110, 2120/58, s=80, c='#1f77b4', marker="o", zorder=2)
plt.scatter(110, 7372/166, s=80, c='#ff7f0e', marker="o", zorder=2)
x_ticks_org = list(np.arange(0, 120, 20))
x_ticks_org.append(110)
x_ticks_mod = list(np.arange(0, 120, 20))
x_ticks_mod.append("(LT)")
plt.xticks(x_ticks_org, x_ticks_mod)
# locs, labels = plt.xticks()
# plt.setp(labels[6], rotation=90)
# plt.errorbar(x, y, yerr=y_err, label="", fmt='o', ecolor='black',capsize=1, capthick=1)
plt.legend(loc='upper left')
# plt.title('How many inaccessibility errors found?')
plt.xlabel('Number of bins')
plt.ylabel('Avg. inconsistencies per bin')
fig.savefig('scatter_error_prevalence.pdf', bbox_inches="tight")
x.append(110)
x_cd.append(110)
y.append(2120/58)
y_cd.append(7372/166) # cat bt-diffresults-contd.txt | awk -F* {'print $1'} | uniq -c | sort | awk {'print $1'} | python -c "import sys; print(sum(int(l) for l in sys.stdin))"
print(np.corrcoef(x,y), "--inac")
print(np.corrcoef(x_cd,y_cd), "--cd")
print(statistics.mean(y_cd), "cd")
print(statistics.mean(y), "ca")
print("SAVING scatter_error_prevalence.pdf...")
# exit(0)
# FIGURE 4C - POPULARITY VS PREVALENCE - BOXPLOT
# error_num = {}
# files = ["analysis-data/v2Results/top100k/top-diffresults-contd.txt"]
# for f in files:
# with open(f) as diff_r:
# for line in diff_r.readlines():
# items = line.split("***")
# domain = items[0].strip()
# if domain not in error_num:
# error_num[domain] = 1
# else:
# error_num[domain] += 1
# bins_wanted = 50
# div_num = len(alexa_hosts) / bins_wanted
# bins = {}
# for i in range(1, bins_wanted + 1):
# bins[i] = []
# for host in error_num:
# rank = find_rank(host.replace("www.", ""))
# bins[ math.ceil(rank/div_num)].append(error_num[host])
# print("*bins*")
#
# x_cd = []
# y_cd = []
# box_plot_data_cd = []
# y_err = []
# for bin in bins:
# x_cd.append(bin)
# y_cd.append(statistics.mean(bins[bin]))
# box_plot_data_cd.append(bins[bin])
# try:
# y_err.append(statistics.stdev(bins[bin]))
# except:
# print(bin)
# err = []
# for dom in error_num:
# err.append(error_num[dom])
# print(statistics.mean(err), "hi-cd")
#
# error_num = {}
# files = ["analysis-data/v2Results/top100k/inacresults-without-timeout.txt"]
# for f in files:
# with open(f) as diff_r:
# for line in diff_r.readlines():
# items = line.split("***")
# domain = items[0].strip()
# if domain not in error_num:
# error_num[domain] = 1
# else:
# error_num[domain] += 1
# err = []
# for dom in error_num:
# err.append(error_num[dom])
# print(statistics.mean(err), "hi-ca")
# print(err)
# print(len(err))
# bins_wanted = 50
# div_num = len(alexa_hosts) / bins_wanted
# bins = {}
# for i in range(1, bins_wanted + 1):
# bins[i] = []
# for host in error_num:
# rank = find_rank(host.replace("www.", ""))
# bins[ math.ceil(rank/div_num)].append(error_num[host])
# print("*bins*")
#
# box_plot_data_inc = []
#
# x = []
# y = []
# y_err = []
# for bin in bins:
# x.append(bin)
# y.append(statistics.mean(bins[bin]))
# box_plot_data_inc.append(bins[bin])
# try:
# y_err.append(statistics.stdev(bins[bin]))
# except:
# print(bin)
# # cdf(err, "Number of content-unavailability errors", "Ratio", "CDF for errors found", save=False)
# fig = plt.figure()
# ax = fig.gca()
#
# plt.boxplot(box_plot_data_inc, showfliers=False)
#
# ax.xaxis.set_tick_params(width=2)
# #ax.yaxis.set_tick_params(width=2)
# #plt.grid(linestyle='dotted', c="#393b3d")
# #plt.xticks(rotation=35)
# #plt.plot(x, y, label="Content unavailabilities", linewidth=2, zorder=1)
# #plt.plot(x_cd, y_cd, label="Content differences", linewidth=2, zorder=1)
# #plt.scatter(110, 2120/58, s=80, c='#1f77b4', marker="o", zorder=2)
# #plt.scatter(110, 7372/166, s=80, c='#ff7f0e', marker="o", zorder=2)
# x_ticks_org = list(np.arange(0, 50, 25))
# x_ticks_org.append(50)
# x_ticks_mod = list(np.arange(0, 50, 25))
# x_ticks_mod.append(50)
# plt.xticks(x_ticks_org, x_ticks_mod)
# # locs, labels = plt.xticks()
# # plt.setp(labels[6], rotation=90)
# # plt.errorbar(x, y, yerr=y_err, label="", fmt='o', ecolor='black',capsize=1, capthick=1)
# plt.legend(loc='upper left')
# plt.title('Alexa rank vs inconsistencies prevalence')
# plt.xlabel('Number of bins')
# plt.ylabel('Content unavailabilities')
# fig.savefig('boxplot_error_prevalence_un.pdf', bbox_inches="tight")
# exit(0)