This is such a neat discussion. I work for a utility company and in our one city, we have facilities that range from a downtown highrise (corporate services, customer care call center) to field offices (treatment plants with office space), so there are a huge range of people and dress styles.
Generally, the more time you spend in the field, the more casual you are allowed to dress (and if you wear coveralls for your workday, no one cares what you are wearing underneath).
My team is located in an office building on one of the treatment plant sites and we split our time between the field and the office.
1. Yes we have a written dress code and it is selectively enforced. It's not very well-written or very clear and I get the impression it is mostly targeted at the staff at the call center. General instructions are that certain things are never allowed (flip flops, tank tops, leggings) and that you should dress at least business casual, unless you will be in the field that day.
2. The informal dress code is that you are neat and tidy and at least attempting business casual (or smart casual - there are lots of men with jeans and golf shirts / short sleeved dress shirts) at the field sites. The downtown office is more on the business side, with dress pants / jackets / suits.
3. My specific team is 2/3 men, mostly with a trade background.
4. I'd say that most of our days are about a 5 - not very casual, but not very dressy. I'll post some typical outfit photos later this week or early next week.