The availability of rituals just came up in my PbP game. What rituals are available for purchase in a given town? My answer is: All of them, up to a level limit.
My players are in Hommlet. It is a small village, but a natural rest point for caravans, and has a resident wizard (former adventurer), druid and priest. I decided that the players can get any ritual up to level 5 there. Higher may be available, but they have to go to bigger cities like Verbobonc to get them reliably.
So, something like:
Village: Up to level 5. Examples: Hommlet (Village of Hommlet), Winterhaven (Keep on the Shadowfell), most towns in "starter" modules for whatever version.
Town: Up to level 10. Example: Fallcrest (4E DMG).
City: Up to level 20. Example: Amn (Baldur's Gate II). I'd guess Waterdeep and Greyhawk too, but haven't read those supplements.
Metropolis: Up to 30. Mainly extraplanar places like the City of Brass, Sigil, etc.
Note that "village", "town" and "city" are roughly defined in the 4E DMG. "Metropolis" is not, but there are definitely places bigger than what the DMG calls a "city". Hope this helps someone.