How Much Ageism Exists in High Tech?

On August 4, 2017, an article appeared in USA Today titled Ageism is forcing many to look outside Silicon Valley, but tech hubs offer little respite. It begins:

For years, job hunting over the age of 40 in the youth-obsessed Silicon Valley could prove hazardous to your career.

But judging from the experiences of technology workers roaming the country in search of job opportunities elsewhere, ageism is a universal problem in the industry.

The article then describes the experience of one older worker and then continues:

Age is the silent career killer in the tech industry. While companies openly wrestle with the lack of racial and gender diversity, regularly releasing workforce demographics, they refuse to disclose the average age of their staffers and offer little in the way of internal support for older workers.

Despite this, the article does give some numbers further on in the article:

The median age of an American worker is 42. Yet at Facebook it's 29, Google 30, Apple 31, Amazon 30 and Microsoft 33, according to self-reported employee data collected by research firm PayScale last year. (It did not collect data this year.) Most job candidates at those companies are 25 to 34 years old, according to data collected by Glassdoor, a jobs and recruiting website.

It's possible to do some investigation of this topic using the Census data that I described in my prior post. Following is my description of that data:

The following Python code looks at data from the 2016 American Community Survey (ACS). The data can be created by going to the IPUMS USA website, logging in (creating an account, if necessary), and creating an extract with the variables STATEFIP, COUNTY, MET2013, PUMA, CITIZEN, EMPSTAT, and OCC. The variables YEAR, DATANUM, SERIAL, HHWT, GQ, PERNUM, and PERWT are automatically preselected. For samples, select ACS for 2016. For data format, select .csv. For structure, select rectangular. For more information, see IPUMS Documentation: User's Guide. You should receive an email when your extract is ready. You can then download, rename it to acs2016.csv, and place it in the same directory as the following Python code and run the code.

The one necessary change to the above is that the variable AGE must also be selected for the extract. As before, the extract is copied to the file acs2016.csv. The following code reads this file and lists the percentage of workers with OCC code 1020 (Software developers, applications and systems software) who are in selected age groups. It will do this for all U.S. counties with 5000 or more such workers and display them in ascending order of the percent who are 65 or older. Following is the code, followed by the output:

In [15]:
import pandas as pd
# ACS Occupation Codes at https://usa.ipums.org/usa/volii/occ_acs.shtml
# (described at https://www.census.gov/content/dam/Census/library/publications/2016/acs/acs-35.pdf)
#  110 = Computer and information systems managers
# 1010 = Computer programmers
# 1020 = Software developers, applications and systems software 
# print(pd.get_option('display.width'))
pd.set_option('display.width', 120)

def getAgeGroupByCounty(min_count, occs, ages, isort, ascending, title):
    fipref = "https://www2.census.gov/geo/docs/reference/codes/files/national_county.txt"
    mm = pd.read_csv(fipref, skiprows=0, names=['State','StateCode','CountyCode','County','H1'])
    mm['CountyCode'] *= 10

    usa = pd.read_csv("acs2016.csv")
    if len(occs) > 1:
        occ_start = occs[0]
        for i in range(1,len(occs)):
            if occs[i] >= 0:
                occ_end = occs[i]
                usa.loc[usa['OCC'] == occ_end,'OCC'] = occs[0]
            else:
                occ_end = -occs[i]
                usa.loc[(usa['OCC'] >= occ_start) & (usa['OCC'] <= occ_end),'OCC'] = occs[0]
            occ_start = occ_end + 1
    agevars = ['0-' + str(ages[0]-1)]
    usa.loc[usa['AGE'] < ages[0],'AGE'] = 1000
    for i in range (1,len(ages)):
        agevars.append(str(ages[i-1]) + '-' + str(ages[i]-1))
        usa.loc[usa['AGE'] < ages[i],'AGE'] = (i+1000)
    agevars.append(str(ages[len(ages)-1]) + '-99')
    usa.loc[usa['AGE'] < 1000,'AGE'] = (len(ages)+1000)
    #print("usa[{0}] = {1}".format(usa.shape[0], sum(usa['PERWT'])))
    print("usa[%d] = %d\n" % (usa.shape[0], sum(usa['PERWT'])))

    gg = usa.groupby(['STATEFIP','COUNTY','AGE','EMPSTAT','OCC'])['PERWT'].sum()
    uu = gg.unstack('AGE')
    uu.columns = agevars
    uu = uu.fillna(0)
    uu['count'] = 0
    for i in range(0, len(agevars)):
        uu['count'] = uu['count'] + uu[agevars[i]]
    for i in range(0, len(agevars)):
        uu[agevars[i]] = (100 * uu[agevars[i]] / uu['count']).round(1)
    uu = uu.reset_index(level=['STATEFIP','COUNTY','EMPSTAT','OCC'])
    pp = uu[(uu['OCC'] == occs[0]) & (uu['EMPSTAT'] == 1) & (uu['count'] > min_count)]
    if isort < 0:
        isort = len(agevars)-1
        pp = pp.sort_values(by=[agevars[isort],agevars[isort-1],agevars[isort-2]], ascending=ascending)
    else:
        pp = pp.sort_values(by=[agevars[isort]], ascending=ascending)
    
    pp = pp[pp['COUNTY'] > 0]
    pp = pp.merge(mm, left_on=['STATEFIP','COUNTY'],right_on=['StateCode','CountyCode'],how='left')
    qqCounty = pp['County'].str.replace(' County','') + ", " + pp['State']
    qq=pd.DataFrame(qqCounty, columns=['County'])
    qq['count']=pp['count'].astype('int')
    for i in range(0, len(agevars)):
        qq[agevars[i]]=pp[agevars[i]]
    print(title)
    print(qq)
    return(qq)

qq1 = getAgeGroupByCounty(5000, [1020], [20,25,30,35,40,45,50,55,60,65], -1, True,
                          "Software Developers - Percent of Workers in Selected Age Groups\n")
usa[3156487] = 323127515

Software Developers - Percent of Workers in Selected Age Groups

               County  count  0-19  20-24  25-29  30-34  35-39  40-44  45-49  50-54  55-59  60-64  65-99
