The number of people working as electrical engineers declined by 29,000 last year, continuing a long-standing trend, according to government data.

But the number of software developers, the largest IT occupational category, increased by nearly 12%, or a gain of 132,000 jobs.

There were 1.235 million people working as software developers last year, and 271,000 electrical engineers, according to unpublished U.S. Bureau of Labor Statistics data.

Electrical engineering is a critical occupation that's often described as key to technological innovation. But this occupational category has been shedding workers for years. In 2006, for instance, there were 382,000 people working in this field.

"A nearly 10% decline in jobs from one year to the next, in a field that is supposed to be booming, is troubling," said Russ Harrison, IEEE-USA's government relations director.

Electrical engineers have likely moved into other fields, such as software engineering, or to other engineering areas such as aerospace, or to Wall Street, among other occupations.

"Some of the decline in the unemployment rate could be explained by unemployed electrical engineers drifting away from the profession, but not all of it," said Harrison. "Clearly, some people who were employed as electrical engineers in 2013 were not employed as electrical engineers in 2014."

The number of software developers reached the one-million mark in 2010.

The unemployment rate for electrical engineers was put at 2%, near its historical low, and for software developers at 2.5%.