The spray foam in the cans is only a 1/2 lb. foam. The ones on TV for the whole house is a 2 lb. foam, professionally applied. There are kits (tiger foam is one I think), but they are expensive. The brand name of the pro applied foam (in Canada) is Walltight. It is probably the best way to insulate as it seals the home air tight, getting into all the nooks and crannies. It MUST be covered with non flammable material as it gives off noxious gasses when burning. You may also have to get a mechanical air exchange system to regulate the fresh air and humidity in the home. It makes it like living in a styrofoam cooler.
Remember, minimum code requirement is just that....MINIMUM