  We present the first effort to aggregate, homogenize, and uniformly model the
combined ultraviolet, optical, and near-infrared dataset for the
electromagnetic counterpart of the binary neutron star merger GW170817. By
assembling all of the available data from 18 different papers and 46 different
instruments, we are able to identify and mitigate systematic offsets between
individual datasets, and to identify clear outlying measurements, with the
resulting pruned and adjusted dataset offering an opportunity to expand the
study of the kilonova. The unified dataset includes 647 individual flux
measurements, spanning 0.45 to 29.4 days post-merger, and thus has greater
constraining power for physical models than any single dataset. We test a
number of semi-analytical models and find that the data are well modeled with a
three-component kilonova model: a "blue" lanthanide-poor component with
Mej~0.020 Msol and vej~0.27c; an intermediate opacity "purple" component with
Mej~0.047 Msol and vej~0.15c; and a "red" lanthanide-rich component with
Mej~0.011 Msol and vej~0.14c. We further explore the possibility of ejecta
asymmetry and its impact on the estimated parameters. From the inferred
parameters we draw conclusions about the physical mechanisms responsible for
the various ejecta components, the properties of the neutron stars, and,
combined with an up-to-date merger rate, the implications for r-process
enrichment via this channel. To facilitate future studies of this keystone
event we make the unified dataset and our modeling code public.
