当前位置:网站首页>A line of R code draws the population pyramid
A line of R code draws the population pyramid
2022-07-07 04:49:00 【Mrrunsen】
Population pyramid (Population pyramid chart) It is essentially a histogram (Histogram), It can show the population structure of different ages and male and female groups , Used to understand the population distribution of a country or region , Aging and other information .
Xiaobian recommends a function , Can quickly plot !
Install and load now R package :
install.packages("ggcharts")
library(ggcharts)
next step , see {ggcharts} Data set of “popch” The first six lines of :
head(popch)
among ,age Age groups ,sex For gender ,pop Represents the population .
Last , A line of code draws a population pyramid
:
pyramid_chart(popch, age, pop, group = sex)
Take it away, everyone. No thanks ~
All right. , Today's content is here .
If it helps , Remember to share it with those who need it
!
边栏推荐
- Read of shell internal value command
- 一图看懂!为什么学校教了你Coding但还是不会的原因...
- 每人每年最高500万经费!选人不选项目,专注基础科研,科学家主导腾讯出资的「新基石」启动申报
- How to open win11 remote desktop connection? Five methods of win11 Remote Desktop Connection
- Intel and Xinbu technology jointly build a machine vision development kit to jointly promote the transformation of industrial intelligence
- 各路行业大佬称赞的跨架构开发“神器”,你get同款了吗?
- Win11图片打不开怎么办?Win11无法打开图片的修复方法
- Digital chemical plants realize the coexistence of advantages of high quality, low cost and fast efficiency
- Easycvr cannot be played using webrtc. How to solve it?
- Fix the problem that the highlight effect of the main menu disappears when the easycvr Video Square is clicked and played
猜你喜欢
Intel David tuhy: the reason for the success of Intel aoten Technology
这项15年前的「超前」技术设计,让CPU在AI推理中大放光彩
案例大赏:英特尔携众多合作伙伴推动多领域AI产业创新发展
In depth analysis of kubebuilder
Vscode 如何使用内置浏览器?
九章云极DataCanvas公司摘获「第五届数字金融创新大赛」最高荣誉!
EasyCVR无法使用WebRTC进行播放,该如何解决?
Oracle -- 视图与序列
Chapter 9 Yunji datacanvas company has been ranked top 3 in China's machine learning platform market
深入解析Kubebuilder
随机推荐
Advertising attribution: how to measure the value of buying volume?
EasyCVR集群重启导致其他服务器设备通道状态离线情况的优化
Zhou Yajin, a top safety scholar of Zhejiang University, is a curiosity driven activist
Section 1: (3) logic chip process substrate selection
Some understandings about 01 backpacker
Fix the problem that the highlight effect of the main menu disappears when the easycvr Video Square is clicked and played
acwing 843. n-皇后问题
Digital chemical plant management system based on Virtual Simulation Technology
B站大佬用我的世界搞出卷积神经网络,LeCun转发!爆肝6个月,播放破百万
[team learning] [34 issues] scratch (Level 2)
Master the secrets of software security testing methods, and pinch the security test report with your hands
Introduction to the PureMVC series
Win11图片打不开怎么办?Win11无法打开图片的修复方法
Web3 社区中使用的术语
MySQL split method usage
R language principal component PCA, factor analysis, clustering analysis of regional economy analysis of Chongqing Economic Indicators
Lecture 3 of "prime mover x cloud native positive sounding, cost reduction and efficiency enhancement lecture" - kubernetes cluster utilization improvement practice
Common methods of list and map
Case reward: Intel brings many partners to promote the innovation and development of multi domain AI industry
Win11远程桌面连接怎么打开?Win11远程桌面连接的五种方法