Kelvin Tran

I am a lawyer, but I do other things

GitHub | Twitter | LinkedIn

Foreign workers in the US

View the source of this content.

By contrast to the rest of the modern world, lawyers seem to care very little about data, maybe apart from the field of competition/antitrust law and say, the sentencing of criminals. But we should care because, amongst other things, it can be used as evidence support an argument. I'm thinking along the lines of nationwide data about hiring practices in discrmination cases.

Because manipulating data will matter for lawyers one day, I've learned how to use D3.js, which is a data visualisation library that even the New York Times uses.

To be clear, these charts are all rendered dynamically off the data for each visitor and I haven't manually placed bars and hexagons in Illustrator.

In this post, I look at data published by the US agency responsible for managing working visas about the applications it receives. The data contains, for each application, information about the employer, the job title, location of work and the employee's salary(!), amongst other things. The data is clean but not pretty. And there are 510,000 plus rows. This what it looks like (in csv format):

LCA_CASE_NUMBER,STATUS,LCA_CASE_SUBMIT,DECISION_DATE,VISA_CLASS,LCA_CASE_EMPLOYMENT_START_DATE,LCA_CASE_EMPLOYMENT_END_DATE,LCA_CASE_EMPLOYER_NAME,LCA_CASE_EMPLOYER_ADDRESS,LCA_CASE_EMPLOYER_CITY,LCA_CASE_EMPLOYER_STATE,LCA_CASE_EMPLOYER_POSTAL_CODE,LCA_CASE_SOC_CODE,LCA_CASE_SOC_NAME,LCA_CASE_JOB_TITLE,LCA_CASE_WAGE_RATE_FROM,LCA_CASE_WAGE_RATE_TO,LCA_CASE_WAGE_RATE_UNIT,FULL_TIME_POS,TOTAL_WORKERS,LCA_CASE_WORKLOC1_CITY,LCA_CASE_WORKLOC1_STATE,PW_1,W_UNIT_1, PW_SOURCE_1,OTHER_WAGE_SOURCE_1,YR_SOURCE_PUB_1,LCA_CASE_WORKLOC2_CITY,LCA_CASE_WORKLOC2_STATE,PW_2,PW_UNIT_2,PW_SOURCE_2,OTHER_WAGE_SOURCE_2,YR_SOURCE_PUB_2,LCA_CASE_NAICS_CODE
I-203-14042-820159,CERTIFIED,11/02/2014,18/02/2014,E-3 Australian,1/04/2014,31/03/2016,"ACUMATICA INC 4030 LAKE WASHINGTON BLVD KIRKLAND WA 98033",11-2021,Marketing Managers,VICE PRESIDENT - PARTNER STRATEGY,300000,,Year,Y,1,KIRKLAND,WA,134597.00,Year,OES,OFLC ONLINE DATA CENTER,2013,,,,,,,,511210,

Let's look at wages earned by foreign lawyers. With a few lines of code and minimal competence in MS Excel, we can group the wages of lawyers employed on a full-time basis and plot a frequency distribution (see Figure 1).

Figure 1. Foreign lawyers seem to be doing alright for themselves. The peak at $160k reflects the salary of graduates at BigLaw firms, and the dropoff what happens to them after a year of BigLaw punishment.

Because I'm Australian, let's look at salaries earned by Australians working on a full-time basis (see Figure 2). Because Australians are entitled to a separate visa class, the E-3, it's possible to separate Australians from other nationalities.

Figure 2. Ok, these guys are killing it - how do I get an E-3 visa?.

Finally, where are Australians working? I suspect New York and California are up there, but what about the other states? To sort this out, we can grid the US into hexagons and map each employee and each employee's salary to a hexagonal bin, exaggerating the 'radius' for effect. The result is the bivariate hexbin map in Figure 3. Larger hexagons mean more employees in the area.

Median wage within the hexbinned area ('000s)

Figure 3. Plenty of Australians in New York City, with those who haven't quite made it pulling down the median wage. The median wage in Washington and Texas, by contrast, is much higher.

I've made the same map for all non-immigrant workers here - it looks much the same.

To find out about Washington (Figure 4) and Texas (Figure 5), I isolated the certified applications from employers in those states.

Figure 4. Turns out its mainly tech employees (Amazon and Microsoft together employ about 250 Australians on E-3s in Washington.)

Figure 5. And engineers in Texas - which I should've guessed given the focus on energy there.

Let's close this out with a graph of the professions in which more than 100 Australians are employed in the US.

Figure 6. No surprises here really.

See more of my work (map and data visualisation related) here or learn about visualising data with D3.js.