Group resources by type