0        New York, NY   8738   0.0    9.5   23.6   20.7   26.3    9.1    6.8    2.4    1.6    0.0    0.0
1         Suffolk, MA   5998   2.1   15.7   26.2   31.0    4.7    5.7    6.1    5.8    2.8    0.0    0.0
2            Dane, WI   9100   0.0   23.3   19.7   24.5   10.2   13.3    3.9    2.2    2.9    0.0    0.0
3     Mecklenburg, NC   7596   0.0    5.6   14.9   26.3   19.7    8.3   11.6    9.2    4.4    0.0    0.0
4          Hudson, NJ   7074   0.0    2.8   21.8   37.6   26.2    4.6    3.5    3.0    0.0    0.5    0.0
5            King, WA  59652   0.0    8.5   23.3   17.3   17.0   12.5    9.7    6.2    4.3    1.3    0.0
6   San Francisco, CA  20299   0.0    9.8   32.9   22.6   12.5   11.2    4.5    4.0    1.0    1.4    0.0
7      Williamson, TX   7208   0.0    1.9   14.2   14.8   12.1   13.8   14.7   24.1    2.6    1.9    0.0
8          Travis, TX  14960   0.6    5.7   28.0   25.0    7.2    8.9   12.5    3.4    5.1    3.6    0.0
9      Montgomery, PA   5536   0.0   11.6    6.6   21.2   24.9    2.3   12.1   15.8    1.5    4.0    0.0
10           Wake, NC  16597   0.0    3.0    9.3   16.2   13.8   19.1   11.2   18.4    4.1    4.9    0.0
11         Orange, CA  16358   0.0    4.4   17.2   16.1   14.5   14.2   15.7    7.2    5.8    4.2    0.6
12      Middlesex, NJ   9998   0.0    0.3   16.1   16.1   20.7   18.7   15.5    9.0    1.8    1.2    0.7
13        Loudoun, VA  10816   0.0    2.5    6.3   17.2   29.1   16.0   13.2    7.6    5.9    1.6    0.7
14        Alameda, CA  41558   1.7    7.1   16.0   22.3   15.9   16.7    8.4    5.5    3.8    1.7    0.8
15      San Mateo, CA  13819   0.6    3.0   27.5   23.9   15.8   13.4    7.5    2.3    3.3    1.9    0.8
16    Santa Clara, CA  77315   0.1    5.4   20.0   20.6   17.1   11.0    9.7    7.4    5.8    2.0    0.8
17          Kings, NY   8605   0.0    2.8   26.3   31.9   10.7   12.6    2.5    3.1    1.7    7.6    0.8
18      Salt Lake, UT   8466   0.0   13.5   12.2   24.6    9.6   12.9    4.3    7.5   12.7    1.8    0.9
19       Hennepin, MN  15399   0.0    6.2   14.8   19.4   18.9   13.4   16.6    4.7    2.4    2.7    0.9
20         Harris, TX  11271   2.6    2.6   20.6   19.8    9.1   19.9    4.9    6.8   10.1    2.8    0.9
21   Hillsborough, FL   5072   0.0    3.9   14.7   10.3   27.7   15.4   10.1    6.6    5.6    4.8    0.9
22        Broward, FL   6173   0.0    6.5   21.8   13.6   15.9    7.3    8.7   13.0    7.8    4.2    1.1
23         Dallas, TX  12879   0.0    4.1   19.8   16.5   18.5   14.1   12.1    6.7    3.0    3.9    1.4
24     Washington, OR   7049   1.0    3.5   18.4   17.3   11.5   17.9   11.4    8.0    6.2    3.2    1.6
25         Collin, TX  14859   0.7    2.0   13.1   15.9   14.6   23.7    8.9   10.0    6.0    3.4    1.7
26      San Diego, CA  21275   0.0    2.3   13.8   20.5   19.0   14.1   11.0    5.3    6.9    5.4    1.7
27    Los Angeles, CA  32461   0.2    7.4   18.4   20.6   20.8    9.4    5.8    6.9    4.8    3.8    1.8
28        Harford, MD   7187   0.0    7.8   16.1   14.2   14.4   20.1    7.9   11.8    4.7    1.2    1.9
29   Contra Costa, CA   9796   1.3    3.6    8.6    8.4   14.0   30.0   11.4   10.6    9.0    1.2    2.0
30         Denton, TX   9306   0.0    2.0    9.0   15.7   14.4   16.4   13.8   14.9    5.3    6.5    2.0
31        Johnson, KS   7735   0.0    3.3   26.1   22.3    7.0   12.8    6.5   13.3    5.1    1.3    2.1
32         Orange, FL   8287   0.0   14.8   17.7   23.8   17.6    6.8    7.0    5.9    3.1    1.1    2.2
33     Sacramento, CA   6047   0.0    6.0   25.2   15.0   17.1    8.0   10.1    7.7    5.0    3.6    2.2
34      Snohomish, WA   6537   0.0    2.8   14.2   14.4   18.2    5.4   15.8   11.9   13.8    1.3    2.3
35       Maricopa, AZ  17412   1.1    3.6   12.9   19.8   17.4    9.2   13.1    7.9    5.6    7.0    2.3
36      Allegheny, PA   7526   1.1    7.5   14.9   24.3    9.3   12.4    7.5   10.3    7.9    2.0    2.8
37           Kent, MD   9114   0.0    2.6   13.1   16.5   19.3    9.5    6.6    6.0   14.7    8.8    2.9
38        Oakland, MI   9077   0.0    4.5   14.7   14.6   10.2   17.1   14.6   10.0    8.8    2.5    3.0
39         DuPage, IL   6441   0.0    6.4    7.6   10.0   21.4   17.5   11.8   10.4    9.3    2.2    3.2
40           Cook, IL  24401   0.0    2.9   19.8   27.2   17.0   10.9    7.9    6.3    2.2    2.8    3.2
41      Multnomah, OR   5035   0.0    3.6   34.5    9.2   18.1   10.7   10.6    6.6    2.4    0.9    3.5
42        Tarrant, TX   6436   0.0   12.0    0.0   16.6   12.7    9.4   17.5   13.6   10.8    3.0    4.5
43   Anne Arundel, MD   5259   0.0    1.5   17.2   15.9   12.1    5.3   13.6    9.0   13.2    2.0   10.3

As can be seen, the first 11 counties had no such workers 65 and older (in the survey) and less than 2 percent between 60 and 64. These include two counties with a relatively large number of such workers, San Francisco County, CA and King County, WA, the home of Microsoft and Amazon headquarters. San Francisco is also noteworthy in that nearly a third of these workers are between 25 and 29. At the other extreme is Maricopa County, Arizona , home of the city of Phoenix, in which 9.3 percent of such workers were 60 or older and in which all 5-year age groups contained under 20 percent of the workers.

The following statement runs the same function for all Computer and Mathematical Occupations, including the managers for those workers. It does this for all counties with 20,000 of such workers or more.

