This is nimble model code for a hierarchical Bayesian analysis to estimate walrus herd density at multiple sites, where some surveys entailed counting walruses in a sample of grid cells overlain on the surveyed herd on shore; whereas, other surveys were censuses (complete counts.) The model code also predicts herd densities for new surveys taken at existing sites and a new site.