There is an icon next to their name on the map with the color code (red = military, blue = science, purple = culture, yellow = commerce).
Also, when you click on an IP and you see the screen with influence options, you can tell which type they are because the people displayed are either soldiers, or standing next to commercial goods / science equipment or papers / works of art depending of the type. This is useful for independent powers where you haven't revealed their city center on the map, but you can still click on the name in the list of IPs (it's under the relationship "heart" icon when clicking on your leader portrait).