There's a chart that does this directly: https://ourworldindata.org/grapher/co2-intensity