The Scottish parliament and Welsh assembly control significant areas of life, setting policy on health, schools, the environment, policing and the courts in Scotland, and economic investment. Holyrood's budget is £30bn, while Cardiff Bay spends £14.6bn a year.

For the first time, The Guardian has compiled a list of all the known candidates for the five main parties in both countries, and calculated the number of women, black and ethnic minority, and – where known – lesbian, gay, bisexual and transgender (LGBT) candidates standing on May 5.

Our research shows the legislatures are failing on all three counts. We have included tables showing the number of women, ethnic minority and LGBT people elected in the past three elections and, in Scotland, added a further list showing how diverse the candidate lists were for the last three elections. (That data was not readily available in Wales; also some places are still to be filled in both countries for this year's election).

This year, only 28.4% of Holyrood candidates are women and just under 30% in Wales. As a result, experts predict the number of women in both Holyrood and Cardiff Bay will be at its lowest ever, falling sharply from their historic highs of 39.5% and 50% respectively in 2003.

On ethnicity too, the parties are failing to be properly representative. While the number of ethnic minority candidates has increased since 1999, that is only 1.7% in Wales and 2.86% in Scotland of all 835 candidates we have recorded. However, for many their chances of being elected are very slim because they are in unwinnable seats or placed too low down on regional lists.

Even though about 4% of Scotland's 5.2m population is non-white, only one Asian-Scot, the SNP list candidate for Glasgow, Humza Yousaf, is very likely to be elected. In Wales, where about 3% of its 3m population is non-white, there may be one or two elected.

There are at least half a dozen "out" lesbian, gay and bisexual candidates in both Scotland and Wales: in Scotland there are four ex-MSPs standing for re-election who are LGBT, including the Green's co-convenor Patrick Harvey. Again, this falls far short of the 6% of the population conservatively estimated to be non-heterosexual.

We have calculated the ratio of candidates by gender and ethnicity by treating any person standing for both a constituency and a list seat as being two candidates. So they are counted twice, as the fact they are the same person makes no difference to their overall chances of being eventually elected.

On the spreadsheet naming all 2011 candidates in Scotland, any personstanding for both a constituency seat and on a regional list has each seat and list against their name.

We have not included other minority parties, such as the Scottish Socialist party, because it endured a major split in 2006 and had no MSPs elected in 2007. However, the SSP's success in 2003 in getting four women elected out of its six MSPs did boost Holyrood's rates of female representation to 39.5% in 2003 – it's highest ever level.

The continual presence of Margo Macdonald, the pro-nationalist independent MSP for the Lothians, in every Holyrood parliament should also be kept in mind.

We have not included the Northern Irish assembly at Stormont becauseparties there are still to finally report their list of candidates. However, Stormont has had one ethnic Chinese woman member, Anna Lo, who represented South Belfast for the Alliance party since 2007. She is the only east Asian elected in any UK legislature.

Some candidates have stepped down and in Wales the Tories in particular have not published their full lists of candidates: the data used here is based on the declared position on 31 March 2011.

Additional research and reporting by Paris Gourtsoyannis and Jennifer McClure.