This is a do-file, which processes publicly available CCES and Census data available at the URL cited in the references. The second file is correct, it is not clear how to delete the duplicate.
Ogorzalek, T. (Contributor), Piston, S. (Contributor) (Sep 23 2019). Data for: Nationally Poor, Locally Rich: Income and Place in the 2016 Presidential Election. Mendeley Data. 10.17632/p6txvpc7w8.1