Need some help understanding basic pinout of GPIO.

So in the image that I posted, the stuff under the "Pin" column (TX, RX, A0, etc), are those the "aliases" that I would use in my Arduino code?

For example, int sensor1Pin = D4;

Are you saying that in Lua / NodeMCU the equivalent code would instead be (in psuedo Lua code): int sensor1Pin = GPIO2;

Another thing that kind of puzzles me is that the Arduino appears to not require "Dx" in its code. For example, analog pin #5 is coded with int analogSensor = A5;

But digital pin #5 is simply coded with int digitalSensor = 5;

On the Wemos, however, digital pin #5 is done with int digitalSensor = D5;

I guess this is simply a different alias convention between the two chips?