Skip to content

Commit

Permalink
2021
Browse files Browse the repository at this point in the history
  • Loading branch information
rhirotacouncil committed Nov 9, 2023
1 parent 2c3e143 commit d627b4e
Show file tree
Hide file tree
Showing 7 changed files with 266 additions and 30 deletions.
2 changes: 1 addition & 1 deletion code/00_load_dependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ if(length(new.packages)) install.packages(new.packages)
lapply(list.of.packages, require, character.only = TRUE)

# remove created variables for packages
rm(list.of.packages,new.packages)
rm(list.of.packages,new.packages)
146 changes: 118 additions & 28 deletions code/01_city_demo_diversity.Rmd

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion code/02_agency_demo_improv.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ relative_plot <- cp %>% filter(agency_name =='DSNY',gender2!="Other") %>%
ggplot(aes(x = data_year, y = diff_middle)) +
facet_wrap(~gender2, nrow=1) +
geom_hline(yintercept=0, size = 0.5, color="grey") +
geom_point(aes(color=data_year)) + geom_label_repel(data = ~ subset(., data_year %in% c(2019,2020)), aes(label = round(diff_middle, digits=0))) + # diff_middle rounded to 0 to make more sense
geom_point(aes(color=data_year)) + geom_label_repel(data = ~ subset(., data_year %in% c(2019,2020,2021)), aes(label = round(diff_middle, digits=0))) + # diff_middle rounded to 0 to make more sense
scale_color_discrete(name = "Year") + theme_nycc(facet=TRUE) +
ggtitle("Relative Difference") + xlab("Year") + ylab("Number") + easy_plot_title_size(14)
Expand Down
73 changes: 73 additions & 0 deletions data/input/agency_diversity_2021.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
Agency,# Employees,%Female,%Male,%White,%Black,%Hispanic,%Asian,%SOR,check gender,check eth/race
DCAS,2298,39,61,26,34,25,12,3,100,100
DOITT,1673,38,62,35,26,15,20,4,100,100
MAYORALTY,1243,59,41,42,20,16,18,4,100,100
BOE,946,48,52,31,31,18,4,16,100,100
NYCERS,484,61,39,30,35,11,22,2,100,100
TRS,341,59,41,35,28,13,22,2,100,100
OPA,146,61,39,27,33,20,18,2,100,100
NYCPPF,147,55,45,34,28,17,19,2,100,100
DORIS,62,56,44,39,21,15,23,3,100,101
CLERK,68,71,29,22,9,47,22,0,100,100
FDNYPF,46,70,30,39,26,7,28,0,100,100
OCB,16,69,31,62,12,19,0,6,100,99
DOF,2036,52,48,28,38,12,19,2,100,99
COMPTROLLER,798,57,42,34,25,15,22,5,99,101
TLC,594,40,60,22,34,25,15,3,100,99
FISA,425,34,66,35,13,7,42,2,100,99
DCA,388,60,40,28,23,27,19,3,100,100
SBS,283,59,41,30,32,18,17,2,100,99
BIC,82,51,49,43,17,20,17,4,100,101
NYCTAX,51,51,49,53,14,10,24,0,100,101
ACTUARY,43,44,56,49,7,7,35,2,100,100
IBO,38,47,50,61,11,8,13,8,97,101
MWFA,11,73,27,45,0,27,27,0,100,99
COUNCIL,747,51,48,41,22,22,10,4,99,99
BP-BK,120,64,35,30,41,17,3,9,99,100
CFB,117,54,46,41,12,15,25,8,100,101
BP-QNS,118,64,36,44,21,16,8,10,100,99
BP-MAN,93,58,42,30,31,27,8,4,100,100
BP-BX,91,59,41,23,20,46,1,10,100,100
PA,73,53,45,23,40,18,4,15,98,100
BP-SI,49,59,41,76,8,8,0,8,100,100
PUBADMIN,46,57,43,35,26,30,4,4,100,99
NYCHA,11937,39,61,16,51,24,5,4,100,100
PARKS,6977,33,67,35,31,25,7,3,100,101
HPD,2390,51,49,25,38,21,13,3,100,100
LPC,75,72,28,69,9,8,7,7,100,100
DCLA,79,62,38,39,19,19,15,8,100,100
DOE,149419,78,22,44,21,23,8,5,100,101
SCA,861,37,63,41,20,15,23,2,100,101
NYCHH,41903,69,31,16,44,19,20,1,100,100
HRA,12205,71,29,14,56,18,10,2,100,100
DOHMH,6906,71,29,24,40,17,16,4,100,101
ACS,7276,71,29,12,62,18,5,3,100,100
DHS,2145,50,50,9,64,20,4,3,100,100
DYCD,539,63,37,21,39,22,13,5,100,100
DFTA,338,72,28,27,29,21,20,3,100,100
DSNY,9359,9,91,51,21,22,5,1,100,100
DEP,5976,46,48,48,21,14,15,2,94,100
DOT,5759,26,74,40,31,16,11,2,100,100
DOB,1674,36,64,34,31,15,16,4,100,100
DDC,1226,38,62,31,23,15,29,2,100,100
DCP,297,47,52,53,14,13,17,3,99,100
LAW,1821,63,37,46,28,13,9,4,100,100
DA-MAN,1553,57,43,55,14,19,8,4,100,100
DA-BK,1174,56,44,39,29,20,8,5,100,101
DA-BX,1049,61,39,35,26,31,6,3,100,101
DA-QNS,794,59,41,50,15,18,10,6,100,99
OATH,670,61,39,49,28,12,8,4,100,101
DA-NARC,214,50,50,50,18,16,9,7,100,100
CCRB,219,53,47,40,20,21,11,9,100,101
DA-SI,213,59,41,67,10,15,3,5,100,100
CCHR,128,57,41,27,24,23,18,9,98,101
BOC,24,58,42,33,38,17,12,0,100,100
COIB,24,54,46,50,4,17,21,8,100,100
NYCCSC,15,67,33,40,40,13,7,0,100,100
EEPC,13,69,31,15,46,8,15,15,100,99
NYPD,54685,35,65,36,25,27,10,2,100,100
FDNY,17564,12,88,62,13,19,4,1,100,99
DOC,10372,44,56,12,59,22,5,2,100,100
DOP,1084,69,31,11,63,20,3,2,100,99
DOI,341,55,45,43,26,16,10,5,100,100
NYCEM,206,50,49,53,18,11,10,8,99,100
Loading

0 comments on commit d627b4e

Please sign in to comment.