The data here comes from Table 78, Full-time Law Enforcement Employees, by State by City, collected by the FBI through the Uniform Crime Reporting (UCR) Program. "This table provides the total number of law enforcement employees, total officers, and total civilians employed by city/town law enforcement agencies listed alphabetically by state." The rate per 10,000 residents is obtained by dividing the total number of law enforcement employees by the total city population and then multiplying by 10,000. Data is not available for all 75 cities for all years; for example, there is no city data available for Chicago for 2013 and 2015.
The most recent data for Police Officers per 10,000 Residents by state comes from Table 77: Full-time Law Enforcement Employees by State released each year. The total number of police officers is divided by the total state population and then multiplied by 10,000 to get the rate.
Source: FBI's Crime Data Explorer; Find "Crime in the United States Annual Reports", the zip file contains Tables 77 and 78.
The FBI explains its methodology as follows in its Data Declaration:
"The UCR Program defines law enforcement officers as individuals who ordinarily carry a firearm and a badge, have full arrest powers, and are paid from governmental funds set aside specifically to pay sworn law enforcement.
Civilian employees include full-time agency personnel such as clerks, radio dispatchers, meter attendants, stenographers, jailers, correctional officers, and mechanics.
For the 2018 population estimates used in this table, the FBI computed individual rates of growth from one year to the next for every city/town and county using 2010 decennial population counts and 2011 through 2017 population estimates from the U.S. Census Bureau. Each agency’s rates of growth were averaged; that average was then applied and added to its 2017 Census population estimate to derive the agency’s 2018 population estimate."