In order to properly compare cars of various types of propulsion (i.e., electric and gasoline/diesel), you need to figure out their energy consumption in a comparable unit of measurement. The EPA does this, but only for fuel efficiency, with MPG and MPGe, which is the "equivalent" MPG for an electric vehicle. According to the EPA, every gallon of gas is the equivalent of 33.6 kiloWatt hours (kWh), and every kWh results in just under 690g of CO2 production, on average.
With that knowledge, I converted every car's fuel efficiency from MPG (and MPGe) to gallons per mile. Since the EPA has real-world measurements (in grams per mile) for gasoline- and diesel-powered cars, I converted just the electrically powered cars to kWh/mile, then simply multiplied by 690 to get the average CO2 emission required for a mile's charge.