Nick provides a masterclass in practical data literacy by transforming a niche hobby into a rigorous exercise in market analysis and automation. This approach effectively democratizes sophisticated financial tools, allowing collectors to navigate the secondary market with data-driven precision.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Magic the Gathering Crash Course
Added:Data science comes down to three things.
Number one, critical thinking, thinking critically. I'll talk about that in a second. Two, is data and the power that comes with it.
Incredible.
We'll get to that in a second, too. And then the third thing is web scraping.
Enough said. I guess I will say more later, but that's going to be the premise. Today we're going to talk about lot number two, about data and the power that Magic the Gathering and the data behind it has, and how you can leverage some of that data in Google Sheets using XPaths and Google Sheet formulas, and be your own data scientist starting today tracking Magic prices from TCGplayer.
But, hey, what's up? My name's Nick.
Subscribe. All right, great intro. Okay.
So, first thing, critical thinking.
I invite you to think critically.
My comment section is really good at that. They listen to me and they think critically. I'm just kidding.
Um but seriously, critical thinking critical thinking is being argumentative, it is being uh combative.
You don't have to be rude, right? But you need to oppose what the dialogue is to think critically.
So, if you just listen to people and you're like, "Oh yeah, that sounds good.
That's great." You're not critically thinking.
If you listen and you say, "Yes, but" are you annoying? Yes, but you're also thinking critically. And so, do it. Think critically. Don't be annoying. Don't be a jerk. It's not a free pass to think you're a know-it-all or whatever. But, if everybody in the world says this Magic set is going to fail or this Magic set's going to do well, or heck, if I tell you this Magic set's going to do well or fail or whatever, think critically. And many of you are very good at that, so my hats off.
Number two.
For being a data scientist, you need to understand data and the power that's behind it.
There's a lot that goes into this.
And and a lot that goes into this with magic.
If you don't think that Wizards of the Coast hires teams of analysts and data scientists that are crunching numbers, that are web scraping, that's number three, we'll get to that. Web scraping price data, sales history, all these things and doing analytics on what is the minimum number of cool special guests they can put inside of a booster box to get it to sell out as quickly as possible.
You're wrong.
You're wrong. And now the data scientists at Wizards of the Coast is watching and and shaking their head cuz they're understaffed and overworked, but but still you exist. So, um you know, my point is made.
And there's it's because you need it. And in this modern economy and modern day to be strategically dangerous, you have to have scientists and analysts and people that know what they're doing or at least know how to crunch the numbers going through it and making recommendations on what kind of choices you should make based on the data that is out there. And that's a lot of what data science is. And you can call it many things, you know, you can call it you're an analyst or a business analyst or you know, whatever, but at the end of the day, if you're working with data, you're crunching data, and you're using it to solve real life problems, uh you're kind of a data scientist. So, we'll get more into that um about exactly examples in magic and things like that in a second, but let me talk about web scraping real quick. Web scraping is how you get data.
I worked as a research assistant at college and I was around many many very smart people, much smarter than me. They would go on to get PhDs and stuff like that. I did not get a PhD.
But these people, um there's also many many people that like me didn't get a PhD and just went out and worked and made money.
Boo.
And the number one skill that came back cuz my professor would kind of keep in touch with a lot of these research assistants and say, "Hey, what was the most valuable skill you learned while being a research assistant? What did you use out in the real world as an economist, as a data scientist, as an analyst, as whatever?"
So, you know, all this white-collar shin and shin dick ness.
And it always came back web scraping.
And there's a reason for that.
Web scraping is how you get data. All the power that comes from knowing what cards are going to spike, from knowing the prices of sealed booster boxes and where to get it, at what price, at what deal, at what time, it all comes from web scraping.
And so, that's that's the skill. And we're going to do a little bit of that today. You're going to learn it today with me, right now.
So, let's let's start with the basics. And the basics you have a collection or a portfolio, if you want to call it that, or if that grosses you out, you you can call it a collection, and you want to keep tabs on how valuable it is.
There's lots of ways that we could go about doing this.
And I am going to demo with you right now. Let's change the screen what it looks like if you want to build yourself a little spreadsheet. And so, mine's called Commander Decks, ignore that, um because this is going to be my little portfolio of my magic products, the stuff I've got on this shelf, and we're going to I'm going to show you how you grab the prices from TCGPlayer and can track it and turn this into a cool tool that you could use in your day-to-day life. And guess what? I do use this. I'm not going to show you my actual sheet, but I have a sheet of my collection and what it's worth, and I keep tabs on it. I check on it probably once every other week or something like that. And if something spikes and hits a price where I'm like, "Oh, it's time to sell." That's how I know. That's how I know it's time to sell. And yes, you can do this by just going on to TCGPlayer and looking up every single product, but a big part, you know, maybe the fourth thing in being a data scientist is automation and using technology to make your life easier, and that's what we're going to do today. So, I've made a spreadsheet.
It's got four columns. The product, the buy price. That's how much I spent on it.
The TCGPlayer low price, which is what we're going to grab.
And then, if I sold today, how much money would I make? I love this column.
I think it's a great column. I think everybody should be aware of their collection and how much money would you make if you sold it today.
Uh it it information gives you the ability to make optimal decision-making.
And if you have, you know, whatever, a Kaladesh Invocations Trinisphere. Ooh, shiny. Thanks. Thanks all. Thanks for enjoying my shiny Invocations Trinisphere.
And you realize that you could just have a nice Benjamin if you sold it, and you want that Benjamin, then, you know, you go ahead and sell it. But you wouldn't know that unless you knew the price. So, anyways, this is good tool.
Good tool to have.
So, what are we going to start with today? We're going to start with these things on my shelf, and I've got a War of the Spark booster box. This is back before play, before set, before all the collector shenanigans. This is a just regular War of the Spark booster box.
What did I buy it for? I bought it for 160.
Very cool. Great job, Nick. You're great at getting good prices. Thanks all. All right, TCGPlayer low price. This is the secret sauce.
If you haven't used Google Sheets before, it's very powerful. It's like Excel.
Um if you haven't used Excel before, then you must be such a happy person.
So, there's formulas. In formulas, you can put an equal sign, and then you can type whatever. You can do 8 * 9 and hit enter, and then boom, it does the formula. It tells you what that equals.
But, you can do more complicated formulas. You can do a formula like equals, and don't worry, I'm going to paste this below. But, if you want to follow along and like learn how to do this stuff, then more power to you because it's pretty cool.
Equals import XML. Imports data structures from online. And you can click on that, and import XML. Oh, and check this out. There's a formula help.
You can click on this question mark, and it will tell you like what these things mean and what they are.
And you can see this formula, import XML, and it has an example of Wikipedia.
Very cool.
We are going to import XML from TCGPlayer, and I want to know, whoops, spoilers. Let me exit out of that. Um, and I want to know I want to get this price, this price right here.
So, this is important. The way this works, you choose a URL, you choose an XPath.
An XPath is like a treasure map to a spot on a webpage.
And so, if I choose the XPath that goes right here, or to this number, it's essentially a map to this spot, to this number, how it's embedded in the website.
And so, keep that in mind because this number right here, this 178.28, is the same price is the lowest priced listing that doesn't have a picture.
And how do I know that? Just from experience using TCGPlayer. But, that's what I want for my portfolio, I want to know what is the lowest listed price for my sealed product that doesn't have a picture cuz the pictures can sometimes be other products, and it's a bunch of shenanigans.
So, what do I need? I need the URL and I need a XPath. Let's grab the URL. So, URL is the link Whoops, what did I click on? Go back. All right. Uh is the link to the website. Uh I guess you can't see, but I'm clicking on I'm clicking on the URL. If you don't know how to grab URL, then I'm sorry. Uh double quote paste double quote comma double quote double quote close paren hit enter.
So, uh the reason I did that was just because we need to fill in this XML or sorry this XPath.
And then we'll be done. So, this formula here import XML, you paste in your URL, comma paste in your XPath and all of that in double quotes and then you're done. Right, let's grab an XPath.
So, this is the tricky part and by tricky I mean it's not actually that hard, but if you have no idea what you're doing then it's it's it is that hard. So, you find the number you want. You right click on it and then you click on inspect.
Boom. Then it opens up all this codey stuff. Don't be scared. Take a deep breath.
Then you right click so it's you know, you find the number you want. 17828 that is the number I want the 17828. Also, when you hover over it it uh highlights it which is very cool.
And it calls it the spotlight price.
Very cool.
Right click on that. Copy copy XPath.
Oh, could you even see that? Let me try that again. It copy copy XPath. Yeah, now you can see it for sure.
All right. Let's go back to our formula.
We double click on this.
We go back to these double quotes. Paste it in and hit enter, but there's an error.
Formula parse error. How do we fix that?
We double click again. Check it out.
This app right here is colored black.
That is because there are double quotes around it when the formula needs to have no double quotes in it. So, what we do is we take those out and replace them with single quotes. Why does this work?
I don't know, it just does. Single quotes.
Hit enter. Loading. 178.28.
Ladies and gentlemen, we got them.
We have now web scraped in albeit a pretty primitive, you know, small way, but it's a big way for you if this is your first time.
We have web scraped TCGplayer and gotten a live snapshot of the TCGplayer low price for War of the Spark booster box.
Congratulations. Now, let's calculate this last column. If I sold today, how much money would I make? Equals. I'm going to do a couple parentheses cuz you might be tempted You might be tempted to say, "Oh, well, the TCGplayer low price and then you subtract the buy price and hit enter and boom, you'd make 18 bucks." But, no, you wouldn't because if you sold anything online, you know better. You know that you pay shipping and fees.
It stinks.
If you can sell locally, man, if I could find someone locally that would buy my War of the Spark booster box for 178.28, I wouldn't do it because, you know, I I want to keep that. But, but that would save me a bunch of money because I wouldn't have to pay shipping or fees.
So, how much would I actually make if I sold it? What that formula looks like is you take the price that you'd sell it for, you multiply that by 0.87 because that will take out fees and fees are a big part of selling on TCGplayer and eBay. About 13%. I know it's different.
It's like 13.5 or depends on if you're a pro or direct or, you know, whatever, but if you're just a newbie or whatever selling on TCGplayer, uh around 13% in my opinion is like a good rounding number. Anyways.
And then we got to subtract out shipping. Let's say that we are going to spend eight bucks on shipping. We might need to spend more. There's the cost of the cardboard and bubble wrap and uh the shipping label is the biggest thing. And so really honestly, it's probably closer to 10. Minus 10.
And then we take out the cost of the buy price of the original price we paid. And there we go, ladies and gentlemen. We would lose $14.90 if we sold today. Good thing I have no intention. So, that is a product.
Great job, team.
Let's do one more real quick. Let's do a single because the problem, like I guess I Let me Let me demo this.
Uh Jewel Lotus.
I bought mine for I don't know.
Did I get them for like 30 each? I think it was about that.
Pretty cool.
Um I meant why would I own Jewel Lotus?
It's a banned card that has no place to be played in.
TCG Player low price. So, I can grab the same formula, paste it in here, and change the URL. So, that's what I'll do.
I'm going to change the the URL to be to this Jewel Lotus listing on TCG Player.
Paste that in.
Hit enter, and boom.
$48.70.
That is so cool, except that's not the price of the card.
This XPath points us to this spot on the page. However, this spot on the page for singles is not the lowest price.
It is the TCG Player direct spotlighted card.
The lowest price is over here.
Uh $42.99 plus $0.99 shipping.
Or it is over here. Lowest sale price. Maybe that's what we want. High sale price.
Maybe that's what we want.
Um the the point is we can grab any of these any of these numbers.
So, let's try grabbing this one. Actually, haven't grabbed this one before.
So, we need the X path. We need the treasure map that points to this number.
So, inspect.
Whoa, made the screen all weird. All right, right click, inspect again just to make sure we're pointing at the right spot. Yep, this is it, the 4299 that I want. Keep in mind this isn't including the shipping number, so this isn't going to quite be right, but close enough.
Copy X path.
And then we go back over here and let's paste that X path in.
We have to make sure the double quotes for this app over here turn into single quotes. Hit enter, let's see if that works. Boom, baby, it worked.
And this formula, what's really cool about spreadsheets is you can drag formulas down. I'm just clicking on the corner, bottom right corner, dragging it down, and boom. Nice. My Jewel Lotus that I bought for 30 bucks, if I sold it today, I would lose $2.60.
Woo. So, pretty cool.
All right, any questions, let me know.
Uh comment section below. If uh you like this kind of thing, if you want to learn about web scraping, if you want to learn about I don't know.
Data science, you should you know, shoot your suggestions in the comment section below. Subscribe. If you haven't subscribed, you really ought to consider it. I understand you don't subscribe to anything. You just let the algorithm give to you the stuff that you want to listen to, but you could subscribe to just me, and don't worry. If you stop watching me, uh YouTube will stop showing you my stuff even if you're subscribed. So, it's really low commitment, but you you can subscribe, and that will help pump my numbers, and I will be grateful.
So, and I also hope you come back and watch more stuff in the future. Anyways, thanks for watching, all. Uh let me know what you think, and I will see you later.
Related Videos