In [16]:
qq2 = getAgeGroupByCounty(20000, [110,1000,-1299], [20,25,30,35,40,45,50,55,60,65], -1, True,
                          "Computer and Mathematical Occupations - Percent of Workers in Selected Age Groups, by County\n")
usa[3156487] = 323127515

Computer and Mathematical Occupations - Percent of Workers in Selected Age Groups, by County

                      County   count  0-19  20-24  25-29  30-34  35-39  40-44  45-49  50-54  55-59  60-64  65-99
0                   Dane, WI   25855   0.0   12.8   16.6   18.0   11.8   11.5    8.4   11.8    7.3    1.9    0.0
1                 Hudson, NJ   24851   0.0    2.8   27.4   24.5   22.3    9.5    4.8    6.2    1.8    0.5    0.2
2               New York, NY   39521   0.5   13.8   23.1   23.0   16.0    6.6    6.1    6.1    3.2    1.1    0.5
3          San Francisco, CA   41313   0.0    8.1   29.1   22.9   12.6    9.4    8.5    4.0    2.3    2.3    0.8
4              Salt Lake, UT   25892   0.8    7.2   12.7   18.4   13.3   16.4    8.0    8.5    8.5    5.4    0.8
5            Mecklenburg, NC   29136   0.0    3.8   15.5   15.0   16.4   14.7   13.8    9.2    8.2    2.4    0.9
6                 Travis, TX   44308   0.2    4.5   20.4   17.9   12.6   10.9   16.0    7.7    6.0    3.0    0.9
7              San Mateo, CA   27322   0.3    4.8   20.3   16.8   15.1   15.2   11.8    5.6    5.3    3.8    0.9
8              Allegheny, PA   32491   0.3    8.2   12.7   19.1   12.6   12.4    8.7   10.3    9.5    5.4    0.9
9            Santa Clara, CA  128398   0.4    4.9   16.6   20.2   16.9   12.0   10.4    7.7    6.8    3.0    1.0
10              Hennepin, MN   46650   0.1    4.2   13.7   23.3   16.3   14.0   10.8    7.5    4.9    4.1    1.0
11          Contra Costa, CA   29353   0.4    3.8    5.3   11.6   18.0   21.7   12.2   12.9    9.9    3.0    1.3
12                 Bexar, TX   27129   0.2    3.5   14.8   18.3   15.5   14.4   10.1    8.5    7.6    5.7    1.3
13                  King, WA  111578   0.2    6.7   19.0   17.5   16.5   12.8   10.1    8.2    5.3    2.5    1.4
14               Alameda, CA   78852   1.2    5.2   12.6   20.5   16.2   16.5   10.0    7.6    5.7    3.1    1.4
15               Loudoun, VA   32191   0.0    2.0    7.0   13.7   21.4   21.0   13.2    9.7    6.8    3.8    1.4
16                Collin, TX   43766   0.2    2.1    8.9   13.8   10.0   21.5   14.3   15.9    6.8    5.0    1.4
17             Middlesex, NJ   33008   0.0    3.1   10.7   14.6   17.8   19.9   14.2    9.7    4.9    3.7    1.5
18                Queens, NY   30925   0.2    4.8   17.8   15.8   16.3   13.9   11.4    8.6    5.0    4.6    1.6
19          Hillsborough, FL   25243   0.1    4.4   12.6   14.1   16.7   11.0   14.2    8.9   10.0    6.2    1.7
20  District of Columbia, DC   22478   0.4    8.6   20.8   16.3   20.8    9.7   10.9    4.6    2.7    3.4    1.8
21            Montgomery, PA   24208   0.0    3.8   11.5   12.7   17.1    6.8   15.4   15.3   10.7    4.9    1.8
22                 Clark, NV   23135   0.2    6.6   21.4   10.7   10.3   15.0   11.7    9.7    7.0    5.6    1.8
23              Franklin, OH   32117   0.0    7.8   14.5   17.2   16.4    5.1   16.9    9.9    5.9    4.3    1.9
24            Montgomery, MD   27650   0.6    3.8   10.5   14.6   10.7   11.3   14.5   16.4    9.3    6.5    1.9
25              Maricopa, AZ   74087   0.3    5.9   13.4   16.3   12.6   10.9   15.2   10.3    6.6    6.6    1.9
26                Bergen, NJ   23616   0.0    6.7    6.4   13.8   13.9   16.6   14.3   13.4    4.9    8.2    1.9
27                DuPage, IL   30358   0.0    4.9    8.8   12.4   12.7   16.8   13.8   13.9   10.6    4.2    2.0
28                Nassau, NY   23151   0.0    4.8   14.8    9.3   12.9   11.8   15.8   15.1    9.0    4.5    2.0
29                  Wake, NC   47889   0.0    4.9    6.4   15.1   14.5   15.4   12.5   16.8    6.5    6.0    2.0
30                Orange, FL   23838   0.1    8.8   15.7   17.3   16.2    6.3   14.6   12.0    4.2    2.8    2.1
31               Oakland, MI   34069   0.3    4.6   11.8   13.0   11.6   16.3   16.6   11.0    8.5    4.3    2.1
32                Orange, CA   63529   0.1    3.5   15.7   14.9   12.0   14.6   14.1   10.9    6.5    5.7    2.1
33                  Cobb, GA   22988   0.0    1.9   11.8   15.7   18.3    9.8   12.5   13.9   10.4    3.5    2.2
34             Multnomah, OR   20981   0.0    2.8   17.8   20.1   18.3    9.0   12.7    6.9    6.1    4.0    2.2
35                 Kings, NY   41782   0.1    5.1   22.2   19.3   14.5   12.4    9.4    6.4    3.4    4.9    2.2
36             San Diego, CA   67259   0.2    6.1   13.7   18.4   16.3   12.8   10.7    7.8    6.7    5.0    2.2
37                  Cook, IL   95370   0.0    5.5   17.5   18.6   15.5   11.2   10.1    8.2    7.7    3.6    2.3
38             Baltimore, MD   21267   1.6   11.8    8.7   12.8    9.9    9.9   14.3    9.4   10.9    8.4    2.3
39                Harris, TX   61026   0.6    4.8   14.4   13.5   14.0   15.9   11.9    7.1    9.4    6.1    2.4
40              Cuyahoga, OH   20004   0.2    9.2   12.3   18.6   13.1    9.5   12.0    8.8    6.3    7.6    2.4
41               Johnson, KS   21418   0.3    5.0   11.3   13.2   12.2   10.8   13.6   16.2    7.3    7.5    2.5
42                Dallas, TX   48020   0.0    4.2   15.9   15.1   16.7   12.0   13.5    8.6    7.6    3.6    2.8
43            Sacramento, CA   27897   0.2    4.6   17.7   13.2   14.5    9.4    8.9   15.0    9.2    4.4    2.8
44           Los Angeles, CA  125766   0.6    7.2   14.6   18.5   15.7   12.5    8.9    7.5    7.1    4.7    2.8
45               Tarrant, TX   31274   0.2    6.3    9.2   12.5   14.4   16.4   16.0   10.6    7.3    4.1    3.0
46                Denton, TX   31810   0.0    2.5   11.3   12.5   11.5   17.7   16.3   12.5    7.2    5.4    3.1
47                  Kent, MD   42744   0.0    3.1   10.1   15.3   16.5   10.4   12.5    9.7   11.7    7.0    3.5
48              Gwinnett, GA   21417   0.0    8.2    6.5    7.8    8.3   15.8   11.7   14.4   14.8    8.9    3.5
49               Harford, MD   20088   1.1    3.8   11.5   10.6   15.4   20.2   13.0   11.9    5.5    3.5    3.6
50               Broward, FL   25727   0.0    3.0   13.0   14.6   14.0    9.5   14.2   14.3    7.4    6.0    3.9
51              Hartford, CT   22772   0.0    5.0   19.0   16.2   10.1   11.0    9.1    9.0   12.9    3.8    4.0
52          Anne Arundel, MD   22092   1.1    1.3   13.2   17.1   12.7   12.4    9.7    8.6   14.7    4.1    5.1

