  This paper introduces an intuitive and easy-to-implement nonparametric
density estimator based on local polynomial techniques. The estimator is fully
boundary adaptive and automatic, but does not require pre-binning or any other
transformation of the data. We study the main asymptotic properties of the
estimator, and use these results to provide principled estimation, inference,
and bandwidth selection methods. As a substantive application of our results,
we develop a novel discontinuity in density testing procedure, an important
problem in regression discontinuity designs and other program evaluation
settings. An illustrative empirical application is given. Two companion Stata
and R software packages are provided.
