Gist 7324dc1c477b5214c422752e1390c042
✓ Published0🌍 Public
AArizonaTay
Last edited Dec 29, 2021
Created on Dec 29, 2021
Two horizontal bar charts display the percentage of sponsored posts by industry and by country, ranking the top twenty categories in descending order. The first chart highlights industries with the highest sponsorship rates, while the second compares countries, both using Plotly Express’s `px.bar` function. The code computes percentages by grouping the dataset with `groupby`, counting "Yes" and "No" values for the `Sponsored` column, merging results, and calculating proportions before sorting. Each chart is titled with centered layout via `update_layout(title_x=0.5)`, and the source data originates from a pandas DataFrame derived from the gist’s CSV.
AI-generated description