Forgive me not knowing how it goes in the United States, but here in my electorate there is generally only one or at most a handful of candidates who you can vote for in each party. It would not be hard to narrow down who you vote for based on the party you selected.
That being said, even knowing which side of politics your peers vote for would be sufficient to harass them over it. I don't understand why anyone would think this is a good thing.
So knowing another person is from a different political party inevitably leads to harassment? I guess it really is 2018 in America. Back in my day voting wasn't such a tribal affair.
That's kind of the reason why most ballots are cast anonymously to begin with. I'm sure back in your day (which is a fairly arbitrary thing to say, really) this was no different.
That being said, even knowing which side of politics your peers vote for would be sufficient to harass them over it. I don't understand why anyone would think this is a good thing.