As can be seen, the first 3 counties had less than 2 percent of such workers 60 or older. These include New York County, NY and Hudson County, NJ, which is just across the Hudson River from Manhattan. San Francisco is fourth with 3.1 percent of such workers 60 or older and 29.1 percent of such workers between 25 and 29. One county at the other extreme is Baltimore County, MD in which no 5-year age group between 20 and 64 has less than 8.4 percent or more than 14.3 percent of such workers.

Finally, the following statement runs the same function for all occupations in counties with a half a million or more workers:

In [17]:
qq3 = getAgeGroupByCounty(500000, [0,-9999], [20,25,30,35,40,45,50,55,60,65], -1, True,
                          "All Occupations - Percent of Workers in Selected Age Groups, by County\n")
usa[3156487] = 323127515

All Occupations - Percent of Workers in Selected Age Groups, by County

                County    count  0-19  20-24  25-29  30-34  35-39  40-44  45-49  50-54  55-59  60-64  65-99
0           Travis, TX   673525   2.7    8.3   15.6   14.9   12.6   11.2    9.8    8.5    7.7    5.3    3.4
1           Orange, FL   654815   2.1   10.6   14.1   12.9   11.8   10.4   10.3   10.3    8.3    5.4    3.7
2             Wake, NC   558792   3.5    8.7   11.4   11.6   12.1   11.9   11.8   10.4    9.4    5.5    3.7
3      Mecklenburg, NC   550354   3.0    8.5   13.2   13.8   11.0   11.7   11.6    9.2    7.9    6.3    3.8
4     Philadelphia, PA   680344   2.2   10.2   17.5   15.0   12.2    8.7    8.4    8.6    8.3    4.9    3.9
5       Sacramento, CA   688799   3.0    9.3   13.5   12.1   11.1   10.8   10.3   10.7    8.9    6.2    3.9
6   San Bernardino, CA   891046   3.0   11.8   12.5   11.6   10.8   11.0   10.8   10.5    8.4    5.6    4.0
7            Bexar, TX   907951   3.9   11.1   13.0   12.5   11.6   10.8   10.0    9.4    8.3    5.3    4.1
8        Salt Lake, UT   576964   4.6   11.1   12.9   12.3   13.4    9.7    9.7    8.4    8.1    5.5    4.1
9           Harris, TX  2199446   2.7    9.6   13.1   12.8   12.2   10.9   10.6    9.6    8.7    5.7    4.1
10           Bronx, NY   610265   2.1    9.5   14.1   11.9   12.7   10.4   10.7   10.5    7.8    6.3    4.1
11   San Francisco, CA   508699   1.0    6.3   17.7   16.8   12.8   10.2    9.7    8.5    7.4    5.5    4.2
12        Franklin, OH   655909   3.4    9.8   15.6   13.3   11.0    9.1    9.9    9.4    8.3    6.0    4.2
13         Tarrant, TX  1004918   4.1    9.6   11.9   12.1   11.4   10.6   10.8   10.2    8.8    6.1    4.3
14           Kings, NY  1235476   1.2    7.8   16.0   14.7   12.2   10.9    9.7    9.2    7.8    6.3    4.3
15       Riverside, CA  1011383   3.1   10.2   12.2   11.8   11.2   10.9   10.9   11.2    8.8    5.4    4.4
16    Hillsborough, FL   672158   3.2    8.9   12.8   12.1   10.9   11.6   11.4   10.2    8.6    5.8    4.4
17          Queens, NY  1147376   1.6    7.3   12.8   12.6   12.1   11.4   11.4   10.7    9.1    6.8    4.4
18         Alameda, CA   848520   2.1    7.7   13.0   13.2   11.5   11.6   10.8   10.1    9.1    6.3    4.5
19           Wayne, MI   743215   3.5   10.4   12.0   10.2   10.1   10.6   11.3   11.2   10.0    6.3    4.5
20     Los Angeles, CA  4884667   2.1    9.1   13.4   12.2   11.2   11.0   11.0   10.5    8.8    6.1    4.6
21            Cook, IL  2561499   2.5    8.9   13.8   13.3   11.4   10.5   10.2    9.8    8.4    6.7    4.6
22           Clark, NV  1016998   2.7    9.8   12.0   11.9   11.4   11.4   11.4   10.2    8.4    6.1    4.7
23     Santa Clara, CA   980389   2.5    8.2   11.8   12.5   11.6   11.4   11.5   10.7    8.9    6.3    4.7
24          Dallas, TX  1291174   2.8   10.3   13.5   12.4   11.5   10.8   10.2    9.5    8.1    6.1    4.8
25        Maricopa, AZ  1993237   3.7   10.4   12.3   11.3   11.1   10.6   10.7   10.4    8.5    6.2    4.8
26            King, WA  1175316   2.4    8.2   13.8   13.2   11.3   10.6   10.9    9.6    8.6    6.6    4.8
27        Hennepin, MN   688378   3.2    8.8   13.4   14.0   10.7    8.9   10.3    9.9    9.3    6.7    4.8
28       San Diego, CA  1653126   2.9   11.2   13.0   12.4   11.0   10.0   10.1    9.5    8.7    6.2    4.9
29          Orange, CA  1596147   2.7    9.5   12.1   10.8   10.1   10.5   11.7   11.1    9.5    6.7    5.4
30    Contra Costa, CA   550330   2.4    8.0   10.1   10.9   10.7   11.5   12.1   12.0    9.8    6.9    5.6
31         Broward, FL   955278   2.3    7.7   10.6   11.0   10.4   11.0   11.9   11.6   10.5    7.1    5.8
32        Cuyahoga, OH   592362   4.1   10.0   11.7   10.9    9.7    8.8   10.1   10.6   10.3    7.8    5.9
33         Oakland, MI   645214   3.4    8.4    9.9   10.2    9.3   10.1   11.7   12.1   11.2    7.7    6.0
34        New York, NY   899366   1.0    6.8   17.7   17.0   12.0    9.4    8.7    8.3    7.4    5.6    6.2
35         Suffolk, NY   742195   3.5    8.7    9.3    8.7    9.5   10.2   12.3   13.0   10.9    7.7    6.2
36       Allegheny, PA   632629   3.2    8.3   12.4   12.0    9.3    8.8    9.7   10.4   11.1    8.4    6.3
37       St. Louis, MO   501439   4.5    8.9   10.0   10.4   10.1    9.9    9.9   11.1   10.5    8.4    6.4
38            Kent, MD   563771   2.6    7.3    9.4   10.7   11.1   11.4   11.0   11.3   10.9    7.3    7.0
39        Honolulu, HI   521400   2.7   11.2   12.6   11.2   10.2   10.0    9.3    9.8    9.0    6.8    7.2
40          Nassau, NY   682380   2.2    8.3    8.8    8.9   10.2    9.5   11.8   12.6   11.9    8.4    7.4
41      Palm Beach, FL   665286   2.9    8.5   10.5    8.9   10.0   10.3   11.2   11.7   10.2    7.9    8.0

