I've read in grammar books that "whereas" is a kind of conjunctive adverb and should be placed at the first of a sentence or else it have to be followed by a semicolon. But I've seen in many books that they just put a comma before it, so I am a little bit confused.
For instance look at the following examples:
Back in the day, people would frequently go out to meet friends, whereas today they prefer to stay at home alone, chatting online.
The number of people who use smart phones is increasing; whereas, the proportion of people go out for leisure activity is decreasing.
From grammar books, I feel like the second form is correct, but I have seen the first form of punctuation as well.