Code for the bubble plot example is included in the same article. See the link to the code at the…