As can be seen, the percentage of all workers 65 or older ranges from 3.4 percent for Travis County, Texas (home to Austin) and Palm Beach, Florida. For workers 60 or older, the percentage seems to range from 8.7 to 15.9 for the same two counties.

In order to better compare the difference between the percentages for Software Developers, All Computer and Mathematical Occupations, and All Occupations, the following code create graphs of the numbers for the 8 counties with the most software developers:

In [18]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

def plotAges(ax, county):
    labels = qq1.columns[2:13]
    SWDevelop = qq1[qq1['County'] == county].iloc[0,2:13]
    CompMath  = qq2[qq2['County'] == county].iloc[0,2:13]
    AllJobs   = qq3[qq3['County'] == county].iloc[0,2:13]
    df = pd.DataFrame({'SW Develop':SWDevelop, 'Comp & Math':CompMath, 'All Jobs':AllJobs})
    df = df[['SW Develop','Comp & Math','All Jobs']]
    ax.plot(labels, df)
    ax.grid(zorder=0)
    scounty = county.replace(",", " County,")
    ax.set_title("Ages of Workers in " + scounty + ", 2016")
    ax.set_xlabel("Age in Years")
    ax.set_ylabel("Percent of All Workers")
    start, end = ax.get_ylim()
    ax.set_yticks(np.arange(0, end, 5))
    ax.legend(df.columns)

fig, axes = plt.subplots(8, 1, figsize=(8, 40))
#fig.subplots_adjust(left=None, bottom=None, right=None, top=None)
fig.subplots_adjust(wspace=None, hspace=0.3)
plotAges(axes[0], 'San Francisco, CA')
plotAges(axes[1], 'King, WA')
plotAges(axes[2], 'Alameda, CA')
plotAges(axes[3], 'Santa Clara, CA')
plotAges(axes[4], 'Los Angeles, CA')
plotAges(axes[5], 'San Diego, CA')
plotAges(axes[6], 'Maricopa, AZ')
plotAges(axes[7], 'Cook, IL')

As can be seen in the graphs, the percentages for All Occupations tends to go from just above zero for the 0-19 age group, up to between about 12 and 14 percent for the 25-29 age group (except for San Francisco with 17.7 percent), and then slopes back down to about 5 percent for the 65 and older age group. For Software Developers, the percentage peaks above 30 percent for San Francisco, CA and above 20 for King, WA, both in the 25-29 age group. The other 6 counties all peak just above 20 percent in the 30-34 age group, except for Cook, IL which peaks above 25 percent for that group and Los Angeles, CA which peaks in the 35-39 age group. The percentage then slopes down relatively sharply to the 65 and old group, reaching close to zero for San Francisco, CA and King, WA, about 1 percent for Alameda, CA and Santa Clara, CA, and 2 to 3 percent for the other 4 counties. For All Computer and Mathematical Occupations, the percentages generally are close to those for Software Developer, just a little less severe in their variability.

From the above graphs, it would appear that ageism does exist in the tech industry and is a little more severe in Silicon Valley and King County, Washington. However, there is a question as to how much this may be caused by the young age of H-1B workers. According to Table 5 on page 9 of Characteristics of H-1B Specialty Occupation Workers, Fiscal Year 2017 Annual Report to Congress, the largest cohort for all H-1B beneficiaries is the 35-39 group with 40.2 percent. The Census numbers don't contain H-1B status but this can be estimated by looking at citizenship status. In fact, this should include workers who are on other types of non-citizen worker visas as well. The following code is similar to the prior code except that it also divides the data by citizenship status. As shown here, the possible categories are "N/A", "Born abroad of American parents", "Naturalized citizen", and "Not a citizen". The following code combines the first two categories into the category "Citizen by birth".

In [19]:
import pandas as pd
# ACS Occupation Codes at https://usa.ipums.org/usa/volii/occ_acs.shtml
# (described at https://www.census.gov/content/dam/Census/library/publications/2016/acs/acs-35.pdf)
#  110 = Computer and information systems managers
# 1010 = Computer programmers
# 1020 = Software developers, applications and systems software 
# print(pd.get_option('display.width'))
pd.set_option('display.width', 120)

