The NEC requires that access and working space be provided and maintained around all electrical equipment to permit ready and safe access to and maintenance of the equipment.
Depth of Electrical room

The NEC provides minimum depths in two tables that list nominal voltages to ground. Table 10.26(A)(1) includes depths for voltages to ground up to 150 volts, for voltages to ground from 151 volts to 600 volts. And for voltages to ground from 601 through 1000 volts. Table 110.34(A) covers higher voltages. Both tables list three conditions.

Electrical room Width Requirements
The width of the Electrical room can be no less than the width of the equipment the person is working on, and may never be less than 762 mm. The width must be great enough to allow any equipment doors or hinged panels to open at least 90 degrees. The NEC does not require that every item of equipment have its own discrete space, nor does it require the equipment to be centered in the width of the working space. A working space may be shared by more than one piece of equipment. but there must be clear space in front of each item of equipment that will be subject to energized work.
Electrical room Height Requirements
The height of the Electrical room must be at least equal to the top of the equipment, and cannot be less than 2 m. Within the height of the Electrical room , no other equipment that is associated with the electrical installation and located above or below the electrical equipment may protrude more than 150 mm into the working space of another item of equipment
Illumination
Illumination must be provided for the Electrical rooms space for certain items of electrical equipment. These items include service equipment, switchboards, switchgear, panelboards. and motor control centers. This illumination need not be separate and dedicated to the electrical equipment or working space, but control of the lighting may not be provided by automatic means only.