What's the category name of "city" and "rural"?

Solution 1:

Urbanization.

Or Population density. (Advantage: quantifiable)

The above are more often (perhaps exclusively) applied to a place rather than a person. That is, they are geographic terms, I understand you want a demographic term.

Great question. And timely as the world recently (2007) crossed into 50% urban. Some more ideas, with tongue half in cheek, for a single-word term:

  • urbanity
  • citification
  • citizence
  • citizensity

Okay I'll stop. The U.N. seems to call this demographic dimension "urban/rural".

I noticed during a elementary-school research project that kid happiness seemed to increase the further I drove from D.C. (the more rural direction of your spectrum). Also increased were noise and freedom and agedness of clothing and buildings.

Solution 2:

I don't know of a special word to describe this relation. From a geographic data perspective, the more accurate phrase would be "urban" versus "rural". The US Census Bureau has a very precise definition here where they call it simply the "Urban and Rural Classification".