def getAgeGroupByCountyCitizen(min_count, occs, ages, cit, isort, ascending, title):
    fipref = "https://www2.census.gov/geo/docs/reference/codes/files/national_county.txt"
    mm = pd.read_csv(fipref, skiprows=0, names=['State','StateCode','CountyCode','County','H1'])
    mm['CountyCode'] *= 10

    usa = pd.read_csv("acs2016.csv")
    usa.loc[usa['CITIZEN'] == 1,'CITIZEN'] = 0
    if len(occs) > 1:
        occ_start = occs[0]
        for i in range(1,len(occs)):
            if occs[i] >= 0:
                occ_end = occs[i]
                usa.loc[usa['OCC'] == occ_end,'OCC'] = occs[0]
            else:
                occ_end = -occs[i]
                usa.loc[(usa['OCC'] >= occ_start) & (usa['OCC'] <= occ_end),'OCC'] = occs[0]
            occ_start = occ_end + 1
    agevars = ['0-' + str(ages[0]-1)]
    usa.loc[usa['AGE'] < ages[0],'AGE'] = 1000
    for i in range (1,len(ages)):
        agevars.append(str(ages[i-1]) + '-' + str(ages[i]-1))
        usa.loc[usa['AGE'] < ages[i],'AGE'] = (i+1000)
    agevars.append(str(ages[len(ages)-1]) + '-99')
    usa.loc[usa['AGE'] < 1000,'AGE'] = (len(ages)+1000)
    #print("usa[{0}] = {1}".format(usa.shape[0], sum(usa['PERWT'])))
    print("usa[%d] = %d\n" % (usa.shape[0], sum(usa['PERWT'])))

    gg = usa.groupby(['STATEFIP','COUNTY','AGE','EMPSTAT','OCC','CITIZEN'])['PERWT'].sum()
    uu = gg.unstack('AGE')
    uu.columns = agevars
    uu = uu.fillna(0)
    uu['count'] = 0
    for i in range(0, len(agevars)):
        uu['count'] = uu['count'] + uu[agevars[i]]
    #for i in range(0, len(agevars)):
    #    uu[agevars[i]] = (100 * uu[agevars[i]] / uu['count']).round(1)
    uu = uu.reset_index(level=['STATEFIP','COUNTY','EMPSTAT','OCC','CITIZEN'])
    pp = uu[(uu['OCC'] == occs[0]) & (uu['EMPSTAT'] == 1)  & (uu['CITIZEN'] == cit) & (uu['count'] > min_count)]
    if isort < 0:
        isort = len(agevars)-1
        pp = pp.sort_values(by=[agevars[isort],agevars[isort-1],agevars[isort-2]], ascending=ascending)
    else:
        pp = pp.sort_values(by=[agevars[isort]], ascending=ascending)
    
    pp = pp[pp['COUNTY'] > 0]
    pp = pp.merge(mm, left_on=['STATEFIP','COUNTY'],right_on=['StateCode','CountyCode'],how='left')
    qqCounty = pp['County'].str.replace(' County','') + ", " + pp['State']
    qq=pd.DataFrame(qqCounty, columns=['County'])
    qq['count']=pp['count'].astype('int')
    for i in range(0, len(agevars)):
        #qq[agevars[i]]=pp[agevars[i]]
        qq[agevars[i]]=pp[agevars[i]].astype(int)
    print(title)
    print(qq)
    return(qq)

# qq1 = getAgeGroupByCounty(5000, [1020], [20,25,30,35,40,45,50,55,60,65], -1, True,
#                           "Software Developers - Percent of Workers in Selected Age Groups\n")
qq1usa = getAgeGroupByCountyCitizen(4000, [1020], [20,25,30,35,40,45,50,55,60,65], 0, -1, True,
                          "Software Developers - Number of US-born Citizens in Selected Age Groups\n")
qq1nat = getAgeGroupByCountyCitizen(1000, [1020], [20,25,30,35,40,45,50,55,60,65], 2, -1, True,
                          "Software Developers - Number of Naturalized Citizens in Selected Age Groups\n")
qq1nac = getAgeGroupByCountyCitizen(2000, [1020], [20,25,30,35,40,45,50,55,60,65], 3, -1, True,
                          "Software Developers - Number of Non-citizens in Selected Age Groups\n")
usa[3156487] = 323127515

Software Developers - Number of US-born Citizens in Selected Age Groups

               County  count  0-19  20-24  25-29  30-34  35-39  40-44  45-49  50-54  55-59  60-64  65-99
0         Suffolk, MA   4466   125    942   1278   1229    190    272    263     74     93      0      0
1        New York, NY   5785     0    756   1683    777   1420    319    596     97    137      0      0
2            Dane, WI   5667     0   2119   1050    432    428    996    356     21    265      0      0
3      Williamson, TX   5213     0      0    681   1002    389    630    767   1544     92    108      0
4   San Francisco, CA  12177     0   1813   3838   2887   1453   1155    285    379    203    164      0
5           Kings, NY   5021     0    195   1610   1634    464    398    116    269     77    258      0
6          Orange, CA   7702     0    651   1776   1632    893    440   1079    535    305    391      0
7            Wake, NC  10650     0    498    752   1477   1438   2069   1371   2146    480    419      0
8          Travis, TX  11492     0    773   3547   2433    788   1306   1143    321    648    533      0
9            King, WA  29660     0   2762   6617   3814   4535   4112   2950   2186   1999    685      0
10         Harris, TX   7786   290    210   1821   1163    653   1520    344    396   1084    256     49
11      Salt Lake, UT   6930     0    533   1032   1514    670   1095    151    634   1078    150     73
12        Loudoun, VA   5178     0    272    512   1106    556    600   1029    397    569     59     78
13        Johnson, KS   4975     0    109   1453    955    540    362    211    853    397      0     95
14      San Mateo, CA   5436    77    298   1076   1039    781    874    511    192    304    168    116
15     Washington, OR   4194    71    249    774    173    621    958    421    243    341    227    116
16       Hennepin, MN   9382     0    951    912   1685   1666    899   1621    730    368    413    137
17        Harford, MD   4378     0    560    667    466    499    612    270    848    231     86    139
18         Dallas, TX   6941     0    528   1579    856    803    659    865    592    385    497    177
19      Multnomah, OR   4300     0     96   1736    463    692    468    357    190    120      0    178
20         Orange, FL   5675     0   1229    983   1040    933    300    298    364    256     88    184
21         Denton, TX   5526     0    190    712    561    694    387    741    955    490    607    189
22   Contra Costa, CA   4277   127    355    471    384    843    903    360    329    198    114    193
23      Allegheny, PA   5851     0    562    793   1094    464    640    565    776    594    152    211
24         Collin, TX   6782   106    291    617    679    738   1614    752    981    524    225    255
25        Alameda, CA  12763   687   1656   3281   1878   1147   1237    561    786   1112    135    283
26        Tarrant, TX   5023     0    771      0    712    516    511   1009    628    394    194    288
27       Maricopa, AZ  12558   191    554   1698   2099   2121   1076   1518   1028    763   1212    298
28      San Diego, CA  12729     0    314   1593   2575   2195   1543   1628    874    800    845    362
29    Santa Clara, CA  19199    98   2467   4349   2663   1661   1621   1733   1956   1785    490    376
30    Los Angeles, CA  16378    63   1472   4413   2659   2929   1070    657   1458    878    345    434
31   Anne Arundel, MD   4915     0     79    651    834    638    278    714    472    602    104    543
32           Cook, IL  14725     0    459   2332   3376   2606   1470   1200   1310    526    672    774
usa[3156487] = 323127515

