Commit a1fdfc80 authored by Adam Reichold's avatar Adam Reichold
Browse files

Commit survey results for investigation into niche overlap.

parent 8951892f
Pipeline #61498 passed with stage
in 6 minutes and 31 seconds
......@@ -3,3 +3,4 @@
__pycache__
/src/**/*.rs
/documents/**/*.pdf
/documents/**/*.png
This diff is collapsed.
import os
import sys
import itertools
import multiprocessing
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.colors import Normalize
from matplotlib.cm import ScalarMappable
import rpy2.robjects as robjects
from rpy2.rinterface_lib import callbacks
script_dir = os.path.realpath(os.path.dirname(__file__))
sys.path.append(f"{script_dir}/../../measurements")
from contacts import read_contacts
weights = [0, -1400, -700, -300, -200, 100, 200, 400]
prevalence = 0.8
strength = 1
infections = [0.5, 1, 3]
contamination = 0
decontaminations = [0.05, 0.1, 1, 3]
recoveries = [0.2, 1, 2, 3]
runs = 25
# r = robjects.r
# callbacks.consolewrite_print = lambda s: None
# callbacks.consolewrite_warnerror = lambda s: None
# r("library(bipartite)")
def load_data(args):
weight, infection, decontamination, recovery = args
niche_overlap = []
prevalence = []
for run in range(1, runs + 1):
dir_name = f"survey/niche_overlap_{weight}_{infection}_{decontamination}_{recovery}_{run}"
# bipartite's niche.overlap.HL
# r["source"](f"{dir_name}/bipartite.R")
# niche_overlap.append(r('networklevel(contacts)[["niche.overlap.HL"]]')[0])
# share of shared, i.e. number of contacts on shared plant species over number of contacts
contacts = read_contacts(f"{dir_name}/contacts.log")
niche_overlap.append(contacts[-1, -1] / np.sum(contacts, axis=0)[-1])
prevalence.append(pd.read_csv(f"{dir_name}/prevalence.csv", header=None)[-30:])
niche_overlap = np.array(niche_overlap)
niche_overlap = (
np.mean(niche_overlap),
np.quantile(niche_overlap, 0.05),
np.quantile(niche_overlap, 0.95),
)
prevalence = pd.concat(prevalence)
prevalence = (
prevalence[3].mean(),
prevalence[3].quantile(0.05),
prevalence[3].quantile(0.95),
)
return (weight, niche_overlap, infection, decontamination, recovery, prevalence)
def load_all_data():
with multiprocessing.Pool() as pool:
weight = []
niche_overlap = []
niche_overlap_lower = []
niche_overlap_upper = []
infection = []
decontamination = []
recovery = []
prevalence = []
prevalence_lower = []
prevalence_upper = []
data = pool.imap_unordered(
load_data,
itertools.product(weights, infections, decontaminations, recoveries),
)
for data in data:
weight.append(data[0])
niche_overlap.append(data[1][0])
niche_overlap_lower.append(data[1][1])
niche_overlap_upper.append(data[1][2])
infection.append(data[2])
decontamination.append(data[3])
recovery.append(data[4])
prevalence.append(data[5][0])
prevalence_lower.append(data[5][1])
prevalence_upper.append(data[5][2])
df = pd.DataFrame(
{
"weight": weight,
"niche_overlap": niche_overlap,
"niche_overlap_lower": niche_overlap_lower,
"niche_overlap_upper": niche_overlap_upper,
"infection": infection,
"decontamination": decontamination,
"recovery": recovery,
"prevalence": prevalence,
"prevalence_lower": prevalence_lower,
"prevalence_upper": prevalence_upper,
}
)
return df
# df = load_all_data()
# df.to_csv("survey.csv", index=False)
df = pd.read_csv("survey.csv")
fig, axes = plt.subplots(4, 4, figsize=(4 * 6.4, 4 * 4.8))
for (i, decontamination) in enumerate(decontaminations):
df1 = df[df["decontamination"] == decontamination]
for (j, recovery) in enumerate(recoveries):
df2 = df1[df1["recovery"] == recovery]
axis = axes[j, i]
axis.set_ylim(0, 1)
axis.set_title(f"decont={3 / decontamination:.0f}h, recov={3 / recovery:.0f}d")
for infection in infections:
df3 = df2[df2["infection"] == infection]
axis.errorbar(
df3["niche_overlap"],
df3["prevalence"],
xerr=(
df3["niche_overlap"] - df3["niche_overlap_lower"],
df3["niche_overlap_upper"] - df3["niche_overlap"],
),
yerr=(
df3["prevalence"] - df3["prevalence_lower"],
df3["prevalence_upper"] - df3["prevalence"],
),
label=f"infection={infection * 3:.1f}%",
)
if decontamination == 1 and recovery == 1:
axis.legend()
for spine in axis.spines.values():
spine.set_linewidth(2)
if i == 0:
axis.set_ylabel("prevalence / 1")
if j == len(recoveries) - 1:
axis.set_xlabel("niche overlap / 1")
fig.supxlabel(
"⟶ Decreasing mean decontamination time 60h, 30h, 3h, 1h", size=32, y=0.97
)
fig.supylabel("Decreasing mean recovery time 1d, 2d, 3d, 15d ⟵", size=32, x=0.03)
fig.tight_layout(rect=(0.03, 0, 1, 0.97))
fig.savefig("survey_decont_by_recov.png")
fig, axes = plt.subplots(4, 4, figsize=(4 * 6.4, 4 * 4.8))
for (i, decontamination) in enumerate(decontaminations):
df1 = df[df["decontamination"] == decontamination]
for (j, recovery) in enumerate(recoveries):
df2 = df1[df1["recovery"] == recovery]
axis = axes[j, i]
axis.set_title(f"decont={3 / decontamination:.0f}h, recov={3 / recovery:.0f}d")
X, Y = np.meshgrid(df2["weight"].unique(), infections, indexing="ij")
X = X.astype(np.float64)
Z = np.empty_like(X)
for (x, weight) in enumerate(df2["weight"].unique()):
for (y, infection) in enumerate(infections):
df3 = df2[(df2["weight"] == weight) & (df2["infection"] == infection)]
X[x, y] = df3.iloc[0]["niche_overlap"]
Y[x, y] = infection * 3
Z[x, y] = df3.iloc[0]["prevalence"]
plot = axis.contourf(X, Y, Z, vmin=0, vmax=1)
if decontamination == 1 and recovery == 1:
colorbar = fig.colorbar(
ScalarMappable(norm=Normalize(vmin=0, vmax=1), cmap=plot.cmap),
ax=axis,
label="prevalence / 1",
)
for spine in axis.spines.values():
spine.set_linewidth(2)
if i == 0:
axis.set_ylabel("infection / %")
if j == len(recoveries) - 1:
axis.set_xlabel("niche overlap / 1")
fig.supxlabel(
"⟶ Decreasing mean decontamination time 60h, 30h, 3h, 1h", size=32, y=0.97
)
fig.supylabel("Decreasing mean recovery time 1d, 2d, 3d, 15d ⟵", size=32, x=0.03)
fig.tight_layout(rect=(0.03, 0, 1, 0.97))
fig.savefig("survey_contourf_decont_by_recov.png")
fig, axes = plt.subplots(4, 3, figsize=(3 * 6.4, 4 * 4.8))
for (i, infection) in enumerate(infections):
df1 = df[df["infection"] == infection]
for (j, recovery) in enumerate(recoveries):
df2 = df1[df1["recovery"] == recovery]
axis = axes[j, i]
axis.set_ylim(0, 1)
axis.set_title(f"inf = {infection * 3:.1f}%, recov={3 / recovery:.0f}d")
for decontamination in decontaminations:
df3 = df2[df2["decontamination"] == decontamination]
axis.errorbar(
df3["niche_overlap"],
df3["prevalence"],
xerr=(
df3["niche_overlap"] - df3["niche_overlap_lower"],
df3["niche_overlap_upper"] - df3["niche_overlap"],
),
yerr=(
df3["prevalence"] - df3["prevalence_lower"],
df3["prevalence_upper"] - df3["prevalence"],
),
label=f"decont={3 / decontamination:.0f}h",
)
if infection == 1 and recovery == 1:
axis.legend()
for spine in axis.spines.values():
spine.set_linewidth(2)
if i == 0:
axis.set_ylabel("prevalence / 1")
if j == len(recoveries) - 1:
axis.set_xlabel("niche overlap / 1")
fig.supxlabel("⟶ Increasing infection probability 1.5%, 3%, 9%", size=32, y=0.97)
fig.supylabel("Decreasing mean recovery time 1d, 2d, 3d, 15d ⟵", size=32, x=0.03)
fig.tight_layout(rect=(0.03, 0, 1, 0.97))
fig.savefig("survey_inf_by_recov.png")
fig, axes = plt.subplots(4, 3, figsize=(3 * 6.4, 4 * 4.8))
for (i, infection) in enumerate(infections):
df1 = df[df["infection"] == infection]
for (j, recovery) in enumerate(recoveries):
df2 = df1[df1["recovery"] == recovery]
axis = axes[j, i]
axis.set_title(f"inf = {infection * 3:.1f}%, recov={3 / recovery:.0f}d")
X, Y = np.meshgrid(df2["weight"].unique(), decontaminations, indexing="ij")
X = X.astype(np.float64)
Z = np.empty_like(X)
for (x, weight) in enumerate(df2["weight"].unique()):
for (y, decontamination) in enumerate(decontaminations):
df3 = df2[(df2["weight"] == weight) & (df2["decontamination"] == decontamination)]
X[x, y] = df3.iloc[0]["niche_overlap"]
Y[x, y] = 3 / decontamination
Z[x, y] = df3.iloc[0]["prevalence"]
plot = axis.contourf(X, Y, Z, vmin=0, vmax=1)
if infection == 1 and recovery == 1:
colorbar = fig.colorbar(
ScalarMappable(norm=Normalize(vmin=0, vmax=1), cmap=plot.cmap),
ax=axis,
label="prevalence / 1",
)
for spine in axis.spines.values():
spine.set_linewidth(2)
if i == 0:
axis.set_ylabel("decont / h")
if j == len(recoveries) - 1:
axis.set_xlabel("niche overlap / 1")
fig.supxlabel("⟶ Increasing infection probability 1.5%, 3%, 9%", size=32, y=0.97)
fig.supylabel("Decreasing mean recovery time 1d, 2d, 3d, 15d ⟵", size=32, x=0.03)
fig.tight_layout(rect=(0.03, 0, 1, 0.97))
fig.savefig("survey_contourf_inf_by_recov.png")
weights = [0, -1400, -700, -300, -200, 100, 200, 400]
prevalence = 0.8
strength = 1
infections = [0.5, 1, 3]
contamination = 0
decontaminations = [0.05, 0.1, 1, 3]
recoveries = [0.2, 1, 2, 3]
runs = 25
seed = 0
for weight in weights:
for infection in infections:
for decontamination in decontaminations:
for recovery in recoveries:
for run in range(1, runs + 1):
print(
f"niche_overlap_{weight}_{infection}_{decontamination}_{recovery}_{run}\t{weight} {prevalence} {strength} {infection} {contamination} {decontamination} {recovery} {seed}"
)
seed += 1
contacts <- rbind(
c(1071226, 0),
c(0, 4431169),
c(16234153, 32362031))
contacts =
1071226 0
0 4431169
16234153 32362031
contact_durations =
674537 1834 1885 1881 1866 1891 1882 1867 1966 1956 1930 1922 1807 1884 1813 1901 1888 1873 1867 1859 1915 1880 1872 1763 1798 1795 1905 1811 1798 1793 1846 1863 1787 1820 1831 1809 1887 1719 1803 1805 1710 1837 1815 1834 1805 1765 1753 1713 1828 1872 1729 1737 1758 1890 1749 1751 1643 1699 1778 1648 1713 1696 1732 1714 1756 1636 1623 1691 1721 1683 1732 1605 1760 1674 1685 1658 1618 1660 1709 1624 1606 1559 1637 1716 1562 1690 1632 1621 1628 1596 1605 1712 1640 1600 1574 1576 1575 1626 1632 1466 1519 1628 1488 1459 1591 1472 1437 1474 1433 1500 1387 1357 1368 1403 1393 1287 1309 1319 1374 1302 1253 1121 1282 1244 1197 1220 1305 1185 1350 1215 1199 1190 1222 1269 1087 1283 1249 1265 1320 1208 1415 1141 1417 1432 1497 1278 1383 1452 1277 1388 1325 1406 1689 1528 1721 1513 1642 1462 1344 1905 1540 1664 1503 1558 1726 1868 2057 1881 1709 1901 1626 1696 1741 1715 2393 2160 2375 2027 1909 2144 2310 2318 2340 1931 2343 2357 2031 2333 2052 1787 2190 2133 2151 2360 2410 2465 2247 1926 2263 1964 1966 1945 1883 1975 1908 1971 1694 1921 1640 1553 1687 1769 1320 1483 1650 1550 1691 1680 1442 1251 1143 1373 1239 1269 1186 1061 1095 912 845 853 769 897 610 563 797 590 616 525 564 535 574 481 365 632 382 379 397 240 511 339 349 219 229 156 180 153 225 178 174 220 185 155 206 111 124 141 61 134 54 30 61 37 55 114 82 47 3 39 15 27 13 61 11 16 11 1 1 1 1 0 21 1 0 14 6 16 7 0 0 0 11
0
contact_durations =
0
3289062 6364 6474 6391 6486 6434 6428 6333 6411 6440 6317 6133 6361 6195 6534 6259 6442 6428 6186 6371 6263 6257 6313 6392 6189 6191 6243 6272 6200 6242 6188 6243 6377 6252 6222 6085 6152 6056 6182 6114 6120 6057 6107 6193 5966 5923 6086 5949 5918 6043 5998 5922 5857 5975 5959 5956 6038 6077 5865 5993 5865 5888 5930 5713 5788 5671 5887 5727 5722 5767 5733 5788 5523 5619 5709 5560 5701 5693 5750 5536 5495 5729 5742 5607 5383 5649 5488 5520 5416 5523 5478 5575 5491 5377 5323 5559 5553 5243 5272 5161 5261 5248 5130 4801 5036 5018 4899 4735 4761 4812 4576 4529 4404 4366 4396 4268 4167 4205 4248 4210 4092 4018 4098 4006 3817 3882 3764 3731 3811 3625 3788 3637 3969 3609 3565 3687 3588 3972 3626 3707 3574 3985 3505 3313 3583 3545 3600 3681 3627 3712 3727 3975 4179 3883 4201 4102 4346 4235 4086 3840 4524 4079 4406 4545 4705 4218 4858 4485 4429 4837 4435 4521 4470 4924 4726 4812 4904 4530 4512 4912 4963 4629 5039 5326 4422 4645 4842 5125 4621 5074 5380 4776 4739 4509 4382 4470 4863 4380 4369 4353 4186 4296 3850 4627 4214 3504 3528 3341 3835 3948 3439 3306 3199 3459 3097 3331 2996 2759 2905 2328 2705 2763 2279 2312 2045 1887 2301 1600 1762 1801 1960 1659 1354 1465 1412 1165 1182 1270 1054 1075 914 958 805 848 868 353 681 613 546 552 493 402 514 308 394 405 374 276 259 425 381 228 172 243 190 261 206 240 91 175 177 85 97 90 153 72 64 137 44 106 106 97 98 12 33 35 13 65 20 1 1 27 22 1 0 3 1 19 18 14 4 2 21 6 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
contact_durations =
12885857 20291 20603 20889 20539 20892 20549 20563 20591 20604 20466 20689 20696 20671 20219 20271 20669 20631 20394 20244 20376 20272 20490 20064 20280 20433 20343 20018 20300 20278 20233 20197 19993 20014 19933 20056 19770 19475 19871 19671 19779 19701 19746 19430 19226 19565 19559 19658 19209 19560 19355 19208 19517 19134 19057 18981 19149 19130 19211 18906 19228 18950 18890 19043 18879 18677 18723 18524 18452 18475 18282 18462 18397 18203 18390 18183 18070 17877 17996 17961 18012 17841 17800 17813 18023 17847 17636 18009 17607 17587 17602 17622 17128 17180 17111 16918 16865 16899 16749 16241 16163 16064 16060 15747 15434 15145 15145 14810 14551 14502 14164 14046 13899 13523 13183 13103 13171 12752 12763 12530 12235 12067 12046 12088 11933 11680 11780 11641 11178 11214 11226 10939 10900 10861 10727 10806 10636 10482 10788 10665 10456 10243 10363 10444 10374 10424 10260 10537 10544 10599 10325 10474 10361 10768 10170 10999 10853 10600 10720 11403 10658 11190 11105 11213 10851 11405 11146 11810 12145 11750 11319 11526 11596 11919 11798 12260 11719 11758 12048 12254 11594 11906 11969 11878 11854 12183 11641 11246 11358 11703 11395 11153 11074 10729 11056 10500 10261 10546 10413 9736 9934 9748 9490 9453 8908 8822 8523 8445 8465 7837 8088 7845 7603 7303 7054 6886 6414 6457 5831 5908 5444 5353 5093 4995 4837 4485 4637 4163 4007 3813 3738 3686 3606 3176 3167 3002 2790 2762 2431 2286 2101 2097 1997 1965 1672 1724 1568 1573 1495 1223 1257 1082 1115 1020 1002 927 818 869 779 615 504 669 535 472 355 444 315 416 291 390 307 232 302 273 238 172 141 159 117 150 159 124 126 95 85 71 71 89 82 62 53 60 48 27 35 27 28 24 17 2 11 15 18 23 7 9 11 2 9 5 3 2 5 7 1 0 0 0 7 0 1 8 1
25753344 39927 41506 41199 41115 41479 41288 41347 41154 41163 41095 41215 41010 40763 40862 40868 40730 40619 41004 40634 40302 40560 40542 40389 40097 39953 40270 40102 40042 40144 39697 40219 40417 39654 39503 39669 39590 39460 39457 39380 39405 39186 39049 38713 38711 38613 38851 38594 38994 38703 38780 38377 38341 38543 38104 37703 38154 38109 38028 38197 37950 37475 37805 37489 37060 37092 37459 37271 36758 36901 36648 36276 36117 36269 35892 35821 35928 35774 35586 35707 35497 35242 35360 35288 35371 35041 34905 35015 34948 34619 34545 34723 34009 33629 34050 33955 33485 33087 33045 32566 32382 32270 31528 31056 30838 30250 29634 29465 29213 28813 28369 27644 27375 27088 26666 26058 25834 25303 24717 24812 23978 23997 23681 23471 23398 22766 22500 22257 22368 21949 21944 21482 21599 21074 21354 21552 20897 20473 20787 20753 20629 20178 20321 20482 20352 20367 20291 20753 20611 20593 20260 20686 20191 21014 20157 21224 21412 20362 21343 21995 21041 21916 21786 21865 21408 21921 22493 22747 23646 22467 22263 22593 22806 23275 22826 24153 23015 23253 23599 23664 22435 23053 23086 22782 23020 23778 22294 21554 22542 22731 21977 21894 21510 20728 21492 20361 20017 20746 19882 18935 19232 18778 18381 18316 17608 17169 16352 16415 16456 14966 15426 15197 14282 14341 13436 13240 12701 12549 11412 11446 10473 10438 9861 9608 9514 8660 8805 7887 7900 7629 6927 7255 7164 6337 6046 5725 5445 5471 4636 4413 4137 4102 3845 3638 3272 3407 2996 3106 2840 2196 2656 2121 2132 2059 1881 1711 1594 1592 1541 1220 1063 1331 1058 955 665 895 623 886 499 702 589 454 572 471 384 299 237 273 230 287 300 248 227 167 183 117 130 163 163 83 85 104 103 39 62 68 40 39 52 7 33 17 33 42 20 15 19 3 19 15 11 7 3 15 0 0 0 0 11 0 7 9 4
1, 0.359, 0.805, 0.139, 0.0081, 0.0161, 0.0000, 0.0087
2, 0.505, 0.805, 0.357, 0.0120, 0.0228, 0.0000, 0.0130
3, 0.648, 0.805, 0.570, 0.0147, 0.0279, 0.0000, 0.0159
4, 0.742, 0.805, 0.711, 0.0164, 0.0311, 0.0000, 0.0177
5, 0.806, 0.805, 0.807, 0.0177, 0.0336, 0.0000, 0.0190
6, 0.837, 0.805, 0.853, 0.0184, 0.0356, 0.0000, 0.0198
7, 0.859, 0.805, 0.887, 0.0190, 0.0367, 0.0000, 0.0204
8, 0.871, 0.805, 0.904, 0.0193, 0.0370, 0.0000, 0.0207
9, 0.873, 0.805, 0.906, 0.0195, 0.0371, 0.0000, 0.0210
10, 0.876, 0.805, 0.911, 0.0197, 0.0378, 0.0000, 0.0212
11, 0.879, 0.805, 0.916, 0.0199, 0.0381, 0.0000, 0.0214
12, 0.880, 0.805, 0.918, 0.0199, 0.0382, 0.0000, 0.0215
13, 0.882, 0.805, 0.920, 0.0200, 0.0382, 0.0000, 0.0215
14, 0.880, 0.805, 0.918, 0.0200, 0.0382, 0.0000, 0.0215
15, 0.878, 0.805, 0.915, 0.0200, 0.0385, 0.0000, 0.0215
16, 0.879, 0.805, 0.915, 0.0200, 0.0385, 0.0000, 0.0215
17, 0.879, 0.805, 0.915, 0.0200, 0.0388, 0.0000, 0.0215
18, 0.880, 0.805, 0.917, 0.0200, 0.0386, 0.0000, 0.0215
19, 0.876, 0.805, 0.911, 0.0200, 0.0382, 0.0000, 0.0216
20, 0.877, 0.805, 0.913, 0.0200, 0.0383, 0.0000, 0.0215
21, 0.879, 0.805, 0.916, 0.0200, 0.0387, 0.0000, 0.0215
22, 0.877, 0.805, 0.913, 0.0200, 0.0386, 0.0000, 0.0215
23, 0.876, 0.805, 0.912, 0.0200, 0.0386, 0.0000, 0.0215
24, 0.879, 0.805, 0.915, 0.0200, 0.0387, 0.0000, 0.0215
25, 0.879, 0.805, 0.915, 0.0200, 0.0387, 0.0000, 0.0215
26, 0.876, 0.805, 0.912, 0.0201, 0.0384, 0.0000, 0.0216
27, 0.877, 0.805, 0.913, 0.0201, 0.0384, 0.0000, 0.0216
28, 0.877, 0.805, 0.913, 0.0200, 0.0383, 0.0000, 0.0216
29, 0.877, 0.805, 0.913, 0.0200, 0.0380, 0.0000, 0.0216
30, 0.876, 0.805, 0.911, 0.0201, 0.0381, 0.0000, 0.0216
31, 0.876, 0.805, 0.911, 0.0200, 0.0380, 0.0000, 0.0216
32, 0.878, 0.805, 0.914, 0.0200, 0.0380, 0.0000, 0.0216
33, 0.877, 0.805, 0.913, 0.0200, 0.0385, 0.0000, 0.0216
34, 0.879, 0.805, 0.916, 0.0200, 0.0382, 0.0000, 0.0216
35, 0.877, 0.805, 0.913, 0.0201, 0.0388, 0.0000, 0.0216
36, 0.878, 0.805, 0.914, 0.0200, 0.0388, 0.0000, 0.0215
37, 0.877, 0.805, 0.913, 0.0201, 0.0387, 0.0000, 0.0216
38, 0.880, 0.805, 0.917, 0.0201, 0.0385, 0.0000, 0.0216
39, 0.880, 0.805, 0.917, 0.0200, 0.0387, 0.0000, 0.0215
40, 0.878, 0.805, 0.914, 0.0200, 0.0383, 0.0000, 0.0215
41, 0.881, 0.805, 0.918, 0.0199, 0.0384, 0.0000, 0.0214
42, 0.877, 0.805, 0.913, 0.0200, 0.0381, 0.0000, 0.0215
43, 0.875, 0.805, 0.910, 0.0200, 0.0383, 0.0000, 0.0215
44, 0.877, 0.805, 0.913, 0.0200, 0.0381, 0.0000, 0.0215
45, 0.878, 0.805, 0.915, 0.0201, 0.0382, 0.0000, 0.0216
46, 0.881, 0.805, 0.919, 0.0200, 0.0381, 0.0000, 0.0216
47, 0.885, 0.805, 0.925, 0.0200, 0.0385, 0.0000, 0.0216
48, 0.885, 0.805, 0.925, 0.0200, 0.0385, 0.0000, 0.0215
49, 0.880, 0.805, 0.917, 0.0200, 0.0383, 0.0000, 0.0215
50, 0.880, 0.805, 0.917, 0.0200, 0.0385, 0.0000, 0.0215
51, 0.877, 0.805, 0.912, 0.0200, 0.0384, 0.0000, 0.0215
52, 0.877, 0.805, 0.913, 0.0200, 0.0382, 0.0000, 0.0215
53, 0.876, 0.805, 0.911, 0.0200, 0.0383, 0.0000, 0.0216
54, 0.874, 0.805, 0.908, 0.0200, 0.0390, 0.0000, 0.0215
55, 0.876, 0.805, 0.912, 0.0200, 0.0385, 0.0000, 0.0215
56, 0.878, 0.805, 0.915, 0.0200, 0.0387, 0.0000, 0.0215
57, 0.878, 0.805, 0.914, 0.0200, 0.0389, 0.0000, 0.0215
58, 0.879, 0.805, 0.916, 0.0200, 0.0386, 0.0000, 0.0215
59, 0.877, 0.805, 0.913, 0.0200, 0.0383, 0.0000, 0.0215
60, 0.878, 0.805, 0.914, 0.0200, 0.0386, 0.0000, 0.0215
61, 0.880, 0.805, 0.917, 0.0200, 0.0385, 0.0000, 0.0215
62, 0.879, 0.805, 0.916, 0.0200, 0.0384, 0.0000, 0.0215
63, 0.878, 0.805, 0.915, 0.0200, 0.0384, 0.0000, 0.0215
64, 0.876, 0.805, 0.912, 0.0200, 0.0382, 0.0000, 0.0215
65, 0.875, 0.805, 0.909, 0.0200, 0.0382, 0.0000, 0.0215
66, 0.875, 0.805, 0.910, 0.0200, 0.0381, 0.0000, 0.0215
67, 0.877, 0.805, 0.913, 0.0200, 0.0379, 0.0000, 0.0216
68, 0.877, 0.805, 0.912, 0.0201, 0.0382, 0.0000, 0.0216
69, 0.883, 0.805, 0.922, 0.0200, 0.0378, 0.0000, 0.0216
70, 0.882, 0.805, 0.920, 0.0200, 0.0382, 0.0000, 0.0216
71, 0.875, 0.805, 0.910, 0.0200, 0.0382, 0.0000, 0.0216
72, 0.877, 0.805, 0.912, 0.0200, 0.0384, 0.0000, 0.0215
73, 0.882, 0.805, 0.920, 0.0200, 0.0382, 0.0000, 0.0215
74, 0.878, 0.805, 0.915, 0.0200, 0.0382, 0.0000, 0.0215
75, 0.874, 0.805, 0.908, 0.0200, 0.0381, 0.0000, 0.0216
76, 0.882, 0.805, 0.920, 0.0200, 0.0382, 0.0000, 0.0216
77, 0.883, 0.805, 0.922, 0.0200, 0.0382, 0.0000, 0.0215
78, 0.879, 0.805, 0.916, 0.0201, 0.0379, 0.0000, 0.0216
79, 0.875, 0.805, 0.910, 0.0201, 0.0379, 0.0000, 0.0216
80, 0.878, 0.805, 0.915, 0.0201, 0.0382, 0.0000, 0.0217
81, 0.875, 0.805, 0.910, 0.0201, 0.0383, 0.0000, 0.0216
82, 0.877, 0.805, 0.913, 0.0200, 0.0381, 0.0000, 0.0216
83, 0.875, 0.805, 0.910, 0.0200, 0.0382, 0.0000, 0.0216
84, 0.878, 0.805, 0.915, 0.0200, 0.0380, 0.0000, 0.0216
85, 0.875, 0.805, 0.910, 0.0200, 0.0383, 0.0000, 0.0215
86, 0.879, 0.805, 0.916, 0.0200, 0.0380, 0.0000, 0.0216
87, 0.875, 0.805, 0.910, 0.0200, 0.0381, 0.0000, 0.0216
88, 0.877, 0.805, 0.913, 0.0200, 0.0383, 0.0000, 0.0215
89, 0.876, 0.805, 0.911, 0.0200, 0.0382, 0.0000, 0.0216
90, 0.880, 0.805, 0.917, 0.0200, 0.0384, 0.0000, 0.0215
91, 0.882, 0.805, 0.921, 0.0200, 0.0383, 0.0000, 0.0215
92, 0.878, 0.805, 0.915, 0.0200, 0.0382, 0.0000, 0.0216
93, 0.878, 0.805, 0.914, 0.0201, 0.0381, 0.0000, 0.0216
94, 0.880, 0.805, 0.917, 0.0201, 0.0384, 0.0000, 0.0217
95, 0.881, 0.805, 0.919, 0.0201, 0.0383, 0.0000, 0.0216
96, 0.875, 0.805, 0.910, 0.0200, 0.0384, 0.0000, 0.0216
97, 0.875, 0.805, 0.910, 0.0201, 0.0383, 0.0000, 0.0216
98, 0.876, 0.805, 0.911, 0.0200, 0.0384, 0.0000, 0.0216
99, 0.878, 0.805, 0.914, 0.0200, 0.0387, 0.0000, 0.0215
100, 0.878, 0.805, 0.914, 0.0200, 0.0388, 0.0000, 0.0215
101, 0.879, 0.805, 0.916, 0.0200, 0.0388, 0.0000, 0.0215
102, 0.873, 0.805, 0.907, 0.0201, 0.0386, 0.0000, 0.0216
103, 0.876, 0.805, 0.911, 0.0201, 0.0383, 0.0000, 0.0216
104, 0.876, 0.805, 0.912, 0.0201, 0.0382, 0.0000, 0.0216
105, 0.875, 0.805, 0.910, 0.0201, 0.0381, 0.0000, 0.0216
106, 0.878, 0.805, 0.915, 0.0201, 0.0378, 0.0000, 0.0216
107, 0.875, 0.805, 0.910, 0.0200, 0.0377, 0.0000, 0.0216
108, 0.876, 0.805, 0.911, 0.0200, 0.0382, 0.0000, 0.0216
109, 0.875, 0.805, 0.910, 0.0200, 0.0381, 0.0000, 0.0216
110, 0.878, 0.805, 0.914, 0.0200, 0.0379, 0.0000, 0.0215
111, 0.878, 0.805, 0.914, 0.0200, 0.0381, 0.0000, 0.0215
112, 0.877, 0.805, 0.913, 0.0200, 0.0380, 0.0000, 0.0216
113, 0.879, 0.805, 0.916, 0.0200, 0.0381, 0.0000, 0.0216
114, 0.880, 0.805, 0.918, 0.0200, 0.0382, 0.0000, 0.0216
115, 0.878, 0.805, 0.914, 0.0200, 0.0379, 0.0000, 0.0215
116, 0.877, 0.805, 0.913, 0.0200, 0.0379, 0.0000, 0.0215
117, 0.877, 0.805, 0.912, 0.0200, 0.0380, 0.0000, 0.0216
118, 0.878, 0.805, 0.914, 0.0200, 0.0381, 0.0000, 0.0215
119, 0.878, 0.805, 0.915, 0.0200, 0.0385, 0.0000, 0.0216
120, 0.879, 0.805, 0.916, 0.0200, 0.0386, 0.0000, 0.0216
contacts <- rbind(
c(1097390, 0),
c(0, 4393295),
c(16233647, 31826338))
contacts =
1097390 0
0 4393295
16233647 31826338
contact_durations =
691519 1878 1940 1933 1899 1912 1944 1929 1946 1898 1842 1928 1888 1803 1926 1915 1946 1887 1926 1960 1885 1918 1869 1905 1891 1902 1904 1958 1865 1931 1832 1877 1852 1793 1886 1862 1891 1851 1799 1801 1803 1869 1784 1828 1800 1823 1742 1905 1854 1905 1795 1836 1797 1779 1749 1733 1773 1746 1763 1710 1713 1780 1723 1791 1721 1705 1781 1712 1780 1707 1861 1664 1650 1784 1686 1706 1754 1590 1700 1731 1688 1742 1756 1708 1623 1703 1631 1661 1647 1651 1695 1715 1605 1670 1639 1698 1622 1646 1593 1586 1557 1620 1455 1539 1519 1516 1499 1504 1430 1432 1417 1439 1400 1409 1340 1364 1362 1372 1360 1366 1299 1322 1234 1209 1186 1224 1245 1158 1415 1200 1364 1322 1176 1203 1198 1248 1217 1169 1280 1221 1185 1246 1290 1249 1497 1296 1395 1525 1138 1445 1543 1532 1352 1273 1374 1487 1435 1471 1486 1528 1909 1703 2011 1771 1910 1970 2083 1780 1918 1905 2140 2081 2409 2164 1890 1822 2237 1976 2285 2218 2306 2302 2323 2286 2177 2268 1980 1967 2131 2180 2331 2326 2511 2599 2172 2390 2114 2114 2054 1894 2518 2159 2306 2040 2158 2109 2079 1625 1600 1612 1535 1801 2083 1476 1765 1522 1416 1115 1512 1133 1265 1202 1356 1196 1062 1118 1176 1182 874 969 956 793 757 480 676 549 907 594 573 369 535 525 547 397 430 447 279 352 358 383 166 316 289 264 339 151 201 241 133 208 190 158 218 82 118 104 18 120 115 107 39 49 79 99 32 47 23 1 29 1 40 27 29 16 41 2 0 14 9 0 15 23 2 24 15 1 11 0 0 27 18 0 9 0 0 0 0 0 0 8 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1
0
contact_durations =
0
3253587 6136 6577 6560 6285 6433 6400 6354 6428 6415 6404 6407 6498 6371 6406 6453 6494 6316 6210 6275 6427 6220 6182 6168 6179 6290 6111 6089 6350 6317 5986 6072 6201 6024 6050 6316 6048 6044 6090 6065 6091 6100 5986 6155 6101 6069 6175 5962 6104 6037 5851 5962 5961 5960 5907 5849 5917 5910 5843 5942 5879 5755 5856 5850 5745 5962 5782 5767 5650 5410 5632 5602 5521 5605 5681 5740 5641 5722 5429 5454 5595 5452 5510 5511 5558 5431 5679 5616 5532 5501 5460 5386 5382 5549 5438 5491 5290 5375 5153 5226 5119 5140 5108 4812 4999 4855 4667 4990 4803 4622 4661 4515 4419 4523 4294 4260 4469 4184 4206 4134 4049 3942 4075 3864 3791 3801 3870 3775 3764 3763 3746 3737 3549 3646 3577 3762 3656 3754 3561 3552 3890 3515 3450 3659 3480 3763 3695 3533 4072 3618 4106 4130 4039 3784 4013 4124 3979 4191 4245 4217 4033 4272 4170 4155 4262 4542 4553 4739 4802 4366 4847 4835 4954 4709 4906 4768 5320 4509 4536 4528 4860 5092 4573 4942 5018 4892 4839 4984 5309 4774 4529 4383 4489 5055 4291 4583 4601 4499 4978 4351 4387 4277 4296 4482 3971 3488 3640 3684 3943 3718 4154 2960 3091 3834 2928 2657 2753 2864 2650 3036 2364 2781 2604 1986 1802 2272 2121 2092 1580 1613 1723 1607 1562 1537 1361 1123 1269 1222 1289 1042 820 835 689 808 852 708 794 688 450 323 625 305 536 413 464 351 382 380 234 296 306 239 201 177 238 185 226 161 158 91 58 118 113 121 65 102 91 3 52 79 32 40 67 43 2 48 28 1 35 25 17 19 25 7 4 17 1 12 8 8 0 14 0 1 0 0 13 0 0 0 0 0 12 0 2 1 0 1 0 0 0 0 0 9
contact_durations =
12866159 20064 20834 20816 20769 20643 20624 20957 20852 20735 20678 20766 20889 20681 20565 20810 20514 20291 20381 20187 20265 20133 20353 19926 20096 20446 20532 20346 20211 20131 20062 19894 19937 19798 20158 20082 19890 19743 20101 19804 19927 20040 19539 19598 19437 19530 19500 19581 19604 19507 19344 19326 19449 19336 19018 19199 19377 19400 19157 19019 19162 19093 18994 18847 18804 18870 18784 18818 18459 18315 18425 18285 18554 18389 18042 18106 18243 17929 17996 18101 17913 17982 17864 17892 17885 17798 17624 17499 17543 17598 17492 17264 17582 17466 17201 17016 17037 16734 16546 16289 16310 16205 16314 15704 15409 15076 15244 15084 14665 14721 14442 14159 14099 13830 13488 13372 12943 12875 12910 12671 12474 12349 12221 11854 11725 11810 11711 11536 11311 11198 11214 11196 10969 10812 10611 10568 10789 10617 10741 10323 10628 10330 10454 10596 10401 10608 10169 10425 10544 10943 10495 10445 11031 10885 10347 10831 10734 10761 11100 10795 11048 11105 11064 11233 11333 11228 11807 11807 11596 12097 11415 11419 11300 11489 11696 11702 12101 12168 12041 12178 12002 11838 11376 12017 11980 11986 11304 11885 11607 12182 11434 11504 11319 11170 10977 10932 10716 11051 10250 10199 10008 10141 9573 9675 9410 9477 8944 8517 8256 8043 7897 8057 7573 7538 7312 7138 6441 6442 6163 6058 5743 5732 5302 5336 5188 4667 4314 4474 3882 4296 4069 3492 3655 3577 3310 3154 2923 2616 2541 2384 2224 2076 2044 1816 2043 1854 1644 1706 1467 1268 1292 1065 1047 974 872 955 786 739 743 635 705 596 511 355 422 461 429 369 370 300 300 283 243 235 190 155 160 177 185 109 140 148 102 98 84 95 64 82 70 40 46 37 51 42 46 30 37 36 20 19 12 26 2 12 9 11 15 4 1 16 0 7 0 8 3 4 4 0 4 8 4 0 0 0 2 3 0 1 0 0 0 0 0 0 1
25286343 39007 40769 40929 40543 40991 40996 40656 40621 40795 40269 40285 40393 40402 40302 40159 40379 39974 39850 39925 39979 39851 39945 39835 39935 39469 39682 39476 39153 39456 39433 39565 39059 39148 39039 39080 39284 39063 38721 38766 38487 38508 38454 38490 38278 38093 38400 38396 38013 38317 38116 38300 37583 37805 37739 37833 37605 37660 37353 37804 37351 37121 37248 37078 36874 36911 36213 36426 36339 35912 35967 35937 35814 35739 35918 35951 35560 35190 35307 34785 34960 34974 35060 35159 34875 34769 34881 34329 34061 34257 34034 34279 34088 33708 33538 33560 32988 32435 32237 32165 31605 31986 31211 30490 30531 29879 29498 29369 28690 28325 27908 27537 27276 26366 26289 26101 25471 25395 24724 24640 24363 24039 23649 23189 22940 22551 22283 22195 21564 21632 21611 21460 21234 21030 20825 20504 20395 20644 20533 20110 20403 19801 20212 20707 20185 20121 19866 20244 20426 21088 20811 20138 21041 21073 20078 21108 20649 20565 21003 20499 21000 21684 20868 21536 21926 21631 22589 22658 22287 23073 21995 22124 21721 21961 22388 22265 22779 22913 23240 23579 22770 22743 22172 22792 22701 23014 21609 22354 22128 23067 22127 21484 21562 20813 21271 21144 20459 20942 19972 19335 19154 19583 18035 18391 17847 18018 17036 16133 15917 15114 15361 15219 14378 14234 13489 13634 12489 12484 11989 11618 11022 10964 10154 9941 9904 9208 8285 8428 7325 8282 7724 6910 6909 6541 6323 5961 5529 5081 4801 4568 4164 3903 3912 3547 3826 3367 3018 3005 2700 2421 2512 2046 2098 1870 1614 1771 1556 1438 1481 1251 1400 1089 1051 700 835 898 789 651 690 540 558 514 489 486 317 317 351 353 338 238 269 260 198 194 154 175 113 149 123 71 99 78 109 68 67 91 64 61 32 36 30 71 17 19 20 26 12 11 3 22 1 19 2 9 5 11 4 0 2 11 11 1 0 0 0 28 0 2 0 0 0 0 0 0 8
1, 0.355, 0.790, 0.137, 0.0080, 0.0160, 0.0000, 0.0086
2, 0.504, 0.790, 0.361, 0.0119, 0.0222, 0.0000, 0.0128
3, 0.634, 0.790, 0.556, 0.0145, 0.0279, 0.0000, 0.0156
4, 0.739, 0.790, 0.713, 0.0163, 0.0316, 0.0000, 0.0175
5, 0.798, 0.790, 0.802, 0.0175, 0.0341, 0.0000, 0.0188
6, 0.830, 0.790, 0.850, 0.0183, 0.0352, 0.0000, 0.0197
7, 0.845, 0.790, 0.873, 0.0188, 0.0359, 0.0000, 0.0202
8, 0.863, 0.790, 0.900, 0.0192, 0.0365, 0.0000, 0.0206
9, 0.864, 0.790, 0.901, 0.0194, 0.0372, 0.0000, 0.0209
10, 0.866, 0.790, 0.903, 0.0197, 0.0377, 0.0000, 0.0212
11, 0.872, 0.790, 0.913, 0.0198, 0.0376, 0.0000, 0.0213
12, 0.869, 0.790, 0.909, 0.0198, 0.0375, 0.0000, 0.0213
13, 0.871, 0.790, 0.912, 0.0198, 0.0378, 0.0000, 0.0214
14, 0.872, 0.790, 0.913, 0.0198, 0.0374, 0.0000, 0.0213
15, 0.871, 0.790, 0.912, 0.0199, 0.0377, 0.0000, 0.0214
16, 0.875, 0.790, 0.917, 0.0199, 0.0377, 0.0000, 0.0214
17, 0.869, 0.790, 0.909, 0.0198, 0.0377, 0.0000, 0.0213
18, 0.870, 0.790, 0.911, 0.0199, 0.0378, 0.0000, 0.0214
19, 0.870, 0.790, 0.910, 0.0199, 0.0373, 0.0000, 0.0214
20, 0.869, 0.790, 0.909, 0.0199, 0.0380, 0.0000, 0.0214
21, 0.871, 0.790, 0.911, 0.0199, 0.0376, 0.0000, 0.0214
22, 0.867, 0.790, 0.906, 0.0199, 0.0381, 0.0000, 0.0214
23, 0.871, 0.790, 0.911, 0.0199, 0.0380, 0.0000, 0.0214
24, 0.868, 0.790, 0.908, 0.0199, 0.0383, 0.0000, 0.0214
25, 0.872, 0.790, 0.914, 0.0199, 0.0381, 0.0000, 0.0214
26, 0.877, 0.790, 0.921, 0.0198, 0.0383, 0.0000, 0.0213
27, 0.875, 0.790, 0.918, 0.0198, 0.0385, 0.0000, 0.0213
28, 0.873, 0.790, 0.914, 0.0198, 0.0382, 0.0000, 0.0213
29, 0.871, 0.790, 0.911, 0.0198, 0.0381, 0.0000, 0.0213
30, 0.871, 0.790, 0.911, 0.0198, 0.0381, 0.0000, 0.0213
31, 0.871, 0.790, 0.911, 0.0198, 0.0378, 0.0000, 0.0213
32, 0.867, 0.790, 0.906, 0.0198, 0.0381, 0.0000, 0.0213
33, 0.872, 0.790, 0.913, 0.0198, 0.0378, 0.0000, 0.0214
34, 0.870, 0.790, 0.911, 0.0199, 0.0380, 0.0000, 0.0214
35, 0.869, 0.790, 0.909, 0.0199, 0.0382, 0.0000, 0.0214
36, 0.870, 0.790, 0.909, 0.0199, 0.0380, 0.0000, 0.0214
37, 0.870, 0.790, 0.910, 0.0198, 0.0377, 0.0000, 0.0214
38, 0.869, 0.790, 0.908, 0.0199, 0.0379, 0.0000, 0.0214
39, 0.870, 0.790, 0.910, 0.0199, 0.0382, 0.0000, 0.0214
40, 0.870, 0.790, 0.910, 0.0198, 0.0380, 0.0000, 0.0213
41, 0.869, 0.790, 0.908, 0.0198, 0.0378, 0.0000, 0.0214
42, 0.868, 0.790, 0.908, 0.0198, 0.0379, 0.0000, 0.0214
43, 0.870, 0.790, 0.911, 0.0199, 0.0381, 0.0000, 0.0214
44, 0.871, 0.790, 0.912, 0.0199, 0.0386, 0.0000, 0.0213
45, 0.875, 0.790, 0.917, 0.0199, 0.0380, 0.0000, 0.0214
46, 0.871, 0.790, 0.911, 0.0199, 0.0382, 0.0000, 0.0214
47, 0.873, 0.790, 0.915, 0.0199, 0.0381, 0.0000, 0.0214
48, 0.876, 0.790, 0.919, 0.0199, 0.0380, 0.0000, 0.0214
49, 0.874, 0.790, 0.916, 0.0199, 0.0378, 0.0000, 0.0214
50, 0.