The 97% figure comes from two independent studies, each employing different methodologies. One study surveyed all climate scientists who have publicly signed declarations supporting or rejecting the consensus (Anderegg 2010). Another study directly asked earth scientists the following question “Do you think human activity is a significant contributing factor in changing mean global temperatures?” They found 97% of actively publishing climate scientists answered yes (Doran 2009). As “climate scientists actively publishing peer-reviewed research on climate change” doesn’t really roll off the tongue, I abbreviated that down to “climate experts”.
One feature of Doran’s survey results is that while 97% of climate expert said “yes, humans are causing global warming”, only 1% said “no, we’re not”. The other 2% were unsure:
Response to the survey question “Do you think human activity is a significant contributing factor in changing mean global temperatures?” (Doran 2009)
I’ve indicated the “I’m not sure” portion in the “97 out of 100 climate experts” infographic with grey colouring.
# Cf. Guide to Skepticism