Software Developers - Number of Naturalized Citizens in Selected Age Groups

               County  count  0-19  20-24  25-29  30-34  35-39  40-44  45-49  50-54  55-59  60-64  65-99
0            Cook, IL   2458     0      0    599     70    451    790    383    165      0      0      0
1        Hennepin, MN   2794     0      0      0    319    877    657    941      0      0      0      0
2          Nassau, NY   1158     0      0    112    321    118    336    259     12      0      0      0
3        New York, NY   1147     0      0    275    278      0    478      0    116      0      0      0
4      Montgomery, PA   1152     0      0      0    372    209      0    270    301      0      0      0
5          Dallas, TX   1931     0      0    134    125    627    445    444    156      0      0      0
6          Denton, TX   1715     0      0      0      0     43    937    301    434      0      0      0
7     Mecklenburg, NC   1211     0      0      0    140    371     85    539      0     76      0      0
8            Lake, IL   1158     0      0      0      0    147    454    176    300     81      0      0
9      Washington, OR   1005     0      0      0      0     58    301    235    318     93      0      0
10     Williamson, TX   1033     0      0      0      0    382    362      0    196     93      0      0
11      Fort Bend, TX   1654     0      0      0      0    503    532    266    259     94      0      0
12        Harford, MD   1164     0      0      0     53    410    293    298      0    110      0      0
13         Travis, TX   1230    96     60      0    282      0     19    556     99    118      0      0
14   Contra Costa, CA   2858     0      0    101     56    113    919    382    603    684      0      0
15           Kane, IL   1467     0      0      0     95    495      0      0    104    773      0      0
16           King, WA   6499     0    246     88    545   1056   1791   1079   1368    255     71      0
17         Mercer, NJ   1327     0      0      0      0    191    682     94    267      0     93      0
18      San Mateo, CA   2014     0      0    283     63    486    543    269    121    154     95      0
19        Loudoun, VA   3243     0      0      0    292   1150    866    398    428      0    109      0
20   Hillsborough, FL   1238     0      0      0     63    261    528     54    220      0    112      0
21      Middlesex, NJ   2747     0     25      0     76    179    724   1087    534      0    122      0
22  San Francisco, CA   2874     0      0    273    630    423    633    452    338      0    125      0
23         DuPage, IL   1294     0      0      0      0    283      0    399    203    265    144      0
24        Broward, FL   1470     0     73    103      0    185     76    477    280    106    170      0
25        Ventura, CA   1271     0    110      0      0      0    468      0    275    228    190      0
26         Collin, TX   3727     0      0    431    137    205   1372    572    506    290    214      0
27           Wake, NC   2049     0      0      0    228     97    553    422    290    200    259      0
28         Queens, NY   1694     0      0    117    299    106     82    359    365     74    292      0
29      San Diego, CA   5539     0    173    744    909   1042   1048    575    186    548    314      0
30         Harris, TX   1020     0     84      0    103      0    312    211    197      0     55     58
31        Alameda, CA  11360     0     89    984   1652   1318   2566   2360   1375    395    558     63
32      Snohomish, WA   1288     0      0    328      0      0      0    203    107    577      0     73
33          Kings, NY   2384     0      0    418    548    306    595     49      0      0    395     73
34      Fairfield, CT   1147     0      0      0      0    101    501    320    151      0      0     74
35       Somerset, NJ   1403     0      0      0      0      0    345    295    285    143    247     88
36        Oakland, MI   1953     0      0      0      0    136    585    520    532      0     91     89
37       Monmouth, NJ   1297     0      0      0      0     67     46    444    454    128     64     94
38         Orange, CA   5457     0     64      0    149    672   1701   1248    649    574    296    104
39       Maricopa, AZ   1466     0     69     53      0    244    231    642    120      0      0    107
40    Los Angeles, CA   6832     0    219    258   1241   1300    816    868    473    608    889    160
41           Kent, MD   2849     0      0      0    257    498    533    141    252    511    457    200
42    Santa Clara, CA  20112     0    637   1162    908   3416   3324   3993   3086   2506    808    272
usa[3156487] = 323127515

Software Developers - Number of Non-citizens in Selected Age Groups

               County  count  0-19  20-24  25-29  30-34  35-39  40-44  45-49  50-54  55-59  60-64  65-99
0    Contra Costa, CA   2661     0      0    266    383    418   1118    373    103      0      0      0
1   San Francisco, CA   5248     0    180   2576   1076    652    486    175    103      0      0      0
2       San Mateo, CA   6369     0    110   2445   2203    918    441    252      0      0      0      0
3            Cook, IL   7218     0    239   1902   3194   1080    399    341     63      0      0      0
4          DuPage, IL   2206     0      0    388    499    678    424      0    217      0      0      0
5        Hennepin, MN   3223     0      0   1365    980    372    506      0      0      0      0      0
6          Bergen, NJ   2026     0      0    557    614    399    285    171      0      0      0      0
7          Hudson, NJ   4998     0    199   1157   2167   1310     96     69      0      0      0      0
8     Mecklenburg, NC   3713     0      0    937   1618    786    312     60      0      0      0      0
9         Chester, PA   2208     0      0     82    162    853    851     84    176      0      0      0
10         Dallas, TX   4007     0      0    832   1138    955    717    250    115      0      0      0
11         Denton, TX   2065     0      0    128    898    602    198    239      0      0      0      0
12         Travis, TX   2238     0     18    642   1018    296      0    177     87      0      0      0
13           Dane, WI   3122     0      0    616   1796    497    213      0      0      0      0      0
14         Harris, TX   2465     0      0    498    963    369    407      0    177     51      0      0
15           Kent, MD   2362     0      0    300    755    988    267      0      0     52      0      0
16        Loudoun, VA   2395     0      0    165    459   1439    266      0      0     66      0      0
17    Los Angeles, CA   9251     0    724   1297   2798   2513   1161    363    324     71      0      0
18         Orange, CA   3199     0      0   1033    852    812    183    248      0     71      0      0
19        Alameda, CA  17435     0   1208   2400   5734   4146   3147    584    131     85      0      0
20      Middlesex, NJ   5927     0      0   1459   1403   1680    697    458    113    117      0      0
21      San Diego, CA   3007     0      0    607    867    805    402    143     59    124      0      0
22        Oakland, MI   3446     0      0    629   1177    630    440    425      0    145      0      0
23       Maricopa, AZ   3388     0      0    499   1357    673    287    129    229    214      0      0
24           King, WA  23493     0   2078   7200   5953   4524   1527   1743    128    340      0      0
25         Collin, TX   4350     0      0    894   1553   1228    542      0      0     71     62      0
26     Sacramento, CA   2535     0    113   1449    447    154      0    112    106     89     65      0
27           Wake, NC   3898     0      0    793    984    750    551     74    611      0    135      0
28    Santa Clara, CA  38004     0   1038   9956  12357   8177   3576   1768    695    213    224      0
29        Johnson, KS   2012     0    149    569    654      0    444    125      0      0      0     71

