I'm looking forward to visiting the Chicago Fed for a few days this week!
I'm looking forward to visiting the Chicago Fed for a few days this week!
Quick @Stata tip: use the "coeflegend" option in a regression to display the name Stata uses for each coefficient.
reg price mpg i.foreign##i.rep78, coeflegend
The changing relationship between Democratic vote share and
1) the percentage of county with at least a Bachelor's degree
2) median income of county.
Over the past couple decades, Democratic support has grown in more college-educated and higher-income counties, a shift away from its traditional blue-collar strongholds. h/t βͺ@shanegoldmacher.bsky.socialβ¬
The relationship between a countyβs Democratic vote share (in the 2024 election) and its share of college-educated residents.
Percent (age 25+) with a Ph.D.
On a personal note, I have lived in two of the top 25 (#3 Tompkins County, NY and now #22 Oktibbeha County, MS).
Top 5: 1. Los Alamos, NM (18%); 2. Lexington City, VA (12%); 3. Tompkins County, NY (12%); 4. Orange County, NC (9%); 5. Charlottesville city, VA (8%).
Our baby boy is here! That makes four kids under six - wish us luck!
Falling fertility.
Here are some ways the world has gotten better.
When in the day are babies born?
Number of births per day, 1994-2014.
Average number of US births by day of the year.
Average number of births by day of the week.
That was unexpected - Elon Musk retweeted my graph.
There were more Latter-day Saint convert baptisms last year than any year since 1997.
What is your top book recommendation?
I've added 43 new tips to my book, bringing the total to 140.
You can download "Quick Stata Tips" and the accompanying .do file for free at toddrjones.com/quickstatati....
Good catch - thanks!
I've added 43 new tips to my book, bringing the total to 140.
You can download "Quick Stata Tips" and the accompanying .do file for free at toddrjones.com/quickstatati....
Death rate per 100k by selected causes, ages 0-84.
Death rate per 100k by selected causes, ages 0-39.
Deaths and death rate/100,000, by age.
Leading Cause of Death by Age.
Mississippi State Univ. is hiring a tenure-track Econ Assistant Prof w/ August start!
Open field; pref. for applied micro & teaching PhD Micro I & II (Micro II this fall).
Apply: MSU site & www.aeaweb.org/joe/listing.php?JOE_ID=2025-01_111475768
Please repostβit's an off-cycle search. Thanks!
Looks good - thanks!
Thanks.
Of course, in this example, we didn't need to use ChatGPT. But imagine examples where the contents of the pages differ enough that it isn't feasible to use traditional webscraping tools. Or we need the LLM to process the data somehow.
Note also that ChatGPT can help write the R code.
To programmatically use ChatGPT in R to automate repeated tasks, e.g., scraping:
1. Get OpenAI API key & add $ to account
2. In R, for each page:
3. Get the page's text
4. Call ChatGPT to process the text, returning result in JSON
5. Convert JSON to dataframe
See screenshots for an example. (1/2)
Thank you, Sarah!