RSGInc/SOABM

Add major university column to persons file

Closed this issue · 1 comments

@DDudich's #Scripts Adds Major university column to persons file as well as fixing Null value in Standard Occupation Classification (SOC) column.

x <- read.csv("persons.csv",as.is=T)
x$soc <- as.numeric(gsub("NUL",0,x$soc))
x$majoruni <-0
x<- x[order(x[,30],x[,10]),c(1:23,31,24:30)]
x$PERID <- 1:nrow(x)
write.csv(x,"persons_sorted_uni.csv",row.names=F)

Editing this so that the ABM code just needs to deal with these two for the person file:
x<- x[order(x[,30],x[,10]),c(1:23,31,24:30)]
x$PERID <- 1:nrow(x)

Overall we discussed three other elements:

  1. Update the seq MAZ numbering
  2. Update HH, Pop, and HHP, based on syn pop inputs. We will add a flag to mark visitors, and visitors won't be included in these totals.
  3. update household table (and person if you want) with Seq MAZ field