As can be seen, counties are sorted by the highest three age groups in reverse order.

The following code plots the data for workers with OCC code 1020 (Software developers, applications and systems software) for the 8 counties with the most software developers as before. It also plots the data for San Mateo County so as to include all four of the counties (Santa Clara, Alameda, San Francisco, and San Mateo) in the Silicon Valley region.

In [20]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

def plotAgesCitizen(fig, ax, county):
    labels = qq1usa.columns[2:13]
    BornCitizen = qq1usa[qq1usa['County'] == county].iloc[0,2:13]
    Naturalized = qq1nat[qq1nat['County'] == county].iloc[0,2:13]
    NonCitizen = qq1nac[qq1nac['County'] == county].iloc[0,2:13]
    df = pd.DataFrame({'BornCitizen':BornCitizen, 'Naturalized':Naturalized, 'Non-Citizen':NonCitizen})
    df = df[['BornCitizen','Naturalized','Non-Citizen']]
    ax.plot(labels, df)
    ax.grid(zorder=0)
    scounty = county.replace(",", " County,")
    fcounty = county.replace(" ", "")
    fcounty = fcounty.replace(",", "")
    ax.set_title("Ages of Software Developers in " + scounty + ", 2016")
    ax.set_xlabel("Age in Years")
    ax.set_ylabel("Number of Workers")
    start, end = ax.get_ylim()
    #ax.set_yticks(np.arange(0, end, 5))
    ax.legend(df.columns)
    fig.savefig(fcounty+"16.png")

#fig, axes = plt.subplots(8, 1, figsize=(8, 40))
wd = 8
ht = 5
fig0, axes0 = plt.subplots(1, 1, figsize=(wd, ht))
fig1, axes1 = plt.subplots(1, 1, figsize=(wd, ht))
fig2, axes2 = plt.subplots(1, 1, figsize=(wd, ht))
fig3, axes3 = plt.subplots(1, 1, figsize=(wd, ht))
fig4, axes4 = plt.subplots(1, 1, figsize=(wd, ht))
fig5, axes5 = plt.subplots(1, 1, figsize=(wd, ht))
fig6, axes6 = plt.subplots(1, 1, figsize=(wd, ht))
fig7, axes7 = plt.subplots(1, 1, figsize=(wd, ht))
fig8, axes8 = plt.subplots(1, 1, figsize=(wd, ht))
#fig.subplots_adjust(left=None, bottom=None, right=None, top=None)
#fig.subplots_adjust(wspace=None, hspace=0.3)
plotAgesCitizen(fig0, axes0, 'San Francisco, CA')
plotAgesCitizen(fig1, axes1, 'King, WA')
plotAgesCitizen(fig2, axes2, 'Alameda, CA')
plotAgesCitizen(fig3, axes3, 'Santa Clara, CA')
plotAgesCitizen(fig4, axes4, 'Los Angeles, CA')
plotAgesCitizen(fig5, axes5, 'San Diego, CA')
plotAgesCitizen(fig6, axes6, 'Maricopa, AZ')
plotAgesCitizen(fig7, axes7, 'Cook, IL')
plotAgesCitizen(fig8, axes8, 'San Mateo, CA')

As can be seen in the above graphs, software developers tend to be young for both US-born and non-citzen workers. For US-born workers, the largest age cohort was 25-29 for all of the counties except for San Diego and Cook (30-34) and Maricopa (35-39). For non-citizens, the largest age cohort was 30-34 for all of the counties except for San Francisco, San Mateo, and King. Interestingly, the largest age cohort for naturalized citizens was 40-44 for all of the counties except for Santa Clara and Maricopa (45-49) and Los Angeles (35-39). It's unclear why the largest age cohort for naturalized citizens is so much higher. It may be that many of them worked as non-citzens or immigrated later in their careers. In any case, one other fact suggested by the graphs is that the largest percentage of non-citizen software developers work in Santa Clara, Alameda, and San Mateo counties. All three are in the Silicon Valley region.

From the above graphs, it would appear that ageism does exist in the tech industry and is a little more severe in Silicon Valley and King County, Washington. However, there are some who disagree, at least as to its severity. For example, an article titled No place for the old? Is software development a young person's game? concludes:

Natalia Radcliffe-Brine, marketing manager at Stack Overflow, is inclined to view the figures as evidence that more young people are entering the profession than ever before.

"I don't think it's that the older developers aren't there anymore, I think there's been momentum around technology and you've got so many more young people going into computer science."

In the UK there are signs of burgeoning growth, both in jobs in the wider tech industry and in the numbers studying computer science. Following the 2008 global crash, the rate of job creation at UK technology companies was found to be far outstripping that within the wider private sector, and Cambridge University recently saw the number of people applying to study computer science pass the high watermark of late 90s dotcom boom.

"The proportion is changing, so instead of having lots of older people in the industry, you have so many more young people coming into it now," she said.

"That's why the age looks a lot younger. I definitely don't think it's that the older developers aren't there."

It certainly is true that one needs to consider the degree to which the tech industry is growing. In theory, it would be possible for all of the non-retired older workers to still be working but to have their percentages become less due to an increasing number of young workers. However, that would not explain the differences between Silicon Valley and King County and other counties and the severity of the drops shown in the graphs above. It would seem that it would be useful if someone could actually survey older workers, especially those who have been laid off, and get their input on whether they are still working in the tech industry and, if not, why not. It would also help if tech companies would release their workforce demographics. In any case, there would seem to be enough evidence of some amount of ageism to warn all people going into the field that they may have to shift into another field as early as 40 or 50 and to seriously prepare for that possibilty.

Note: The Jupyter Notebook from which this post is generated can be found at http://econdataus.com/ageism_tech.ipynb.