He had Bill Forsyth's Local Hero (1983) and Preston Sturges' Christmas in July (1940) in mind as he wrote his script.
Then he wrote a script that's one part Bill Forsyth's Local Hero (1983), one part Preston Sturges' Christmas in July (1940), and about five parts synthetic whimsy.