I have the anemometer and temp/humidity part already working on a Nano. It would be interesting to also have wind direction. No, I do not want to buy an $80 kit that duplicates much of what I have already done. Just something simple.
The common method is to use a continuous rotation poteniometer driven directly by the wind vane. However, the price is not cheap as shown here.
You could also try an absolute encoder such as this one. It will give you a four bit hex code as to the position with 16 points per revolution. You will have to be sure it's weather sealed and the wind vane has enough angular force to overcome a slight amount of friction within the device.