TOP 15 Data compression Interview Questions and Answers 2019 Part-2 | Data compression | Wisdom jobs
wisdomjobs
281 views•2019-06-28

CTS 158: 802.11w Management Frame Protection
ClearToSend
4K views•2019-02-04

NDSS 2019 Send Hardest Problems My Way: Probabilistic Path Prioritization for Hybrid Fuzzing
NDSSSymposium
496 views•2019-04-02

How realistic is Cities: Skylines?
CityBeautiful
159K views•2019-02-14

GUIs & TUIs: Choosing a User Interface for Your Python Project | Real Python Podcast
realpython
2K views•2025-04-04

The OSI Model - Explained by Example
hnasr
225K views•2019-05-12

Cloud Computing - Introduction
elithecomputerguy
98K views•2019-10-07

From Traveler's Dilemma to Dynamic Routing | Demystifying Networking
IITBombayJuly
5K views•2019-08-04
Trending

WOW! Judge TURNS THE TABLES on Trump in His OWN $10B LAWSUIT!!!
MeidasTouch
197K views•2026-07-23

Playstation NO DISC/NO BUY Fight Is Over...
DavidJaffeGames
4K views•2026-07-23

Steam and Xbox Just Dropped The Hammer On PlayStation
OhNoItsAlexx
9K views•2026-07-23

Americans Confused in Australia for 17 Minutes Straight
IWrocker
17K views•2026-07-23