Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Basic visualizations

A chart is not just an image; it is a rhetorical argument. As government statisticians, our job is to reduce the load on policymakers by highlighting key insights clearly.

We will use two main libraries:

  • Matplotlib: controls axes, titles, file saving

  • Seaborn: makes statistical plots beautiful by default

Source: Adapted from Seaborn: Visualizing distributions of data

Categorical Data

Census data is often categorical (Regions, Crops).

Output
<Figure size 1000x600 with 1 Axes>

Distributions

To show the true shape of data, we use histograms with a Kernel Density Estimate (KDE).

Why? It shows if data is “skewed” (e.g., most farmers own < 1 hectare, but a few own 500 hectares).

Output
<Figure size 1000x600 with 1 Axes>