YouTube2Text

Data Analysis: Claude Code for Economists with Paul Goldsmith-Pinkham | Markus' Academy | Ep. 162-2 — Transcript

by Markus' Academy · 7,688 words · 1,177 segments · language en · Watch on YouTube

Full transcript

  1. 0:09Welcome back everybody for another
  2. 0:11session of the mini video series with
  3. 0:13Paul Goldsmith income on cloud code for
  4. 0:15applied economists.
  5. 0:17Today we go to the second video.
  6. 0:20And um
  7. 0:22We talked last time we talked about how
  8. 0:24to get started with cloud code we talked
  9. 0:26about the difference between cloud code
  10. 0:28and cloud code works and how the
  11. 0:30difference things are to how to install
  12. 0:33it and set up the terminal.
  13. 0:35Today we do part two which is about data
  14. 0:37analysis workflow and some simple
  15. 0:39examples before we then move on to data
  16. 0:41collections, web scraping and many many
  17. 0:44other tasks coming down the road for
  18. 0:46different videos. Paul
  19. 0:48great to have you here with us again and
  20. 0:50uh let's start with part two.
  21. 0:52>> Great, thanks so much. I'm really
  22. 0:54looking forward to this one. So this was
  23. 0:55fun. So like like you said Marcus, you
  24. 0:58know, last time we really started with
  25. 1:00the idea of a um basically a
  26. 1:06Let me open this up here. We we really
  27. 1:08were kind of focused on the idea of just
  28. 1:09installation and we didn't really kind
  29. 1:10of see
  30. 1:12what could actually be done. And so what
  31. 1:14I want to show you now is I want to show
  32. 1:16you just actually kind of a simple very
  33. 1:18simple task. So in some ways this is not
  34. 1:20going to be um
  35. 1:22This is not going to be a kind of
  36. 1:23complicated one. This is I think a
  37. 1:25pretty trivial example. But then we'll
  38. 1:27kind of get into more complicated ones.
  39. 1:29So if you're not familiar with things,
  40. 1:30this might be a good entry point. This
  41. 1:32is
  42. 1:33you know
  43. 1:34Often when we do analyses you kind of
  44. 1:36assume you have the data. Well and so
  45. 1:38what I'm going to do is I just want to
  46. 1:39kind of come in. Often I have these very
  47. 1:41fun data tasks where I kind of want to
  48. 1:44just you have a research idea. So like I
  49. 1:46think Marcus you would be the same as
  50. 1:47this if you're somebody who
  51. 1:49you want to have a you have an empirical
  52. 1:51question. It's a non-trivial question.
  53. 1:53It's maybe not totally set up in in data
  54. 1:55set. Like it's not a perfect graph. You
  55. 1:57maybe Google it. It's you know, they
  56. 1:58haven't made it yet.
  57. 2:00You say, "Okay, well, how do I I want to
  58. 2:01just see that?" You might ask an RA if
  59. 2:03you're lucky enough to have an RA or you
  60. 2:04might spend an hour doing it yourself. I
  61. 2:06want to kind of just show you that this
  62. 2:08is very easy way to do to do this. So,
  63. 2:10the question that I kind of want to pose
  64. 2:12is you know, let's make a graph and I've
  65. 2:14actually posted this recently on social
  66. 2:16media to show this
  67. 2:17is what is the age distribution of
  68. 2:19homeowners in the United States change
  69. 2:21over the last 50 years. This is
  70. 2:22something I've worked on with Kelly Shue
  71. 2:24and other projects.
  72. 2:26You know, and we all know kind of
  73. 2:27inherently there's been this discussion
  74. 2:29about there's a shift. Younger folks are
  75. 2:31not owning homes as much as as older
  76. 2:34folks. So, what I'm going to start with
  77. 2:36is I'm going to have Claude get the
  78. 2:37data.
  79. 2:38And I'm not actually
  80. 2:40when I started this, I've done it now
  81. 2:41once as a test project. I don't really
  82. 2:44remember exactly how to get it and I
  83. 2:45don't really remember. It's kind of just
  84. 2:47like you'd ask an RA to do something.
  85. 2:49So, I'm going to say, "Look, I'm
  86. 2:50starting a project from scratch. I want
  87. 2:53to analyze how the age distribution of
  88. 2:55homeowners in the United States has
  89. 2:56changed over the last 50 years. I think
  90. 2:58the Census Bureau publishes
  91. 3:00homeownership rates by age of
  92. 3:01homeowners. Potentially the data could
  93. 3:03be on the Census website or it could be
  94. 3:05on FRED. So, what I want you to do is
  95. 3:07download the homeownership rates by age
  96. 3:08going back as far as possible. Write
  97. 3:10this as a as a script and then save the
  98. 3:13raw data as a CSV. Okay? So, it's just a
  99. 3:15data collection task. So, let's actually
  100. 3:18just
  101. 3:19Yeah.
  102. 3:19>> work on code the same way.
  103. 3:21>> You could do this in either of these.
  104. 3:22Yeah, or you could honestly even do this
  105. 3:24on the website. So, this is the benefit
  106. 3:26here is I'm going to kind of just do
  107. 3:27this locally on a
  108. 3:29I will have this on my laptop after it's
  109. 3:31done and I kind of don't have to worry
  110. 3:32about downloading and moving it around.
  111. 3:34It's just something that will run
  112. 3:35locally. Co-work, it would be the same
  113. 3:36exercise.
  114. 3:37Um
  115. 3:38I'm going to do this when we when we do
  116. 3:40it here, I'm going to write this this
  117. 3:42example here. So, what I'll do now is
  118. 3:44I'm going to share my screen with the
  119. 3:46terminal just so that you can have an
  120. 3:48example of what that looks like. We'll
  121. 3:49open this up.
  122. 3:50We have this from last time, so remember
  123. 3:53I like often to what I'm going to be
  124. 3:55doing is I'm going to run Claude Claude,
  125. 3:57so I'm going to run this here.
  126. 3:59Um
  127. 4:01and so you you're um we're in this
  128. 4:03folder here. This is a So, this is a
  129. 4:05folder I'm already in here. So, I made a
  130. 4:08test
  131. 4:09I written this once before, but now
  132. 4:10we're going to write make a new
  133. 4:12uh folder in here. We're going to call
  134. 4:13it test two, which is the same idea.
  135. 4:16And this is a folder inside this um
  136. 4:20Basically, I have a set of folders about
  137. 4:23um these video series that I made a test
  138. 4:25two. There's nothing in it.
  139. 4:27And so, I'm just going to launch Claude
  140. 4:28inside of it.
  141. 4:30And it says, "Okay."
  142. 4:32>> actually have to launch Claude again.
  143. 4:34>> Yeah, so I've you know, so I just run
  144. 4:36the program and it launches it it
  145. 4:38launches it up here, you know, when I
  146. 4:40when I quit. So, I can quit by hitting
  147. 4:42control C control C.
  148. 4:44>> Okay.
  149. 4:45>> And what happens? So, a great example of
  150. 4:46this would be I'd say So, I I started
  151. 4:49every time I want to be in the right
  152. 4:50folder just so that I'm doing this. I
  153. 4:51just don't want it to kind of look at
  154. 4:53the other stuff necessarily. I'm going
  155. 4:55to start from here. So, I'm going to say
  156. 4:57um
  157. 4:58So, I can copy and paste or I can just
  158. 5:00write it myself, but the way that I'm
  159. 5:01going to do is I'm going to copy and
  160. 5:02paste. So, it's not actually going to
  161. 5:04show it. I'll say
  162. 5:06It will show it once I once I do this
  163. 5:08here and I'll say, "I'm starting a new
  164. 5:10project from scratch, blah blah blah
  165. 5:11blah blah."
  166. 5:12So, now it's saying So, ignore this
  167. 5:14warning thing. That's just a skill that
  168. 5:16I have installed and it says, "Let me
  169. 5:17research what data is available and then
  170. 5:18write the download script." So, now it's
  171. 5:20doing a bunch of calls that we talked
  172. 5:22about. Remember how we talked about that
  173. 5:24Claude can use tools. So, it is now
  174. 5:26using
  175. 5:28an agent to run tools, which are these
  176. 5:31web search things. It's searching for
  177. 5:32these things.
  178. 5:33And it's asking me if I if it's allowed
  179. 5:36to do this. Remember we talked about its
  180. 5:37ability to do things.
  181. 5:39It wants to go search the web. It's not
  182. 5:41allowed to until I give it permissions.
  183. 5:43So, it's going to do a lot of searching.
  184. 5:45So, rather than say yes a bunch of
  185. 5:47times, I'm just going to say yes, you
  186. 5:48can always use web searches. So, this is
  187. 5:51this is I'm giving it permission to
  188. 5:52search for anything now.
  189. 5:54Um in this in this particular folder.
  190. 5:58And so, it's now searching for all these
  191. 5:59things. It's thinking.
  192. 6:01So, this prestidigitating, this is just
  193. 6:03nonsense that it puts when it's working.
  194. 6:05If you want to see what it's doing, you
  195. 6:07can hit control O.
  196. 6:10And it will show what it's thinking.
  197. 6:11It's saying, "Okay, I ran an agent." So,
  198. 6:14an agent um we haven't talked about this
  199. 6:16yet, Marcus, but um when you asked about
  200. 6:19cursor, for example, what an LLM will
  201. 6:22often do is it will spawn
  202. 6:24a an agent, a sub agent, which has its
  203. 6:28own context window.
  204. 6:31And so, what that agent is doing is it's
  205. 6:32running on its own. It's also a Claude
  206. 6:34LLM. But, our main agent has said to it,
  207. 6:37"Hey, you need to go look for census
  208. 6:39home ownership data." And so, the prompt
  209. 6:40it gives it is, "Research how to
  210. 6:42download this by age." This is the kind
  211. 6:44of thing I should have said
  212. 6:46originally. It says, "I need to find
  213. 6:47this. What is available?" and so forth.
  214. 6:49You should search for all these things,
  215. 6:51and here's how you're going to do it.
  216. 6:53And so now, it wants to
  217. 6:55um look at this content. It's going to
  218. 6:58fetch data from this. So, it's going to
  219. 7:00actually try and download stuff from
  220. 7:01here. And I'm going to say, "Yes, you
  221. 7:03can download things." So, it's thinking.
  222. 7:05So, you think about the task that we
  223. 7:06just gave it, right? The first thing we
  224. 7:07said is, "Go find this data." So, that
  225. 7:10was a task that I let it do. I'm letting
  226. 7:12it do all these things. I'm going to let
  227. 7:14it do it so that I don't have to keep
  228. 7:15hitting enter. I'm going to say, "Yes,
  229. 7:17you can look at stuff on Fred."
  230. 7:19So, it's doing lots of tool use. So,
  231. 7:20you'll see it's continuing. It's
  232. 7:22searching. It's searching.
  233. 7:24It's looking for this, home ownership
  234. 7:25rate under 35 by home ownership tables,
  235. 7:28and so forth. There's a lot of things
  236. 7:29you can see that it's doing this. And
  237. 7:31remember we talked about
  238. 7:33what's an LLM doing, these tokens you
  239. 7:36are basically its way of saying how much
  240. 7:38up and down thinking is going on
  241. 7:40in what's going on. And so, yes, I'm Now
  242. 7:42it's you notice it switched gears. It
  243. 7:44said, "Well,
  244. 7:47it looks like it looks like it switched
  245. 7:49gears from Fred." So, it says, "Okay,
  246. 7:50let's look at Let's look at the census."
  247. 7:52So, we're now going to look at the
  248. 7:54census. Yeah.
  249. 7:55>> Can't you have one agent doing Fred and
  250. 7:56the other one doing
  251. 7:57>> Yes, so it's not very efficient. So, we
  252. 7:59could have if we were really in a hurry,
  253. 8:01>> Okay.
  254. 8:01>> we could have said
  255. 8:03"Spawn one agent that searches in one
  256. 8:05and spawn one agent that searches" That
  257. 8:06would have been faster. Instead, it's
  258. 8:08doing it in sequence. That's exactly
  259. 8:10right. So, often you might have
  260. 8:11>> in parallel, you have to tell it to do
  261. 8:14it in
  262. 8:14>> You don't always. Sometimes it will know
  263. 8:15to do that, but this I was so vague, I
  264. 8:18sort of said, "Well, look through Fred,
  265. 8:20look through this."
  266. 8:21Often it can be better to do this. So,
  267. 8:23like the more specific you are in your
  268. 8:25um query, often the better it will do on
  269. 8:27these types of tasks.
  270. 8:29Um
  271. 8:30So, you can see here it's continuing to
  272. 8:32search. It's trying a bunch of different
  273. 8:33things. Um
  274. 8:35but it really isn't sure kind of what's
  275. 8:38going on. So, the fact that we were very
  276. 8:39vague has made this a little slower. Of
  277. 8:41course, if I knew where the data was and
  278. 8:42I knew what data I wanted to do even if
  279. 8:44it wasn't clean,
  280. 8:46it wouldn't take this long. I just want
  281. 8:47to kind of give you an example of
  282. 8:49Sometimes you have an idea of what you
  283. 8:50want to do. So, now it's found the right
  284. 8:52data set. So, this is the housing
  285. 8:53vacancy survey.
  286. 8:55Um and it's pulling it from in. It says,
  287. 8:58"Oh, I finally You know, it's finally
  288. 8:59found some examples of what it's looking
  289. 9:01for." But, this is the kind of thing
  290. 9:02that if you just let it go, this is the
  291. 9:04same thing when you use a research
  292. 9:05function or something else on Cohort,
  293. 9:07there's no reason you couldn't have
  294. 9:08inherently um
  295. 9:10done this uh
  296. 9:13for you know, on the web, too, right?
  297. 9:15These are just This is just the same
  298. 9:17idea of what's going on. So, we're
  299. 9:19letting it search. We're letting it
  300. 9:20search. It takes a little while.
  301. 9:23Um
  302. 9:25and then we say, "Yes, don't ask again."
  303. 9:27It's basically almost found it all.
  304. 9:31So, what's beneficial here, right, is
  305. 9:32that if you do this on the web and you
  306. 9:33gave it kind of permissions, it would
  307. 9:35just search and then come back to you
  308. 9:37and you wouldn't have to keep kind of
  309. 9:38mon- There's no reason we have to
  310. 9:39monitor this beyond telling it it's okay
  311. 9:41to search for stuff.
  312. 9:43>> So, here there's no reasoning going on
  313. 9:45in a sense. Because it's not like
  314. 9:46>> There's reasoning going on in the sense
  315. 9:47that what it does is once it fetches
  316. 9:49stuff, it's it's basically trying to
  317. 9:51find something that satisfies the
  318. 9:53prompt.
  319. 9:54>> Okay.
  320. 9:54>> And then it's going to eventually get to
  321. 9:55a point where it's going to say, "Okay,
  322. 9:57I found all the data that's relevant.
  323. 9:58Now we're going to download it and write
  324. 10:00it down like write a research script."
  325. 10:01So, the agent is really doing a lot of
  326. 10:04tool searching to kind of search the
  327. 10:05web. And this could be faster if you
  328. 10:07were using other skills. This is the
  329. 10:09we're really like living in kind of the
  330. 10:10bare-bones version of this. Um
  331. 10:13>> Have you done this repeatedly the same
  332. 10:15thing and it will come up with the same
  333. 10:16data or at every time or it comes up
  334. 10:19with different data sources?
  335. 10:20>> It Well, we'll see cuz this is going to
  336. 10:22be the second time. My guess is there is
  337. 10:24really one very good answer for this.
  338. 10:28It's There's one answer. So, really it
  339. 10:30should be using the Housing Vacancy
  340. 10:32Survey, which is in the It's basically
  341. 10:34the Census has data broken down at the
  342. 10:36national level by Um in fact, I can show
  343. 10:39you the picture of what this should look
  344. 10:41like. There's one video like there's one
  345. 10:43data set that kind of gets you the gist
  346. 10:45of what you want it to look like. It
  347. 10:46will look like
  348. 10:48this.
  349. 10:49Um
  350. 10:51So, I'll just show you while we're
  351. 10:52waiting while we're waiting in the
  352. 10:53background we can I can show you what
  353. 10:54this looks like.
  354. 10:56Um it will look like this.
  355. 10:59So, this is the final product. This is
  356. 11:01what I you know, I used a
  357. 11:03I did this on my own to make sure that
  358. 11:05it would work and this is the kind of
  359. 11:07thing that you get. This comes from the
  360. 11:08Housing Vacancy Survey. This is kind of
  361. 11:10the right answer of what it looks like.
  362. 11:12>> Okay.
  363. 11:12>> Um
  364. 11:14So, this is the end result.
  365. 11:15And you know, what we'll get if we just
  366. 11:19let it let it cruise for a little bit.
  367. 11:21>> Well, that's then done the the figure is
  368. 11:24done also with Claude?
  369. 11:25>> Yeah, I run all of it. It was done with
  370. 11:27Claude. So, I mean it uses I used R in
  371. 11:29the background cuz I'm I tend to use R,
  372. 11:31but it wrote the R code for everything
  373. 11:34to do this. I basically just told it
  374. 11:36what I wanted it to look like they like
  375. 11:38roughly speaking and it did everything
  376. 11:40else.
  377. 11:40>> What are what are the gray
  378. 11:42things doing?
  379. 11:44>> What are the gray things? You mean the
  380. 11:45lines?
  381. 11:46>> Yes.
  382. 11:47>> So in this data there is annual data
  383. 11:50every year of what things look like.
  384. 11:52But of course that's sort of there's
  385. 11:53different ways to show what's going on.
  386. 11:55So what it did was it just showed all
  387. 11:56the years but then it's it showed that
  388. 11:58basically the every decade what the what
  389. 12:00the relative change was you could see
  390. 12:02that it's kind of shifting
  391. 12:03discontinuously or not continuously
  392. 12:05rather.
  393. 12:06>> And you told it to do it this way.
  394. 12:08>> Yeah, you know, I kind of I kind of
  395. 12:10hinted at it. It's kind of a natural way
  396. 12:11to make that graph but I would be a
  397. 12:13stretch to say that I told it to make it
  398. 12:14look exactly like that. That's that
  399. 12:16would be too much. So you see so now
  400. 12:18it's done. So what it says is it found
  401. 12:21two good sources.
  402. 12:22>> Mhm.
  403. 12:22>> Um it says
  404. 12:24So it had a lot of thinking. It says two
  405. 12:26good sources.
  406. 12:27One is the Census Bureau table 19
  407. 12:29quarterly home ownership rates by age
  408. 12:31from 1994 to the present. I'll use the
  409. 12:33Census Bureau data since it's the
  410. 12:34standard home ownership rate measure.
  411. 12:36Let me first check the environment and
  412. 12:37check the file um Excel file structure.
  413. 12:40So now it's doing stuff. So now it's
  414. 12:42it's basically wants to write um
  415. 12:45this Python command that's basically
  416. 12:48checking a bunch of things. It's
  417. 12:50basically checking versions to kind of
  418. 12:51understand what's going on. I'm going to
  419. 12:52say yes you can do that.
  420. 12:54So that took it about three or four
  421. 12:56minutes. It found the data. It found
  422. 12:57some examples. If I wanted I could tell
  423. 12:59it to use Fred
  424. 13:01um but it would use a totally different
  425. 13:02survey. So now it's just going to start
  426. 13:04inspecting the data. It's running code
  427. 13:06to kind of look at one of the the files.
  428. 13:08This is this file here which is an Excel
  429. 13:10file. It's reading it in Python.
  430. 13:13And I'm going to say yes you can do that
  431. 13:15and now it's going to um
  432. 13:17it basically uh ran into an error.
  433. 13:21So likely what you need to do
  434. 13:24So the Census doesn't like what it's
  435. 13:26doing cuz I'm I'm just querying it and
  436. 13:28trying to pull it and so it throws
  437. 13:29something called a 403 error.
  438. 13:32A 403 error is basically Census wants
  439. 13:35you to pretend to be a person. Like you
  440. 13:37can't just it doesn't want just bots
  441. 13:39that are doing it. So I'm saying, "Hey,
  442. 13:41I'm a user." It puts a little header on
  443. 13:43it and now it should and now it should
  444. 13:45um be able to do this using the requests
  445. 13:47package.
  446. 13:48Um this becomes an issue as you start to
  447. 13:50scrape stuff. If you're a person who's
  448. 13:52interested in scraping, you have to be
  449. 13:54very um careful and diligent about the
  450. 13:57way that you interact with websites
  451. 13:58because
  452. 14:00um a lot of websites set stuff up so
  453. 14:02that they aren't just basically
  454. 14:04bombarded by requests from
  455. 14:06uh LLMs or just from web scraping
  456. 14:09programs.
  457. 14:10>> That's what we do in the next video, no?
  458. 14:12>> Yes, exactly. And so we'll talk about
  459. 14:13that for here and so you can see here is
  460. 14:15it's printing out stuff from the data.
  461. 14:17It's saying, "Here is what you know, it
  462. 14:19wrote this code. It pulled the data." It
  463. 14:21basically pulled this data from these
  464. 14:23various places. Here's 1994 the first
  465. 14:26has quarterly data on home ownership
  466. 14:27rates
  467. 14:29at the national level and so now it's
  468. 14:31going
  469. 14:32um
  470. 14:33to
  471. 14:37It's also going to check FRED now. So
  472. 14:40it's checking FRED as well.
  473. 14:42FRED is only has I think previous data
  474. 14:44has only a little bit of data.
  475. 14:47It's not great. So it's basically trying
  476. 14:48out all the different It's exactly what
  477. 14:50you'd want an RA to do.
  478. 14:52And now it's going to say, "Oh, let's
  479. 14:53see if there's older Census data."
  480. 14:55Cuz we only got back to 1994 and
  481. 14:57actually we'd like to have more data. So
  482. 14:59what it's going to do is let's table
  483. 15:00seven might have annual data by age
  484. 15:02going back further. So this is the kind
  485. 15:04of thing you'd exactly want your RA to I
  486. 15:06didn't as you can see I didn't tell it
  487. 15:08to do any of this. No, I just said go
  488. 15:09back as far as you can.
  489. 15:12So
  490. 15:13>> Cool work. It will put the same. It does
  491. 15:15It does not ask you to prompt. It's the
  492. 15:17same as
  493. 15:17>> So what we can do, why don't we do that
  494. 15:19while Let me just uh quickly copy that
  495. 15:21over so that we can do it in parallel.
  496. 15:23Um very quickly, let me just move this
  497. 15:25over while we're here. 1 second.
  498. 15:28Um I'm just going to copy this again.
  499. 15:30We'll go to Cogram.
  500. 15:32Um since just so for you people who
  501. 15:35weren't with us on the last video, let
  502. 15:37me just show you on Cogram what this
  503. 15:39would look like, what Marcus is asking.
  504. 15:41So it would be here.
  505. 15:43So here's Cogram, which is an
  506. 15:44application that's kind of doing a
  507. 15:46similar thing.
  508. 15:47I'm going to make a new folder for this
  509. 15:49to work in just very quickly so that we
  510. 15:51have a space for it. I'm going to call
  511. 15:53that um
  512. 15:56um we'll call it temp three in there.
  513. 16:00And if we go here, we'll tell it to work
  514. 16:03in a folder. We'll say work in the
  515. 16:06Marcus folder for video two in temp
  516. 16:08three.
  517. 16:10Um and we'll say yes, you can work you
  518. 16:12can change things in here. And then
  519. 16:14we'll say let's go. So we'll just let it
  520. 16:17run and we'll see what it does. Um I
  521. 16:20don't work in nothing.
  522. 16:21>> same amount of time. It's not faster or
  523. 16:22slower.
  524. 16:23>> No, it shouldn't be. I mean, the only
  525. 16:25way that it would be any faster or
  526. 16:26slower. So it's you know, we'll just let
  527. 16:28it go here and we'll see. It may
  528. 16:29actually be faster in some ways because
  529. 16:31you know, there's kind of
  530. 16:33uh with the terminal, we've kind of
  531. 16:37we may have a could there may have to be
  532. 16:39more things that are approved. But um so
  533. 16:42here we're going to just say yes, you
  534. 16:44can do this. I could have made this much
  535. 16:45faster by the way. If I had just said,
  536. 16:47"Yes, you can run Python things." and it
  537. 16:48would do this faster.
  538. 16:50So you can see it's basically reading
  539. 16:51through the code. It's trying to see
  540. 16:52what's going on here. Um this is just a
  541. 16:55bunch of data. It basically is parsing
  542. 16:57all the data that's in this structure.
  543. 16:59>> Mhm.
  544. 16:59>> Table 12 has household counts by age so
  545. 17:02I can compute rates from that. Um so
  546. 17:04it's really gotten a lot of
  547. 17:07it understands the structure of the data
  548. 17:08really, really well. Um
  549. 17:11so I'll keep you apprised of what's
  550. 17:13going on with Cogram at the same time
  551. 17:14this is going on. Cogram is searching
  552. 17:16the web just like with the the other
  553. 17:18one. So, it should be very similar.
  554. 17:19There's no reason that it shouldn't be
  555. 17:21um
  556. 17:22So, I'm just going to say yes, you can
  557. 17:23run all the Python scripts that you
  558. 17:24desire.
  559. 17:26That way it will I don't have to keep
  560. 17:27saying yes. So, now it's just trying to
  561. 17:30basically see the structure of the data
  562. 17:32and part Now, it's the same way that you
  563. 17:35if you were working with this, Marcus,
  564. 17:37you would kind of look at each file and
  565. 17:38you try to understand what the structure
  566. 17:39is and then you'd write a little script
  567. 17:41that kind of
  568. 17:42>> Nice.
  569. 17:43>> parses everything carefully, right?
  570. 17:46>> But, it takes it takes 6 minutes, 21
  571. 17:48seconds to start.
  572. 17:49>> Yeah, it's I mean it's So, now it says,
  573. 17:51"Okay, I have a clear picture of both
  574. 17:53data sources. Let me write the script."
  575. 17:54So, this is, you know, faster than I
  576. 17:56would have done it, for sure.
  577. 17:57>> Yes.
  578. 17:58>> Um
  579. 17:59So, for
  580. 18:01uh
  581. 18:02Interestingly, Claude uh Claude Co-work
  582. 18:05really struggled because it
  583. 18:08it uh
  584. 18:09it ran into that same user agent
  585. 18:11problem.
  586. 18:12>> Mhm.
  587. 18:13>> So, it struggled with this idea that,
  588. 18:16you know, it couldn't log in.
  589. 18:18Um
  590. 18:19>> Do you want to go back to the Co-work or
  591. 18:20>> Yeah, let me just let me quickly just
  592. 18:22show you what it's doing here. So, it
  593. 18:23wrote it wrote the script. So, now it
  594. 18:25understands the data.
  595. 18:26So, remember just, Marcus, the way we
  596. 18:28talked about the context windows, it has
  597. 18:29all that information. It's kind of like
  598. 18:31it can keep all of that in its memory
  599. 18:33and now it's like, "All right, let me
  600. 18:34write a script that parses stuff that
  601. 18:36looks like this." And so, it says,
  602. 18:37"Okay." And so, it's going to write this
  603. 18:39file
  604. 18:40in here.
  605. 18:41Um it's going to write a file that
  606. 18:42pretends to be a user agent. It's going
  607. 18:44to pull from these age groups. It's
  608. 18:46going to have these age patterns. It's
  609. 18:47going to download files. It's going to
  610. 18:48parse them.
  611. 18:50And it's even it's going to parse two
  612. 18:52different tables.
  613. 18:53And then it's going to download the data
  614. 18:55and then it's going to construct these
  615. 18:56files and then it's and then it's done
  616. 18:58and you'll say, "Yes."
  617. 18:59And so, then
  618. 19:01um Oops, sorry. Then, I'll just go into
  619. 19:06uh
  620. 19:06>> Just to make sure that I understand.
  621. 19:08>> Yeah.
  622. 19:08>> So, you already downloaded already, but
  623. 19:10then is it all right a script and
  624. 19:11download it again?
  625. 19:13>> No, cuz it didn't really download all of
  626. 19:15it. I mean, it did a little bit, but
  627. 19:16really what it did was it downloaded and
  628. 19:18just read a little bit of it cuz it
  629. 19:19doesn't want to download and look at
  630. 19:21everything because that will blow out
  631. 19:22its context window. So, often these
  632. 19:24things are It's the same way that you
  633. 19:25might not, you know, imagine you had a
  634. 19:26perfect memory, Marcus. You wouldn't
  635. 19:28like take a thing and then look at every
  636. 19:30row and then be like, "Okay, I'm now
  637. 19:31going to look at the every row." It's
  638. 19:32going to say, "Let me just understand
  639. 19:34It kind of knows it. And so, what it did
  640. 19:36So, you notice here is
  641. 19:39um
  642. 19:39on the right you can see what the file
  643. 19:40is. It wrote the It wrote the code in my
  644. 19:42thing. So, I could just rerun that code
  645. 19:44any one time I want, and it made a file,
  646. 19:46which is called home ownership age uh by
  647. 19:48age annual.
  648. 19:50And it made a CSV file that has
  649. 19:52everything here. Every year has what the
  650. 19:54home ownership rate is.
  651. 19:55So, they both They all come from this
  652. 19:57and they do this. So, now
  653. 19:59that's great. So, you were asking So,
  654. 20:01that just downloaded the data. The thing
  655. 20:03that I would typically do here is
  656. 20:06um
  657. 20:07So, just to give you a sense of what I
  658. 20:08would do next is I would typically um
  659. 20:13you know, take this. And this is just a
  660. 20:15discussion here. So, it does this, clean
  661. 20:17data, blah blah blah. So, now
  662. 20:20um
  663. 20:22what I'm going to do is I want to make
  664. 20:23this graph. So, I'm going to I want to
  665. 20:25sort of show you how you would make this
  666. 20:27graph. So,
  667. 20:28I'm going to do it in the following way.
  668. 20:30And so, by the way, like actually let's
  669. 20:31quickly check in on um
  670. 20:33So, what's kind of interesting here is
  671. 20:35it will kind of tell you the different
  672. 20:36setups, what the different data Wait,
  673. 20:38for example, given that there's
  674. 20:39quarterly data, you could do a quarterly
  675. 20:42version of the graph that we're going to
  676. 20:43talk about if you wanted to study that.
  677. 20:45I'm going to focus on the annual one
  678. 20:46just for the purposes there.
  679. 20:49Let's check in very quickly on um
  680. 20:53what
  681. 20:54uh the co-work is doing just since you
  682. 20:57asked about that.
  683. 20:58Um co-work is here.
  684. 21:01And it's still struggling because mainly
  685. 21:04because
  686. 21:06it's still doing the search process.
  687. 21:07Now, struggling is the wrong word, but
  688. 21:10>> What kind of data do
  689. 21:10>> It's it's working on the data question.
  690. 21:12So, it says, "Okay, here
  691. 21:15um
  692. 21:16let's do it." So, it's doing all the
  693. 21:17exercise, same thing as before. It's
  694. 21:19really It can't get to the census is one
  695. 21:21of the big problems here.
  696. 21:23So, now it's going to say, "Let me try
  697. 21:25and find this."
  698. 21:27Um
  699. 21:28So, it's still doing basically the same
  700. 21:30exercise. I'm trying to find this. It
  701. 21:32has historical data. And so, what it's
  702. 21:34doing is it's going to try and download
  703. 21:36directly.
  704. 21:38And so, then it It would The problem
  705. 21:40with it is is that
  706. 21:42it's running into the same issue that
  707. 21:44happened in the other one. So, it's the
  708. 21:45same type of issues, which is that the
  709. 21:46census doesn't let you go there unless
  710. 21:48you write a script where you have a user
  711. 21:50agent. It doesn't seem like Co-work
  712. 21:52wants to do that. And so, it seems like
  713. 21:53it they're kind of having slightly
  714. 21:55different approaches. We'll see where
  715. 21:56this one gets to. Um
  716. 21:59Yeah, you can see
  717. 22:00>> doing never get into the census data.
  718. 22:02>> Well, we'll see we'll see what happens.
  719. 22:03I don't usually use Co-work for this
  720. 22:04reason. So, it looks like he it might.
  721. 22:09So, let's see if it can get there. Let's
  722. 22:11see if it gets there. Let's give it the
  723. 22:13benefit of the doubt. While I While we
  724. 22:14make this figure, we'll see if it can
  725. 22:15get to the same place.
  726. 22:16>> Okay.
  727. 22:17>> Um
  728. 22:19So, what we're going to do now is This
  729. 22:21is going to be very fast by comparison.
  730. 22:23So, we're going to say, "All right,
  731. 22:25um we have these two data sets. We're
  732. 22:26going to say
  733. 22:28um please make a graph that plots the
  734. 22:33um
  735. 22:34distribution of home ownership
  736. 22:36of home ownership
  737. 22:40um by age um
  738. 22:43for each year in the So, I'm going to
  739. 22:48tell it what file I want It It doesn't
  740. 22:49really need this, but I want to say that
  741. 22:51I want to use the annual. So, here you
  742. 22:52can say at home ownership by age
  743. 22:55annual.csv just to tell it I mean this
  744. 22:57file.
  745. 22:59Um
  746. 23:00Um
  747. 23:01>> tell it that you want to use all?
  748. 23:03>> I'm going to in just a second. Yes. So,
  749. 23:05please
  750. 23:06make a script to generate a figure in R
  751. 23:11with this data.
  752. 23:13Um
  753. 23:14And then so this is my cheat. So,
  754. 23:16Marcus, you're now getting the number
  755. 23:18one cheat that I have found that has
  756. 23:19been very helpful. So, there is a a
  757. 23:22professor of sociology, his name is
  758. 23:24Kieran Healy. He has a really wonderful
  759. 23:26book that I will um
  760. 23:28pitch here that's called data
  761. 23:29visualization in R.
  762. 23:32It makes beautiful graphs. And so, what
  763. 23:35you can do, you can say, "Please follow
  764. 23:38the best practices
  765. 23:41of making figures from
  766. 23:44Kieran Healy."
  767. 23:46>> Okay.
  768. 23:46>> And so now, we can tell it to do that.
  769. 23:49Um
  770. 23:50>> The fact that you use "please" all the
  771. 23:52time, does it make a difference?
  772. 23:53>> I don't know. Maybe I'm just very
  773. 23:54polite. I So, you know, I It's hard for
  774. 23:58me not to say please. I know that there
  775. 24:00are people who
  776. 24:01There is literature that talks about
  777. 24:03ways in terms of um So, here now, by the
  778. 24:05way, it's asking like what R scripts it
  779. 24:07is and what's available and so on. And
  780. 24:09it says, "Good, everything's available.
  781. 24:10Let's write this following Healy's
  782. 24:12principles: clean ggplot2, direct
  783. 24:14labeling, minimal chart junk, thoughtful
  784. 24:16color, and clear typography."
  785. 24:18Um
  786. 24:19So, I say "please" a lot, mainly cuz I
  787. 24:22just say I'm overly polite probably
  788. 24:24anyway. And then um
  789. 24:27>> I'm sorry.
  790. 24:27>> There is literature about the extent to
  791. 24:29which being polite or rude or
  792. 24:31threatening these LLMs can potentially
  793. 24:34change behavior. I guess I It's very
  794. 24:37hard for me to not just be polite. So,
  795. 24:40>> Okay.
  796. 24:40>> I I don't know how much it will affect
  797. 24:42your results. So, um So, now I wrote
  798. 24:45this, you know, 77 lines of this. And
  799. 24:47then I'm telling it to run it. It will
  800. 24:49also run it for me. So, I said, "Yes,
  801. 24:50you can run it." And
  802. 24:53>> Wait, it was 77 lines? Wow, okay.
  803. 24:56>> Um Well, cuz there's a lot of preambles.
  804. 24:59So here you can see what it looks like.
  805. 25:00This is it on the right. So here you
  806. 25:03have it just makes this nice It's this
  807. 25:05long plot.
  808. 25:06Um
  809. 25:08Cairo is an Oh, yes. So
  810. 25:11So it's running into this problem of it
  811. 25:13So this is very funny in that it's
  812. 25:15really struggling with um
  813. 25:17fonts.
  814. 25:18Because because
  815. 25:21um
  816. 25:23it So Kieran Healy has very preferences
  817. 25:25for fonts.
  818. 25:27>> Mhm.
  819. 25:27>> And so it's trying to do his fonts. And
  820. 25:29so now it's debugging this issue that
  821. 25:31comes up for the way that it's tried to
  822. 25:32structure it. And it looks like it
  823. 25:33should work. Which is kind of amazing.
  824. 25:36This [snorts] is always a huge issue.
  825. 25:37There's a whole blog post from
  826. 25:39Kieran Healy about this. So now it looks
  827. 25:42like
  828. 25:43it should be done. So what we can do it
  829. 25:45looks good. I see there's a one Unicode
  830. 25:48isn't supported well. So we'll fix that
  831. 25:50very quickly. Um
  832. 25:53and then we'll run it again.
  833. 25:55And once it's done we can see
  834. 25:58how happy it is or if it's happy.
  835. 26:02>> So all this doing get defying and all
  836. 26:04this things
  837. 26:06these are all well known terms or they
  838. 26:08just made it up?
  839. 26:09>> Which which terms? The
  840. 26:11>> The cogitating
  841. 26:13or
  842. 26:13>> Oh, cogitating. Yes, these are just like
  843. 26:15it's
  844. 26:16I think there's a You can actually
  845. 26:17change that. So you can
  846. 26:19cogitated just means to to have thought,
  847. 26:21but it uses all these ridiculous terms
  848. 26:22and you can change those. They're kind
  849. 26:24of meaningless. They're not No, they
  850. 26:25they're meaningless. They're kind of
  851. 26:26nonsense words. So now we can open this.
  852. 26:29So um let me open this file. So I'll say
  853. 26:32open home ownership by age
  854. 26:34um dot PDF. And let's see if it did
  855. 26:37exactly the same thing. It should be
  856. 26:38similar. So I'll open it. Oh, no, it
  857. 26:41didn't do that. Okay, very interesting.
  858. 26:43Um
  859. 26:45So and you know the reason for that it's
  860. 26:47actually kind of interesting. So it did
  861. 26:48a different graph. So here I'll I'll you
  862. 26:50what it looks like. This is what it did.
  863. 26:52Um
  864. 26:55it did this one.
  865. 26:57So
  866. 26:58Oh.
  867. 26:59>> That's a different one. That's very
  868. 27:00different.
  869. 27:00>> Yeah, sorry. Let me just It opened the
  870. 27:02wrong one for me. One sec. It's It looks
  871. 27:04very different. And part of the reason
  872. 27:06for that is it
  873. 27:09it only has these bucketed ones. So it's
  874. 27:12it clearly doesn't have as many um
  875. 27:13subcategories in terms of age. Well, now
  876. 27:15this is still very helpful. You can kind
  877. 27:17of see the relative home ownership rate,
  878. 27:19but it's not the same kind of graph. So
  879. 27:20now we could ask the question of um
  880. 27:25how can we get something that looks
  881. 27:27closer to these other these other ones?
  882. 27:29Um
  883. 27:30It's interesting in that this is sort of
  884. 27:32more aggregated.
  885. 27:34>> x axis. You want the timeline on the x
  886. 27:35axis.
  887. 27:35>> Yeah, exactly. So let's let's let's kind
  888. 27:38of change that and see if we can get
  889. 27:39there. And it what it might say is um
  890. 27:43you know, it might say, "Hey,
  891. 27:45uh
  892. 27:47you know, the data doesn't work for
  893. 27:48this." And then so then we'd have to be
  894. 27:49like, "Okay, well, you need to go back
  895. 27:50and figure it out." Um I
  896. 27:53So I have a tendency of being polite
  897. 27:55here. I say, "This is great, but I want
  898. 27:58a graph where age
  899. 28:02is on the x axis and the death
  900. 28:06distribution
  901. 28:08on the y axis
  902. 28:10and there are different
  903. 28:14lines for each year.
  904. 28:17Do you have sufficiently fine-grained
  905. 28:20age data for this?
  906. 28:22Can you go back and find something
  907. 28:26with age buckets?
  908. 28:28If not
  909. 28:33So we'll see if this kind of
  910. 28:36Of course, it is kind of cool to look at
  911. 28:37that graph in the sense that it kind of
  912. 28:39exactly explains
  913. 28:41what has happened during this period,
  914. 28:43right? So if we while we wait for this
  915. 28:44to kind of run, it's thinking. So it
  916. 28:47says, "Oh, yes, good news. It actually
  917. 28:49all There are finer age buckets. We only
  918. 28:50got the five big ones."
  919. 28:52So, this time it didn't do the big ones.
  920. 28:54I wanted more. And so, now it's going to
  921. 28:56re-download the data.
  922. 28:59Now, refactor this
  923. 29:00>> it will re-download it? The CSV file
  924. 29:03probably has it already or not?
  925. 29:05>> No, cuz I think when it parsed There's a
  926. 29:06large much larger Excel file that it
  927. 29:10kind of read.
  928. 29:11Now, I think it just downloads and then
  929. 29:13kind of gets it it pulls directly from
  930. 29:15that. So, what it's doing is it's
  931. 29:16downloading, reading into memory, and
  932. 29:18then parsing it. Think if this was a
  933. 29:19bigger file. These are pretty small
  934. 29:21files. If they were bigger files, we'd
  935. 29:23have a raw folder where we download all
  936. 29:25this stuff, and then we wouldn't have to
  937. 29:26re-download. These are tiny by, you
  938. 29:28know,
  939. 29:29Um so, now it's going to rerun it.
  940. 29:32And
  941. 29:35um
  942. 29:36And you notice, by the way, Marcus, this
  943. 29:38is like
  944. 29:39This obviously it's a little strange to
  945. 29:40be working in the command line and
  946. 29:42everything else. For the most part, this
  947. 29:44is all
  948. 29:45um pretty straightforward English. Yeah,
  949. 29:48and you can just It's the same thing
  950. 29:49you'd say for talking to someone like
  951. 29:51you and I both here. Let me quickly I'll
  952. 29:53show you what co-worker is doing. Yeah,
  953. 29:56co-worker is doing something very
  954. 29:57similar.
  955. 29:58It looks like it has managed to find a
  956. 30:00data set. So, it says,
  957. 30:03"It looks like" So, it's writing the
  958. 30:06download.api download.data.py.
  959. 30:09I'm curious which data set it's going to
  960. 30:10use.
  961. 30:11Um
  962. 30:13It's been a bunch of time thinking about
  963. 30:15this, and now it is finally the script.
  964. 30:18So, we'll see what it's doing. So, it
  965. 30:20looks like it's writing it here. So,
  966. 30:22what
  967. 30:23uh it's a interesting question of what
  968. 30:25file. So, download fr- Oh, so it found
  969. 30:26the same one.
  970. 30:28So, it's doing the same one here,
  971. 30:30but it's only doing it from table 19.
  972. 30:34Um
  973. 30:35Oh, no, and here's 17 as well. So, it
  974. 30:37found exactly the same one. So, you
  975. 30:39know, co-
  976. 30:41um
  977. 30:43So, oh, this is interesting. So, the
  978. 30:44challenge here, and so I didn't quite
  979. 30:46realize this about co-work. So, if you
  980. 30:48look at this here,
  981. 30:49it's the same thing that would happen on
  982. 30:50the website often. So, it wrote a it
  983. 30:52wrote a script,
  984. 30:54but the script,
  985. 30:56um
  986. 30:57basically, it's not able to write it and
  987. 30:59then query something because it's in
  988. 31:01something called a sandbox. So, it's
  989. 31:03really working just within this one
  990. 31:05sandbox, which is something we'll talk
  991. 31:06about for Claude code going forward.
  992. 31:08We let Claude go nuts, right? We said,
  993. 31:11"Hey, yeah, Claude, go access the web,
  994. 31:13do whatever you want."
  995. 31:15>> Yeah.
  996. 31:15>> Um
  997. 31:17And so, it's struggling inside Claude
  998. 31:19co-work to kind of work in the way that
  999. 31:21you would if you ran your own script. It
  1000. 31:23can't really act like you, per se, if
  1001. 31:25that makes sense. So, there's it's
  1002. 31:27getting
  1003. 31:28>> in the sandbox.
  1004. 31:29>> It's really much more sandbox, which of
  1005. 31:31course then removes a lot of the privacy
  1006. 31:33and other concerns that you might have,
  1007. 31:35right? So, there's there's kind of, um a
  1008. 31:38lot of
  1009. 31:39um pluses and minuses. Um So, let me
  1010. 31:43kind of, to finish this up and then
  1011. 31:46we can wrap up, is so here now we fix
  1012. 31:48this, we've told it all the things, it's
  1013. 31:49kind of working.
  1014. 31:52Um let's run this again.
  1015. 31:55And we'll see if it's kind of
  1016. 31:58fixed.
  1017. 32:02This looks like it's it's reading this,
  1018. 32:03da da da.
  1019. 32:09So,
  1020. 32:11it's still working. So, gesticulating
  1021. 32:13just means it's working. It doesn't mean
  1022. 32:14anything else. And so, now it's going to
  1023. 32:16do a little bit more. The year it says
  1024. 32:19the shape is right, but the year labels
  1025. 32:20are overlapping. Let me use this thing
  1026. 32:22to fine-tune the spacing. So, it really
  1027. 32:24is like like a good RA in the sense that
  1028. 32:26it looks to make nice graphs for you.
  1029. 32:28Um
  1030. 32:30>> So, it even discovers problems.
  1031. 32:32>> Yeah. I mean, it tries. It doesn't
  1032. 32:34always. Sometimes you have to tell it to
  1033. 32:36go look. This is a pretty
  1034. 32:37straightforward problem that I've asked
  1035. 32:39it to do. On more complicated things,
  1036. 32:41like if you were writing a macro model
  1037. 32:42and you wanted to code it up, you might
  1038. 32:44say, "Okay, now make sure you go review
  1039. 32:46that code and make sure like, you know,
  1040. 32:48everything makes sense. Are the
  1041. 32:49intertemporal constraints being
  1042. 32:51satisfied, etc., etc."
  1043. 32:54>> So, what's what's done on your computer
  1044. 32:56and what's done in the cloud or
  1045. 32:59>> So, in the cloud is anything that has to
  1046. 33:01do with text in terms of what it's
  1047. 33:02writing. Like it's writing stuff like
  1048. 33:04writing a like telling you what script
  1049. 33:06to do. The program being run, the
  1050. 33:09commands are coming from the cloud, but
  1051. 33:11the the actual execution of the R script
  1052. 33:14is being done on my computer. So,
  1053. 33:16>> So, you have R on your computer. If you
  1054. 33:18don't have R on your computer, it
  1055. 33:19wouldn't work.
  1056. 33:20>> No, and then you could ask it to install
  1057. 33:22it if you wanted or you use Python or
  1058. 33:24something else. That's right. But that's
  1059. 33:25true. Um yes, that's right. That's like
  1060. 33:28basically you need to have the same um
  1061. 33:29thing here. So, let's look at what it
  1062. 33:31does. So, just to give you a sense,
  1063. 33:32you'll notice um
  1064. 33:36This is what it's gotten to so far,
  1065. 33:37although it you notice it keeps thinking
  1066. 33:39and it keeps wanting to do stuff. I just
  1067. 33:40want to show you what this picture looks
  1068. 33:42like.
  1069. 33:42>> So, all this software you have to have
  1070. 33:44on your local computer essentially.
  1071. 33:45>> Yeah, but that's true. I think of yes,
  1072. 33:47but that's right. So, here's what it's
  1073. 33:48made now, but it doesn't love what it's
  1074. 33:50done yet. So, very similar, but still
  1075. 33:53not identical. So, this is what it's
  1076. 33:54made.
  1077. 33:56Um and now it will let it we'll see what
  1078. 33:59it
  1079. 34:00um
  1080. 34:01We'll just kind of last thing here.
  1081. 34:04We'll just let it do one more piece,
  1082. 34:07which is to say, "Okay, you want to do a
  1083. 34:08little bit more." It's going to change
  1084. 34:10the colors. It has lots of strong
  1085. 34:11feelings right now about what things
  1086. 34:12need to look like.
  1087. 34:14And
  1088. 34:16hopefully
  1089. 34:17This is because I I really gave it a
  1090. 34:19very dogmatic viewpoint on it. If I had
  1091. 34:21said, "Just make a graph," it would have
  1092. 34:23said, "Great. Here's a graph." But
  1093. 34:25instead I said, "You need to make, you
  1094. 34:26know, follow these very particular
  1095. 34:28protocols of how to do things." It's
  1096. 34:30it's iterating to kind of make sure it
  1097. 34:32looks kind of nice. So, now it's done.
  1098. 34:34Says, "Great. It looks to this.
  1099. 34:37It's using this data. Here's some
  1100. 34:39features of it."
  1101. 34:41Um of what's going on. And now let's
  1102. 34:43just look at that graph and we'll be
  1103. 34:45done. So, it didn't do the gray lines
  1104. 34:46and like in the one that I showed you.
  1105. 34:49Um and I'll but I'll show you this and
  1106. 34:51then we'll be done. So, here it is.
  1107. 34:55So, this is the version of it. It didn't
  1108. 34:56do the gray lines, but you can kind of
  1109. 34:58see it goes I see. See the different
  1110. 35:01versions. I kind of prefer the other one
  1111. 35:02that was made, but this is kind of
  1112. 35:04getting you a sense of what it looks
  1113. 35:05like. Um you have kind of this is the
  1114. 35:08time series of what it looks like. You
  1115. 35:10have the kind of the peak. I think
  1116. 35:12there's different ways you could make
  1117. 35:12this, but this is kind of a This is a
  1118. 35:14pretty good start. You can kind of
  1119. 35:15clearly see like this is what it looked
  1120. 35:17like at certain points. I would say the
  1121. 35:19crisis looks very similar to 2024 and 20
  1122. 35:22you know, 2004 is when obviously
  1123. 35:24homeownership was the highest across the
  1124. 35:25board. There are better ways to do this,
  1125. 35:27but you know, we could iterate here
  1126. 35:28forever kind of of what it would look
  1127. 35:30like.
  1128. 35:31Um so, that's kind of Yeah. So, that's
  1129. 35:33kind of just to kind of sum up on this
  1130. 35:35cuz I don't I think like you could do a
  1131. 35:36lot of ideas here if you wanted. Is
  1132. 35:41you know, the idea here is that when you
  1133. 35:43work um sorry, not this one. We'll do if
  1134. 35:47we think about
  1135. 35:49um
  1136. 35:52you know, if we could make this graph,
  1137. 35:53you get a lot of really nice things
  1138. 35:55here. Kind of what's nice before is that
  1139. 35:56you had to kind of run a lot of things
  1140. 35:58and go back and forth. Instead, you can
  1141. 35:59kind of just tell it what you want the
  1142. 36:01graph to look like and it will do it
  1143. 36:02yourself. That's really kind of lovely
  1144. 36:04part of it.
  1145. 36:05And then you can just iterate
  1146. 36:06accordingly. You can add different
  1147. 36:08things. You can add stylings if you want
  1148. 36:10it to be satisfying certain
  1149. 36:12requirements. And in the end, you know,
  1150. 36:14now we have all this stuff in one folder
  1151. 36:16where we can kind of it creates a kind
  1152. 36:18of repository that looks like a project,
  1153. 36:20right? You started to actually make
  1154. 36:22stuff that looks like code for a
  1155. 36:23project. And that's kind of the key
  1156. 36:25benefit is like you have Claude do these
  1157. 36:28things. It works with you to do the data
  1158. 36:30acquisition. You can talk about what you
  1159. 36:31want to look like. You always are
  1160. 36:33generating scripts so that you have can
  1161. 36:35actually do it yourself and you can look
  1162. 36:36at the code later.
  1163. 36:38And then you can kind of do judgment on
  1164. 36:40what you need things to look like. So
  1165. 36:42that's kind of the key thing and I think
  1166. 36:46next time what we'll do is we'll try to
  1167. 36:47do something a lot more complicated and
  1168. 36:48it'll kind of be more clear of why you
  1169. 36:50need to be what kind of what what really
  1170. 36:52unlocks.
  1171. 36:55>> Fantastic. Okay.
  1172. 36:58So that concludes this video but uh
  1173. 37:01don't hold off to go to the next one.
  1174. 37:03It's coming. We're ready to full force
  1175. 37:06data scrapping.
  1176. 37:07>> Perfect. All right. Thank Thanks so
  1177. 37:10much.

About this transcript

This page contains the full transcript of Data Analysis: Claude Code for Economists with Paul Goldsmith-Pinkham | Markus' Academy | Ep. 162-2 by Markus' Academy, generated from the public captions YouTube serves with the video. The transcript has 7,688 words across 1,177 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.