GICS (Global Industry Classification Standard) codes for popular, liquid stocks
Global Industry Classification Standard (GICS) is an industry taxonomy developed by MSCI and Standard & Poor's (S&P). Unfortunately, the classification is proprietary. This is an open source repository of some popular listed companies and the GICS code for the primary sector they operate in. The data is in CSV format, and can be used for a variety of academic and research applications (non commercial use).