Preheat the oven to 350F (180C). Line a 12-cavity muffin pan with muffin papers.
In a large bowl, whisk together the cinnamon, ginger, nutmeg, baking soda and salt.
In a separate bowl, whisk together the oil, brown sugar, granulated sugar, eggs, vanilla, sour cream and milk until you no longer see lumps of sugar and the mixture is an even consistency.
Whisk the grated carrot into the wet ingredients.
Make a well in the middle of the dry ingredients and pour the wet ingredients into the well. Gently stir together until you no longer see lumps or streaks of flour.
Stir in the optional chopped walnuts and coconut - if using.
Spoon the batter into the prepared cupcake pan, filling each about 2/3 to 3/4 full.
Bake in the middle of the preheated oven for about 18-21 minutes, or until an inserted toothpick comes out clean or with a few moist cupcake crumbs.
Cool the cupcakes in the pan for at least 10 minutes, then carefully transfer to a cooling rack to continue cooling.