The only fair way is to ignore the whole process. Total number of medals won in obscure sports very few people in the world compete in is not really significant, except to brutish dictators trying to divert the attention of the populace (e.g USSR, DDR, China), or the morons who are in charge of the US media, catering to the locals who are only paying attention because the NFL hasn't started its regular season. Not only are the bronze and silver medals not as significant as the gold, but not every gold medal is of equal merit.
I think the most impressive gold medal given out at the Olympics is the men's 100 meter dash. Bolt can claim to be "the world's fastest human." Running (at a variety of speeds) is something most of the human race has done, so that's significant bragging rights. Conversely, I really don't care who gets the gold in mixed pairs badminton or duet synchronized swimming, although both carry the same weight as the 100 meter in the medal tables.
When the world's most popular team sport, association football, hands out a grand total of two golds, while Olympic weightlifting (not to be confused with power lifting) hands out 15, I'd be hard pressed to say that the fact Belarus could win three medals in weightlifting (one of each color) makes that fair land a better "sporting nation" than the winner of the Argentina-Nigeria showdown in football.