For my money, local is better. I'm a roaster myself and before I started roasting researched all the coffees on the grocery store shelf. I called all the roasters and the freshest coffee on the store shelf had been roasted 59 days previously. It got consistently worse from there with some coffees over 200 days difference between the roast date and when I first brewed it.
Scientifically coffee peaks fairly soon after roasting. There are different schools of thought on the subject by my research shows some of it depends on the beans, some the level of roast, and then how it is packaged. I'd say it peaks after 3 days. Certainly after 14.
So if you can get the coffee roasted locally it isn't sitting in a warehouse, then being trucked to some distribution center, then sitting around till it gets sent possibly to a grocery chain's distribution center, and then finally on to the store. Starbucks would has a similar distribution system. In fact when you buy Starbucks again you'll find a "Good Till" date on the bag. Call Starbucks and ask when it was roasted (because almost no one puts the Roasted On date on their coffee and that is the critical date if you are serious about drinking good coffee) and you may be (not pleasantly) surprised.
As to storing the coffee I don't worry about it because it goes so fast here. But if you've got a lot of different coffees then keep them in a cool, dark place. Don't use a container that lets light in. Preferably use a container that lets the naturally occuring C02 in roasted coffee OUT, but doesn't let oxygen in. Light and oxygen are deleterious to coffee. Finally I'd recommend freezing it. BUT, when you use the coffee, get it out of the freezer, measure out what you need, and put the coffee right back in the freezer. If you let it sit on your kitchen counter and thaw, and condensate, you're degrading the coffee. Just get it out and then right back in the freezer before any warming starts to occur. I don't recommend coffee in the refrigerator. Much easier to condensate and if not absolutely packed air tight it can easily pick up the aroma of whatever you've got in there.