To make the cupcakes: Preheat oven to 350 degrees F and line 12 (1/2-cup) muffin tins with paper liners.
In a bowl, whisk together flour, baking soda, salt, and spices. In another bowl, whisk together oil, sugar, eggs, and vanilla and with a wooden spoon beat in flour mixture until well combined. Add carrots, walnuts, and coconut, stirring until just combined. Fill muffin tins 2/3 full with batter (there will be enough batter remaining to make 4 more cupcakes) and bake in middle of oven until a tester comes out clean, about 18 minutes.
Turn cupcakes out onto a rack and cool completely. Muffin tins may be used again immediately for the remaining cupcake batter. Cupcakes may be made 2 days ahead and kept in airtight containers.
To make the icing: In a bowl beat together icing ingredients until fluffy.
Icing may be made 2 days ahead and chilled in an airtight container. Soften icing at room temperature to spreading consistency.
Spread icing on cupcakes.