As far as I know, if you do not possess a valid visitor visa to US, by all means, you're not allowed to enter US, not even having a transit flight there. So, unless you can apply a visitor visa of US for yourself, I don't think transiting in the States is a good idea. Furthermore, it is always safer to transit in within Canada. Transiting in US can be a lot more harsher than you think because of all the security procedures. I'll suggest you not to idealize the whole itinerary of transiting in US. If transiting in Vancouver will ensure you a safe entrance to Canada and later on Halifax, that is still considered to be a better way. The risk-free journey that brings you into Halifax via Vancouver outweigh the risk to be stranded in New York.