This report explores country-level counts of specialist medical practitioners using the WHO NHWA data included in the file Specialist Medical practitioners by country.csv. The dataset contains the indicator “Specialist medical practitioners (number)” for multiple countries, along with associated WHO regions and reporting years. The analysis focuses on visual comparisons across countries, regions, and reporting periods, using only the variables available in the dataset.
df <- read_csv("C:\\Users\\Pradnya\\Downloads\\Specialist Medical practitioners by country.csv")
## Rows: 156 Columns: 34
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (12): IndicatorCode, Indicator, ValueType, ParentLocationCode, ParentLo...
## dbl (2): Period, FactValueNumeric
## lgl (19): IsLatestYear, Dim1 type, Dim1, Dim1ValueCode, Dim2 type, Dim2, Di...
## dttm (1): DateModified
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
prac <- df %>%
select(
ParentLocation,
Location,
Period,
FactValueNumeric,
)
top20 <- prac %>%
arrange(desc(Specialists)) %>%
slice_head(n = 20)
ggplot(top20, aes(x = fct_reorder(Country, Specialists), y = Specialists)) +
geom_col(fill = "steelblue") +
coord_flip() +
scale_y_continuous(labels = comma) +
labs(
title = "Top 20 Countries by Number of Specialist Medical Practitioners",
x = "Country",
y = "Number of specialist medical practitioners"
) +
theme_minimal()
top20 <- prac %>%
arrange(Specialists) %>%
slice_head(n = 20)
ggplot(top20, aes(x = fct_reorder(Country, Specialists), y = Specialists)) +
geom_col(fill = "steelblue") +
coord_flip() +
scale_y_continuous(labels = comma) +
labs(
title = "Bottom 20 Countries by Number of Specialist Medical Practitioners",
x = "Country",
y = "Number of specialist medical practitioners"
) +
theme_minimal()
ggplot(prac, aes(x = Specialists)) +
geom_histogram(bins = 30, fill = "darkcyan", color = "white") +
scale_x_continuous(labels = comma) +
labs(
title = "Distribution of Specialist Medical Practitioner Counts Across Countries",
x = "Number of specialist medical practitioners",
y = "Number of countries"
) +
theme_minimal()
region_sum <- prac %>%
group_by(Region) %>%
summarise(TotalReported = sum(Specialists, na.rm = TRUE)) %>%
arrange(desc(TotalReported))
ggplot(region_sum, aes(x = fct_reorder(Region, TotalReported), y = TotalReported)) +
geom_col(fill = "mediumpurple") +
coord_flip() +
scale_y_continuous(labels = comma) +
labs(
title = "Sum of Reported Country Counts by Region",
x = "Region",
y = "Sum of reported country counts"
) +
theme_minimal()
ggplot(prac, aes(x = Region, y = Specialists, fill = Region)) +
geom_boxplot(show.legend = FALSE) +
scale_y_continuous(labels = comma) +
labs(
title = "Distribution of Specialist Medical Practitioner Counts Within Regions",
x = "Region",
y = "Number of specialist medical practitioners"
) +
theme_minimal() +
theme(axis.text.x = element_text(angle = 30, hjust = 1))
year_count <- prac %>%
count(Year)
ggplot(year_count, aes(x = factor(Year), y = n)) +
geom_col(fill = "goldenrod") +
labs(
title = "Number of Countries by Reporting Year",
x = "Reporting year",
y = "Number of countries"
) +
theme_minimal()
dot_data <- prac %>%
arrange(desc(Specialists)) %>%
slice_head(n = 25)
ggplot(dot_data, aes(x = Specialists, y = fct_reorder(Country, Specialists))) +
geom_point(color = "darkblue", size = 3) +
scale_x_continuous(labels = comma) +
labs(
title = "Top 25 Countries by Number of Specialist Medical Practitioners",
x = "Number of specialist medical practitioners",
y = "Country"
) +
theme_minimal()
p <- ggplot(prac, aes(
x = Year,
y = Specialists,
text = paste(
"Country:", Country,
"<br>Region:", Region,
"<br>Year:", Year,
"<br>Specialists:", comma(Specialists)
)
)) +
geom_point(color = "navy", alpha = 0.7, size = 2) +
scale_y_continuous(labels = comma) +
labs(
title = "Interactive View of Specialist Medical Practitioner Counts by Reporting Year",
x = "Reporting year",
y = "Number of specialist medical practitioners"
) +
theme_minimal()
ggplotly(p, tooltip = "text")