The number your local ABC, CBS, NBC, and FOX affiliates self-identify as, NOT what channel number they are through your cable box.
For example, in DC they are:
NBC - 4
FOX - 5
ABC - 7
CBS - 9
In Baltimore they are:
ABC - 2
NBC - 11
CBS - 13
FOX - 45
(which is strange to me, because when I was a kid, the first three were the the same channels but different networks: NBC was 2, CBS was 11, and ABC was 13)
CBS just switched to Channel 4 at the beginning of 2015. Prior to that, it had been on Channel 8 for years, and Channel 4 was The CW. The two channels swapped affiliations as of January 1, 2015.
I grew up north of NYC so I had no idea what an ‘affiliate’ was. CBS & channel 2, NBC & channel 4, ABC & channel 7 etc. were completely synonymous in day-to-day speech. Because they were the network feeds they were always literally WCBS, WNBC and WABC and were never called anything else, and being a kid I thought it was the same everywhere! The first time I saw a TV Guide edition that wasn’t for my area I was totally confused!
Before it was Fox, channel 5 was WNEW, a major independent station, same as channel 11’s WPIX and channel 9’s WWOR (which was usually just called WOR). WNEW changed to WNYW and became Fox. Later 11 became The WB and 9 UPN before they merged into The CW. Having only had cable (or satellite) for nearly forty years I don’t really know where The CW necessarily is channel-wise. But every local cable company has always kept the networks on the same cablebox number (except for Fox which moved from 5 to 6 for some reason).
Anyone who grew up in the tri-state area (NY, NJ & CT) probably remembers the same…
San Francisco:
Fox 2
CBS 5
ABC 7
NBC - I think it’s 11; technically it’s a San Jose station. For a long time, San Francisco’s NBC affiliate was channel 4, but they got into some sort of argument with NBC over not showing network programming and NBC pulled the affiliation.
Also, the main PBS station is 9
Sacramento:
NBC 3
ABC 10
CBS 13 (IIRC, ABC and CBS were reversed until CBS lost the NFC half of NFL rights to Fox in 1994)
Fox 40
PBS 6