Could Cannery Row take place anywhere else? We say probably not. You can't separate the plot from the setting anymore than you could pick the dirt out of the chewing gum on the bottom of your shoe. (Ew. Not that you'd want to.)
If Doc didn't live by the water, how would he go about his business? If the Row didn't have guys like Mack and the boys, how would he ever get enough frogs? If the canneries didn't throw out nice, roomy boilers, where would Mrs. Malloy hang her curtains?
In the beginning of the book, as we're getting to know Cannery Row, Steinbeck uses places in town as a jumping-off point for stories about the folks who spend time there. For instance, in Chapter 3, first we learn that Dora's "stern and stately whorehouse" (3.1) is to the left of the vacant lot. From there, Steinbeck gets to the sad story of William's suicide in the kitchen of the Bear Flag Restaurant.
So what? Well, these incidents show us how important location is. These people's lives are literally tied to the places where they lived. And that leads us to …
Steinbeck spends a lot of ink to tell us all about Cannery Row, down to almost giving us a map of Doc's lab. By the end of chapter 5, you know where in the lab you'd need to look for a snack (in the filing cabinets) and how to find the bathroom (off the kitchen).
If this feels like a real place, that's because it is. Steinbeck used to hang out on the actual Cannery Row (which was then called Ocean View Avenue, later changed to Cannery Row in Steinbeck's honor). Doc was a real person named Ed Ricketts, and he really did have a lab. (Check out "Best of the Web" for some pictures of these real, live places, and check out Doc's "Character Analysis" for more about sexy Ed Ricketts.)
Back in the day, Steinbeck and Ricketts would chill at the lab talking philosophy and go on collecting expeditions together. Ricketts was a big influence on Steinbeck's writing, something you can see in Cannery Row. Not just the character of Doc, but the whole tide pool theme comes from his time with Ricketts (source).
Up the hill from Cannery Row is the rest of Monterey, the rich side of town. Up here you've got the department store and the rich old guys who visit Dora's on the weekends. In some ways, the town on the hill is the anti-Cannery Row. It's on a hill while the Row is at the waterfront; the people who work in the canneries live up there, while the people on Cannery Row … don't really seem to work at all.
By the time Steinbeck was writing, Cannery Row might not have had much in the way of canneries. Cannery Row was published in 1945, the year World War II ended. But the story takes place before that, after the Great Depression and before the war. We know that everything goes down after the depression because Dora "nearly went broke" helping everyone out during that time (3.3), so we get the impression that things have started to get better.
And a little research tells us that the war hasn't started yet: in Steinbeck's sequel to Cannery Row, Sweet Thursday, Doc has just come back from fighting in World War II.
If you keep getting a sense of nostalgia as you're reading (especially at the end, where Steinbeck has us take a bath in it), that might be because the whole thing takes place in a kind of magical time: the Depression is over, but no one's heard about the Nazis yet. Our friends at the New York Times also tell us that the sardines that kept the canneries humming "disappeared from the bay" in the "mid-1940s" (source).