My subjective take on both...
The MacBook is the most extreme that portability gets and it prioritizes everything else for this. For highly mobile users, it is a godsend. The 2017 has huge improvements over previous versions, with a much improved keyboard (I despised the keyboard on the 2015-2016 models), battery life, CPU (with an inherently better ability to sustain performance - I use mine to frequently run a second Windows OS as a virtual machine.) However, like previous MacBook generations, it uses legacy USB, and it only has one USB port. For wired devices or those wanting to use external 4k displays, this presents several challenges. This single port blends best when someone uses cloud storage or NAS more so than DAS. It's screen and trackpad are far superior to the MacBook Air. You lose MagSafe and its ability to prevent an, "oh crappy I done trippy-knocky-over", but now you can get a quality braided powercord that is independently certified for $9.99, which I like a lot given how the MagSafe cords can wear quickly. The 2017 version is so different from the original they practically should have renamed it. They keyboard uses a second generation butterfly mechanism - it is definitely more delicate than the traditional scissor mechanism used on the MBA. It (at least the 2017 version) has an impressive ability to maintain a reasonably good battery life under a continuous heavy load, even when the CPU is consistently running at twice its base frequency. Minus the legacy IO, it's really come of age. I love mine, was floored by the quality of the fit & finish (even for Apple's already high standards), and I'd go as far to say it's my favorite Apple product to date except for my AirPods. If you are not using a ton of wired devices, or if this is not your primary machine, or you like having maximum portability, I would favor the rMB.
The MacBook Air is still reasonably portable, and I still have love for mine. It is arguably the ultimate performer in battery life. Where as it also has legacy USB (just with the type-A connector instead of the type-C connector of the rMB), it features two legacy USB ports, not to mention TB2. It has a keyboard that, while subjective in terms of how much one may "like" it, is arguably far more durable than what the MacBook uses. While its CPU is several generations older, it does have the benefit of a fan. From what I have observed, it seems that the Air can withstand more abuse than other Apple portables. The lack of a USB-C port is probably going to be a downside several years from now, but it certainly won't be the end-all. You keep MagSafe, but you are also stuck paying $80 a pop for an OEM replacement or risking a potentially dangerous 3rd party option that no independent body offers certification for. The SD card slot does mean you can also add up to 256 GB of internal flash storage using something like the Transcend JetDrive Lite, and this will perform like a good HDD, making it suitable for media and document storage. As I was using mine purely as a portable machine, and the 10-ish hours runtime of the rMB is sufficient for my usage, my rMB is now the one I always have on me. If this is going to be your only computer and you use a lot of wired devices, you want battery life above everything else, or you like to eat over your computer, I would favor the MBA.
(If you are going to be typing all day long, I recommend using both for a little while before making a decision. I'm fine with either keyboard, but you will likely notice that some Users have a very strong preference for one design over the other.)
I assume you are looking at base models because they are the ones that frequently go on sale. In this respect, the MBA's advantage is that you can often find it less for the rMB (but at the expense of a 128 GB SSD, which can quickly become a huge PITA.) With the rMB, you can often find it for a pretty reasonable sale price as well, plus it comes with a 256 GB base SSD.