Source data for Hour of Code infographic 12/15/2013

When comparing the Hour of Code with all past US computer science education, it’s important to note that there aren’t perfect sources for US computer science education. So we’ve used best guesses to approximate things, but to be conservative we’ve been very generous in over-estimating the past history of computer science education in the US, and the Hour of Code still beats even the most generous estimates handily.

Important caveat: we are only comparing participation. Obviously a high school student taking a year-long AP Computer Science course will learn far more than an elementary school student in 1 hour. But the comparison is legit because our goal for the Hour of Code was participation.

Measuring Hour of Code participation - US K-12 students participating in schools

Our data on Hour of Code participation comes from the Code.org and CSEdWeek.org web site, which show 15 million students participating in the Hour of Code as of 12/15/2013.

We limit the count to US students by using Google Analytics geo-IP data. (83% of students visited from the US)

We limit ourselves to K-12 aged students using an exit-survey of participants (74% were K-12 aged students)

We limit the count to participation inside school by counting only participation during school hours (8am - 4pm), which is 89% of participation

When you multiply 15 million * 83% * 74% * 89%, this gives us the right picture for the week:

The total in-school participation in the Hour of Code by US K-12 students = 8.3 million students

Important note: We measure students who start the Hour of Code, because our goal has been participation, rather than completion. However, if you check out the Total lines of code written, you will see that the average student in the Code.org tutorial has written quite a lot of code, which shows that participation is far more than just beginning an Hour of Code.

Additional important note: We have not yet counted participation by students who performed the Hour of Code as a group activity, an unplugged activity, an app, or using tutorials that didn’t involve Code.org and its tutorial partners - none of these cases can be measured via our Web site. We are issuing a teacher survey to count these participants too. Once counted, these will boost the participation counts of the Hour of Code, making the comparison more extreme.

Count of girls, African Americans, and Hispanic Americans participating in the Hour of Code is extrapolated from surveys.

4.2mm girls in US K-12 schools. 1.2mm Hispanic Americans. 680,000 African Americans

Measuring participation in computer science in past history

The best data available for Advanced Placement Computer Science participation, as measured by the College Board. This isn’t a complete picture of computer science education, but at least it provides an accurate measure of annual participation by students taking AP tests, with a gender/race breakdown.

17,652 students studied AP CS annually from 1992 - 2013.

We’ve extrapolated this to cover all computer science education using two very generous assumptions:

(1) we assume that the AP exam measures only 15% of US K-12 participation in computer science education, i.e. that all K-12 computer science education is 6 times larger than the AP computer science program.  This is a very generous multiplier. A big multiplier is appropriate, because not every AP CS student takes the AP exam, and because introductory computer science is at least as big or more likely 2x or 3x larger than AP computer science. And lastly, many elementary schools and middle schools offer elementary programs. However, even if you put all of these together, AP Computer Science is most definitely larger than 15% of the whole. Because we can’t measure the whole, we used a generous multiplier to avoid any doubt.

(2) We extrapolate the average participation in the last 20 years of AP CS all the way to 30 years. This is also overly generous. If you look at the year by year participation stats, 1992 participation in AP CS was one third of the 2013 participation. Using the 20-year average to extrapolate the prior 10 years is again very generous.  We assume that prior to 30 years ago computer science education in K-12 schools was practically non-existent. (Personal computers were practically non-existent prior to 1983, and would be a rounding error relative to the whole.)

Our extrapolation says that all K-12 computer science in history is 3.5mm students

We use these generous multipliers partly because we are also extrapolating gender/race participation using the AP CS participation stats. We expect that AP CS has even harsher under-representation by women, African Americans, and Hispanic Americans than the rest of computer science. However, by over-estimating the total participants in computer science, we believe we are still getting a fair picture of female, African American, and Hispanic American participation in K-12 computer science.

Multiplying the AP CS representation stats out for all history gives us 660,000 girls, 273,000 Hispanic Americans, and 144,000 African Americans having studied computer science in US K-12 schools in all history.

See this spreadsheet for the detailed calculations and source data

For the comparison of total lines of code written, the only data we have is from students who used the Code.org tutorials, which is a fraction of the whole. For more information (and important caveats about the use of any "lines of code" comparison), see http:// code.org/loc