The Data Analyst GPT was created by the ChatGPT team and can easily be called upon by users of the free and paid ChatGPT plans (though you can use it more frequently if you have the paid plan). Navigate to chatgpt.com and create a new account or login with your existing account. Then, on the left sidebar, click “Explore GPTs” to access the GPT catalogue. Scroll down a bit until you see “By ChatGPT” (see Figure 1 below), click “Data Analyst”, then “Start Chat” in the dialog that opens. This will start a new chat using the Data Analyst GPT. (Note that the free version of ChatGPT limits daily usage of the Data Analyst GPT. So, if you’re on the free plan, you may encounter a message to try again later.)
Figure 1: Custom GPTs by ChatGPT
Now navigate to States in Profile and click Unions in the Workforce category. Let’s compare the states by the percentage of their workforce that are members of a union in 2023. In the column “Rank” to the right of “% of All Workers”, click the hyperlinked number representing the rank in your chosen year (i.e., 2023) to get a list of all states ranked by the percent of their total workforce who are in a union. Highlight the entire table and use Ctrl/Cmd + C to copy it.
Return to the ChatGPT session and type, “Describe the contents of this table. I would like descriptive statistics about union membership overall,” then paste the table. ChatGPT will return something like the following:
1. Basic Descriptive Statistics
- Total States/Regions Analyzed: 51 (50 states + D.C.)
- Minimum Union Membership: 2.3% (South Carolina)
- Maximum Union Membership: 24.1% (Hawaii)
- Range: 24.1%−2.3%=21.8%
- Mean (Average): The average percentage of union membership.
- Median: The middle value when sorted.
- Mode: Not applicable here as no values are repeated significantly.
- Standard Deviation (SD): The spread of union membership percentages around the mean.
2. Distribution Highlights
- Top 5 States:
- Hawaii (24.1%)
- New York (20.6%)
- Washington (16.5%)
- New Jersey (16.1%)
- Connecticut (15.9%)
- Bottom 5 States:
- South Carolina (2.3%)
- North Carolina (2.7%)
- South Dakota (3.6%)
- Utah (4.1%)
- Arizona (4.2%)
3. Regional Observations
- Highest Membership Rates: Found predominantly in the Northeast, West Coast, and Hawaii.
- Lowest Membership Rates: Concentrated in the South and some central states (e.g., South Dakota, North Carolina, South Carolina).
Let’s calculate the exact mean, median, and standard deviation.
4. Statistical Summary of Union Membership Percentages
- Mean (Average): 9.42%
- Median: 8.8%
- Standard Deviation (SD): 4.67%
- Minimum: 2.3% (South Carolina)
- Maximum: 24.1% (Hawaii)
- Range: 21.8%
This indicates that the average union membership across states is around 9.42%, with most states clustering near the median of 8.8%. The standard deviation suggests that there is significant variation in union membership rates across states, with some states having notably higher or lower values.
It gives us the top- and bottom-five states by union membership, descriptive statistics and regional observations. That it included regional observations is interesting because, though we didn’t ask for it, it guessed that it may be interesting to consider regional variations. It also gives you the option to view the Python code the system used to generate the descriptive statistics.
Let’s dig into the distribution of union membership some more by asking ChatGPT to make a histogram.
Figure 2: Asking ChatGPT to create a histogram of state union membership in 2023
From the histogram, we can see that in most states between 5% and 15% of their workforce are members of a union.
Analyst also supports more specific visualization. We can describe exactly what we want to see using plain language and the system will attempt to give us what we want. As always with ChatGPT, iterating is important to get exactly what we want. Here is the next query, asking it to create a bar graph of the top-five, middle-five and bottom-five states by union membership.
Figure 3: Asking ChatGPT to make a bar graph
After some refinement, it created this chart:
Figure 4: ChatGPT output: bar chart of union membership for top, middle, and bottom five states in 2023
Let’s do one more refinement, wherein we ask it to use color to visualize the differences in union membership between the top, middle and bottom groups.
Figure 5: Asking ChatGPT to map union membership to a color scale on the bar chart
Now, you can more easily see the differences between the groups. The graph highlights just how much Hawaii and New York distinguish themselves from the rest of the states.
Finally, let’s add in another data point, the percent change in union membership by state from 2010-2023 (found here on StatsAmerica). We copied and pasted that table into ChatGPT and added:
“This is a dataset of change in union membership from 2010 to 2023 by state. Merge this into the existing data. Then, create a bar chart just like the previous one, but using the % change in union membership data.”
This is the output from ChatGPT:
Figure 6: Output from ChatGPT: Top, middle, and bottom 5 states for % change in union membership from 2010-2023
As a bonus: what insights does ChatGPT have about the states where union membership has changed the most?
Here are some insights based on the changes in union membership from 2010 to 2023:
Significant Growth in Union Membership in Southern States
- Top Performers: States like Mississippi (+63.0%), Tennessee (+54.8%), and Oklahoma (+49.4%) saw substantial growth in union membership percentages.
- These increases could reflect:
- Targeted unionization campaigns in traditionally under-unionized regions.
- Growth in industries with higher unionization rates, such as healthcare or logistics.
2. Declines in Historically Strong Union States
- Large Declines: States with traditionally high union membership, like Wisconsin (-42.3%), West Virginia (-40.0%), and South Carolina (-38.8%), experienced some of the steepest declines.
- Possible factors include:
- Legislative changes, such as the introduction of “right-to-work” laws.
- Shifts in the job market, such as declines in manufacturing and mining jobs where unions have historically been strong.
3. Regional Trends
- Southern and Western Growth: Many Southern and Western states experienced increases (e.g., Mississippi, Oklahoma, Colorado).
- Midwestern and Northern Declines: Traditional union strongholds like the Midwest and Northeast saw notable decreases (e.g., Wisconsin, Michigan, New York).
4. Middle Performers with Small Changes
- States like Nevada (+13.2%), Florida (+12.8%), and Virginia (+9.3%) experienced modest growth or stability.
- This suggests that these states may be seeing steady unionization efforts without dramatic policy or economic shifts.
5. Policy and Economic Factors
- States with right-to-work laws or policies limiting union activities often show declines (e.g., Wisconsin, Michigan).
- Conversely, states with pro-union legislation or rising industries like renewable energy or healthcare may see increases.
6. A Mixed National Picture
- While some states are experiencing sharp increases, others are facing equally sharp declines, reflecting a fragmented landscape of union influence in the U.S.
- This variation suggests that union growth is highly localized, driven by state policies, economic structures, and targeted efforts.
Would you like a deeper analysis of specific regions or policies affecting these trends?
Not bad, though it did repeat some insights, such as the impact of “right-to-work” legislation on declines in union membership in traditional union strongholds.