I saw a lot of these purple boxes hanging from Trees in the Adirondacks this summer. I am now seeing them along roadsides in PA and also just recently in MD.
Apparently these are insect trappers to help identify the spread of a new beetle that is proving deadly to all ash trees. There are 4-5 states that now have quarantines on ash wood due to the spread of the Emerald Ash Borer - See Link.
http://www.entomology.wisc.edu/emeraldashborer/