how to represent location-code as a feature in machine learning model?
You can get as creative as you want, but here are two general approaches that work for me.


Clustering the data into known geographical divisions and create dummy variables.  For example, in the United States a person can use zip codes.
Find the center for known clusters (ie zipcodes) or by some similar unsupervised cluster and use the longitude and latitude.  


How you choose to augment that information depends on what exactly you're trying to predict.