I think family is paramount, but not completely, rather than geography.
My mums side are all rags, and a big influence on me was a very evident bragging culture within my family over football, and a belittling of all others. Especially underdogs city. Dad's side were blues, regular match going unlike the other side.
At school it was much the same, plenty of kids supporting Liverpool and United around cheadle in the 80s, to me that was the easy option. City just had more character, were more welcoming, and I was drawn to that. Split in school for me was about 50/25/25 between United, us and Liverpool. By secondary school there were very few 'Liverpool's fans left though, coinciding with their decline.