File:Prostate cancer rate by age.svg

Summary

Description
English: Global prostate cancer incidence rate by age for men. Semi-logarithmic scale. Based on Cancer today (GLOBOCAN) data as of December 2020.
Date
Source Own work
Author Mathnerd314159
SVG development
InfoField
Source code
InfoField

Python code

#! /usr/bin/env python
# -*- coding:utf8 -*-
import matplotlib.pyplot as plt

# source: https://gco.iarc.fr/api/globocan/v2/2020/data/cancer/0/1/900/all_with_all/?sort=total&grouped=1&ages_group=0_17&grouping_cancer=1&include_nmsc=0&include_nmsc_other=1
ages = [0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,100]
prostate_cases_by_age = [26,20,14,58,167,209,400,756,3181,15242,51043,127004,216843,290790,284592,203403,133647,86864]
populations_by_age = [349432480,342927584,331497472,316642208,308286720,306059424,309236960,276447040,249389680,241232896,222609712,192215376,157180288,128939384,87185984,54754936,33648948,22286744]

crude_rate_by_age = [cases / population for (cases,population) in zip(prostate_cases_by_age, populations_by_age)]

ages_mid = [(age_high+age_low)/2 for (age_high,age_low) in zip(ages[1:], ages[:-1])]
widths = [(age_high-age_low)-1 for (age_high,age_low) in zip(ages[1:], ages[:-1])]

plt.bar(height=crude_rate_by_age,x=ages_mid,width=widths)
plt.xlabel('Age')
plt.xticks(ticks=ages[:-1]+[(85+100)/2],labels=ages[:-1]+["85+"])
plt.ylabel('Incidence rate')
plt.yscale('log')
plt.savefig("Prostate cancer rate by age.svg")

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Prostate%20cancer%20rate%20by%20age.svg
Category:Self-published work Category:Cancer statistics Category:Statistics about diseases by age
Category:CC-Zero Category:Cancer statistics Category:Self-published work Category:Statistics about diseases by age Category:Valid SVG created with Matplotlib code