Nonprofit-Open-Data-Collective / titleclassifier

An R package to assign raw nonprofit executive titles from Form 990 Part VII to a well-structured title taxonomy.
https://nonprofit-open-data-collective.github.io/titleclassifier/code-tour/package-demo.html
4 stars 0 forks source link

sample code for grouping #4

Open lecy opened 1 year ago

lecy commented 1 year ago
df <- 
      df %>%
      group_by( ein ) %>% 
      mutate( num.ceos = sum( grepl( "CEO", title.standard ) ),
              pay.rank = rank(TOT.COMP)
              pay.pct = TOT.COMP/max(TOT.COMP, na.rm=T) ) %>% 
      ungroup()

    # number of DTKs  n=n()
    # pay rank
    # pay pct total
    # hour rank 
    # hour pct total
    # number of paid members?  # what is paid? more than zero, or more than X?
    # number of FTE members?   # FTE is hours > 30 
    # number of ceos 
    # number of board pres
    # number of board treas
    # number of board sec
    # number of board members
    ### rev > X?