A new report has ranked the best and worst states to be a police officer based on a variety of factors—such as median salary, benefits packages, quality of life, opportunity for advancement, and levels of criminal activity to which officers must respond.

The report—issued by Wallet Hub—indicated that New York ranked best, followed by Maryland, California, New Hampshire, and Indiana.

Louisiana ranked worst.

The report stated, "Beyond financial perks, officers are more likely to be attracted to police departments that steer clear of scandal and corruption and that are transparent with their communities. Public opinion on police remains divided, with younger people and minorities rating them much less positively than older caucasians. Naturally, police departments that have better relations with the areas they patrol are more attractive to new officers."

Source: WalletHub