The defining characteristic of a district is that it is geographically contiguous. A defining specification for districts is that they have a roughly even population. With those constraints, what you would want to do is find physical commonalities (not abstract loyalties.) For example: water sources, proximity to commercial areas, types of housing stock, local weather patterns, local roads/accessibility, proximity to major land features/employers (like quarries, factories, lakes.) That's harder than doing this.
A problem I have with with doing this by political parties is that the two parties aren't themselves part of government and shouldn't be. A real problem I have with making racial guarantees (other than the possibility of packing and cracking) is that it seems to be calculated through averaging "diversity" - meaning that a group with 6% representation would be guaranteed 6% voting power on the district level (assuming people vote purely based on racial allegiance.) "Diversity" is a red herring; it's remedy that is important. 6% can be ignored at the district level nearly as easily as it can be ignored at the individual level. You're not going to get remedy from redistricting, but districts that grow from material features of the places where people live will end up shaped by race anyway (due to the history of those places.)