Welcome to the Cannabis Data Science Meetup Group.
You're in for a special treat today.
Got incredibly good material.
Some of my thoughts have really come together about the industry in general and the economic
effects of the permitted cannabis industry.
So without further ado, we'll go ahead and dive right into it and I'll start sharing
my screen.
Thanks.
So last week we began to just see how Massachusetts is publishing a good amount of public data.
So you have everything from just the number of licensees, you have sales by product type,
and at the end of last week we were beginning to look at the production side.
So we saw, wow, they're doing a good job at publishing data.
They're publishing daily totals on an almost real time basis.
Look at this.
This was just updated on September 27th, so just on Monday.
So we have incredibly recent data, which is hard to come by data that's so fresh.
So we've got fresh data and on top of that we can access it through an API just to make
our lives simple and easy.
And we have a rich data set here with a number of interesting data points.
We've got the number of plants in their various stages, so we can see what plants are mature,
which are flowering.
We can see what packages are on hand, so we can get a gauge of inventory at any given
time.
Furthermore, we can get a couple more interesting data points, such as the number of strains,
products, and last but not least, we saw, wow, they're tracking the number of employees
in the cannabis industry.
And earlier in this series, in particular, we were looking at Colorado and we were trying
to look at production functions and we were talking about capital inputs, labor inputs,
and that was where we estimated the competitive rate of return on capital, as well as the
competitive wage rate in Colorado.
And so what's real interesting with this data is we could repeat this exact same analysis
for Massachusetts.
And we'll probably do that, but we can do something new and fresh today.
So first things first, let's get the data.
So just using a handful of standard Python packages, we'll be using Python, but the data
is accessible through an API, so you can use your favorite programming languages.
Just writing a handful of helper functions here, I can talk a bit more about these when
we use them here.
So first things first, let's get this data and look at it ourselves.
So you can register for Socratic to get an app token.
You're not necessarily required.
You just get throttled if you make too many requests without an app token.
So we can use one at the end of the row.
So we'll just initialize the API.
So we're just saying, okay, this is the URL.
So what is an API?
It's really just a simple, simple website that you can interact with programmatically
to get data.
So it's not going to be marked up in a nice, beautiful website format.
It's just going to be raw data.
That's what we're after, the bare bones.
So we'll just ping this website, backslash our data set ID, which you can get right here,
the data set identifier.
We'll pass a handful of parameters.
So we'll basically say, okay, we don't want more than 2000 observations.
And we actually want to order this.
So here I've done a little bit of scouting.
And then I saw, okay, look, they give us a timestamp.
So we can actually order our data by time.
Here they give us an example of how you can do a query for a specific date.
Luckily, we can use a search query language command descending.
To specify in our query that we want everything sorted by the date.
So enough of that.
And so long story short, we're just going to ping the website and get our data.
So we should have our data here.
So for example, in the programming language, 200 is success.
And so what did we just get?
Well, instead of getting a website, we just got a giant data dump.
So this is instead of delivering us a website, they just deliver us a bunch of what's called
JSON objects.
So JavaScript object notation data.
And so this is how you can think about a data point where it's essentially an observation
here.
So this is one observation.
So this is the date, September 27th.
On that date, there were 129,000 immature plants and so on and so forth.
So we can work with this.
What's a glorified simplified Excel spreadsheet in programming language?
So a data frame.
So we'll just put this in the data frame.
And here I use one of these helper functions to basically put everything into chronological
order.
Because we wanted to get the most recent data, but now we actually need to put it in chronological
order just because that's how we do time series analysis from the past to the present or even
the future.
So let's put this into a data frame just so that we can work with it easily.
And what does this look like?
Well this is why I was saying this looks similar to an Excel spreadsheet where you've got a
table here.
We've got a thousand plus rows, 1069 rows.
So that's 1069 days.
So just short of three years of data here.
And like we mentioned earlier, we have all these observations.
Here's the observations on a daily basis.
Awesome.
What variables do we have here?
Well I just did a little pre-scouting and just listed, okay.
Here we are.
So those are the variables we're working with.
So without further ado, let's start looking at a handful of these.
So great because that's the first step is look at the data.
So you can plot these.
Awesome.
So we have our three years of data and we see that wow, at the very beginning, the very
first observation, there were three employees.
So we're basically tracking the Massachusetts industry from the inception, the first company,
the first three employees to present day where we have just shy of 10,000 employees in presumably
plant touching cannabis businesses in Massachusetts.
So it's now time to put this into perspective because that I think is what this is all about.
Because there's been a lot of noise in the cannabis industry.
They'll let you believe that everybody works in the cannabis industry and it's just booming
and well that may be, but it's time to quantify that.
So it's time to measure, okay, what exactly is the size, what exactly is the impact here,
at least the economic impact.
We can measure that.
So without further ado, the reason why is, well, perhaps other states can look at the
Massachusetts and see, okay, what happens?
What is the economic effect of permitting cannabis?
You can look at the social effects as you should, but perhaps in another study right
now they're really focused on the economic side of things.
So time to put this into perspective.
So for starters, this is going to need some sort of time scale, right?
We're looking at a time series here.
So what we can do is actually add a date to our data and set the index on the date.
Nothing fancy here, but what that does is we can now plot our data in the exact same
way, and we actually now can see the time scale.
So now we can see, oh, look at this.
Our data is starting just about this time in 2018, around September or October of 2018,
and we can actually quantify that as October 15th is when our data set begins.
And as we noted, we have quite recent data here up until September 27th, so all the way
until Monday's totals.
So they haven't quite published Tuesday's totals yet.
So let's say, in my opinion, awesome that we have almost real-time data here.
So let's start putting things into context.
So we know how many employees are here in the campus industry.
Well, how many employees are in Massachusetts in general?
So this is a technique that I suggest to anyone doing data sciences.
OK, you get your data set, right?
Nice interesting data.
What do we have here?
How do you define a Massachusetts employee for the total?
Not trying to be nasty.
I'm just having a little difficulty with that.
Wait, would you comment, Heather?
Oh, meaning to say, it may not be so simple to define and say, OK, total Massachusetts-bound
employees, that's your total.
And then you're going to divide that by the number of cannabis-related or cannabis industry
employees.
Am I right?
Because essentially, the rough idea is to just try to figure out the percentage of employees
that are working in the cannabis industry.
Right.
So for cannabis, there aren't a whole lot of remote jobs.
And I guess for me, just using Maryland as a comparison, I have difficulty even saying
who's a Maryland employee other than those who are physically on site.
Just because the headquarters is there, all of their managers may be on the West Coast
somewhere as I'm finding.
So I'm not saying that the number is going to be wrong.
The definition of a Massachusetts employee may be more complicated than expected.
Critical, critical, critical, critical point, Heather.
And this is what we need more of, right?
Because you can't just take this data at face value.
You need to, for each, every data point, do exactly what you did.
You just say, okay, we've got this data point here.
What could be wrong with it?
Well, for starters, it could easily undercount people.
Like you said, like executives, people who are kind of gray on the books, right?
Like are the janitors, are the janitors, are all the consultants or what have you, or all
those people on the books.
So I would say, like you said, and then you can start to think, okay, how does that bias
the data?
Well, I think it would probably bias the data downwards, right?
Not necessarily, but I think you may have an undercount of employees here.
So I think there could be more people than this that are associated with these businesses.
And another interesting aspect is there's probably many people that are tangentially
related to these businesses, like consultants, right?
Like so you may have law firms or banks that predominantly serve these licensees, but they're
not going to be counted as employees.
So I think I like your note, Heather, and I think we need more of that.
So be incredibly critical of these data points because, you know, we'll do our analysis here,
but if our data going in has measurement errors, then that's going to have consequences on
our analysis.
So critical point.
I'd like to say that's not going to stop us.
We'll do our analysis anyways.
You just have to take that into consideration when you're looking at the analysis.
So when we get to our final result, we'll want to take into consideration, okay, let's
keep in mind that total employees may be biased downwards or some of these other figures,
you know, they may have their own measurements and their measurement errors of their own.
So these are things that factor into our conclusion, conclusions and results.
So every bit is worth pointing out.
So just to keep steamrolling here, we have 15 variables.
So that's 15 sources of potential measurement error.
So every single one of these probably has their own flaws.
So but nonetheless, we've got these data points here and to introduce even more uncertainty
and measurement error, but also to add some more insight as well, we can supplement this
data.
And so we'll be supplementing it with data from the the Petal Roll Reserve here.
So yes, that's right, we were looking at the number of employees.
So once again, these numbers admittedly, and you know, people have done studies, there
are undoubtedly measurement errors here.
So take them into consideration, but we can still just start getting a rough measure on
on the market, the size of the market and its impact.
Because a rough measure is better than no measure.
So we'll grab the number of employees here in Massachusetts.
So note that this is going to be in thousands of people.
So without further ado, we can get the number of Massachusetts employees here with the thread.
Note I'm just doing your I'll show you specifically what I'm doing here.
So we'll grab the first thing first, we need thread.
So we've imported the packages.
And then we need to initialize the API.
So essentially just create a little client here that remembers our API key and makes
requests on our behalf to the website, because once again, just like before, right, we're
using one API, the Socratic API, we'll also use the dead Fred API, which is once again,
just a URL that we ping and get some data back.
Specifically, we're going to ping Federal Reserve.
We want to real quick, I'm defining the start of our data here, right, because here's the
Federal Reserve data set, they're going all the way back to prior 1992.
That's awesome.
We don't necessarily need that data at this moment.
So we'll define a start date here.
And like we noted earlier, our start date is October 15, 2018.
Next, we need a data set ID.
Notice here, they're all over the place, but there's one right there.
You can also get it from the URL.
So we'll get this data set ID.
Then we'll read the employees here.
And let's see, but yes, that's right.
And so just, and this is what you'll notice with data sciences.
There's these small little things that are important and you can get hung up on them.
But here I've just done a little scouting.
And so I'll show you a couple things that may seem simple, but they'll make the analysis
go a lot better.
So here we have the total Massachusetts employees.
We have it by the month.
So that is awesome.
Right.
And wow, look at that.
So keep in mind, this is thousands of employees.
So here we're going to multiply that by a thousand in just one second.
But you'll notice, wow, like we noticed, we noted this last meetup.
Yeah, something happened in April of 2020.
So that's going to be showing in a lot of data sets.
So there's a regime or they go by so many names.
It depends on what field you're really studying, maybe macroeconomics, like a structural break,
a shock.
So anyways, anyways, we're focusing on the data here.
So this little trick is basically if you look at our production data here, right, we've
got daily data.
And so basically we want to compare daily to monthly.
So we're going to need to aggregate our production data into monthly data, which is not the end
of the world here.
So here we've already set our index.
So we can just create a monthly average, right?
Because how do you want to aggregate?
So there's two ways predominantly that we'll be using in this demonstration, we'll use
two ways to aggregate.
You can aggregate by averaging.
So what's the average during the month?
So here we'll do that with total employees, which is the average number of employees during
a given month.
You could also do some, which we'll be doing later with sales.
And then that would just be what's the total during a given month.
So it's the total sales during a given month.
Here we're looking at averages.
So for example, we can now look at, okay, what's the monthly average number of employees
in the Canvas industry in Massachusetts?
And we can see our monthly averages here.
Real quick, this is a cool little, oops, the cool little note here is if you actually look
at these two plots together, you'll notice that our monthly average is essentially, you
know, it's not quite because it changes month, right?
The different months have different number of days, but it's roughly a 30 day moving
average.
So that's what you see with the moving averages, the moving average tends to smooth out the
daily series.
So anyways, quick little aside that I thought was interesting.
So anyways, we have the monthly average here.
So now we can actually compare that to the total employees.
Oh yes, and that's right.
I was explaining that.
Oh, if we look at our monthly data here, the way I tend to conceptualize things is to timestamp
them at the end of the month, right?
Because if you're talking about the average number of employees in October of 2018, for
me it conceptually makes a bit more sense to timestamp that as October 31st versus October
1st, but that's entirely a preference.
Well in this, for this analysis, it's entirely a preference, but it matters for the programming.
So long story short, I'm using this function here to basically just take our, so what we
have is, all I'm doing is taking our total Massachusetts employees and changing the timestamp
from the beginning of the month to the end of the month.
That way, you know, that way we have the same data, but it just timestamped at the end of
the month.
So that way we're comparing apples to apples.
We're saying, okay, we're comparing this month to this month.
It's real clear what we're doing here.
Furthermore, we want to compare the same units to units.
So changing thousands of people to number of people.
So can do that simple enough.
And then we can actually look at our employees here.
So we can say, here's our monthly number of employees.
I think we've already done this.
Exactly.
Then we can plot that with the total number of Massachusetts employees.
And okay, right off the bat, what's this?
Like is this like 3 million some employees in Massachusetts?
Exactly.
So you've got about 3.5 million total employees in Massachusetts.
So quite a large number.
Seems like too many, doesn't it?
Real quick, let's just grab the population of Massachusetts real quick.
So here I'm just grabbing the population of Massachusetts.
So what was the population here?
Total says 6.893 million as of 2019.
Okay, that's more reasonable then.
So you've got, well, we could do the math of the percentage of people actually working.
We may do that here in one second.
So let's just do it right now.
That's what we're all about.
The reason I was hesitant is we're going to have to
create the annual number of Massachusetts employees, which we just want to do an average.
If this works out well, we can do it.
Awesome.
So now we have the annual number of Massachusetts employees.
And then we can just divide that by the population.
Not quite.
Wait one second.
Let's look at these two data sets here.
We've got the number of employees.
We've got the population.
Oh yes, that's right.
It's just this sort of weird pandas thing going on here.
So there we are.
So roughly 50% of the population is working at any given time.
And keep in mind, this is different than the unemployment rate, because the population
includes children.
It includes retired people.
And children and retired people and people that aren't in the labor force, they're not
included when you're calculating unemployment.
So this is a different statistic here.
So I just wanted to do it more for a sanity check, right?
Because you can't have more people working than there are living in the state.
So I was more doing it for a sanity check.
So anyways, we've got the total number of employees as we saw.
Oh yes, I wanted to comment on this real quick.
So we've got the total number of employees here in Massachusetts.
And if you look at the cannabis industry, you'll see how they really demonstrate how
the cannabis industry proved to be, well, they were defined as an essential industry
during the pandemic.
And it definitely has an effect here on the employment here.
So you'll notice in August of 2020, or around that time frame, that you do see a slight
dip in employment.
However, it remains almost constant.
So it's almost like in the cannabis industry, there is essentially a hiring freeze, not
a lot of new hires, or at least any new hires were essentially offset by anyone leaving.
It looks like there were a handful of people that, for a better word, they quit being employees
during that time.
Maybe they lost their jobs, maybe they resigned, who knows, maybe they got fired or laid off.
What about homegrown?
Maybe they took up homegrown.
Seriously, it's happening.
People are moving for that reason.
Thank you.
Oh yes, and that may actually be what this crowd is.
So these people are already in the cannabis industry here.
Yes, people may be transitioning from banking or what have you.
Their everyday retail jobs do exactly that, to home grow perhaps.
We can only conjecture as to what the reasons are or what is underlying this data.
However, I think it's interesting to remark and to note that the cannabis industry was
quite resilient to job loss during the pandemic, which remember last week we were talking about
how regulations often affect the structure and performance and outcomes of various industries.
And so simply just saying, okay, this industry is essential.
Well that likely has an impact here.
And so, you know, does that explain everything?
No, like there's always a multitude of factors here.
So I don't know, I just, so this is something that's been observed, not just by me, a lot
of people have observed this, that, you know, the cannabis industry was resilient during
the pandemic.
And the data shows that here in Massachusetts where the employment levels pretty much, they
stayed constant during that time, but there wasn't a dramatic drop.
And then, you know, basically what we see here is the trend looks like the trend resumes
to about what the trend was, but perhaps maybe a little more volatility here.
However, the overall rate, there is, it looks like there was an entire shift in the curve.
So it looks like, okay, there was the shock, the adjustment, steady state growth is now
back on track, but there was a whole shift down in employment.
Whereas the cannabis industry, there was the shock, not much of a shock, at least to employment,
and then resumes to steady state growth with, you know, just a slight, slight shift in the
labor curve.
So I think there's more insights that can be taken away here, but we're just going to
kind of keep moving along here because there's a lot of ground to cover.
So just to look at another statistic here.
Oh yes, we were just going to start to gauge, okay, cannabis industry is resilient.
Is it meaningful, right?
What percent of the economy is this?
Is it a noteworthy segment of the economy, right?
Because like I said, if you talk to people in the cannabis industry, they'll make you
believe that, you know, the cannabis industry is propping up the entire economy.
Let's see how true that is, or at least try to quantify.
So I think this is interesting data here.
So here you have just the cannabis employees as a percent of all employees.
And so obviously they were 0% to begin with.
And keep in mind, and so this is where we're going to start talking about the economic
impact of permitting cannabis, right?
Because was it actually zero?
So what we've talked about this in the past, whenever you run up to a zero bound, well,
that may mean you're not capturing things on the other side of the bound.
And what's on the other side of the bound here is you may have people that are working
in illegal cannabis markets, right?
So people doing illegal grows, people doing illegal processing, people doing illegal retail.
And that's not going to be captured.
That's not measured economic activity.
That's typically not tax economic activity.
And it has own debatable social costs, right?
So this is debatable, right?
Because you don't want to be tossing good people in jail for doing some activity that's
now legal today, right?
And so that's why there's these no...
I want to give a shout out to them, but I don't know their specific names, but there's...
I'll have to put some links in the chat or something, but there's movements out there
to try to help people that were in prison for cannabis crimes that were nonviolent,
but today would be perfectly permissible.
But that's not to under shadow that whenever things are illegal, it does attract kind of
shady people sometimes.
So not saying that everybody's bad, but unfortunately when things are illegal, right?
That's when you kind of run into the organized crime and some bad actors.
So maybe some decent people get lumped in with some bad characters.
So long story short, if things can be permitted, then...
And this is where you kind of get into the judgment calls, but in my opinion, if things
are permitted, then you can at least put them out under the light.
You can let things operate, at least they can get measured and regulated and operate
under this regulation series.
But long story short, that's a little bit of a spiel there.
Didn't mean to make any opinionated statements because we're focused here on the data.
So anyways, back to the data.
We've got about a quarter of a percent of people today working in the cannabis industry
in Massachusetts.
So I think this is a non-negligible portion.
It seems small, but I think this is larger than you would think.
So I think it would be interesting to compare to other professions.
So if we had more time, I would get the data on how many teachers are there in Massachusetts,
how many...
I think people have done this, how many fast food workers are there.
And so you can kind of compare how many fast food workers to how many people working in
cannabis to kind of get some perspective, tell a story.
So that would be beneficial.
We're time strapped today, limited on time, so we're just going to keep moving.
But I think it's worth pointing out that a couple of things are quick.
It's increasing.
It increased faster during this recession here in 2020.
And the reason I say recession is because the Federal Reserve has flagged this period
as a recession, these gray bars are here.
So the Federal Reserve has designated this quarter in 2020 as a recession, I believe.
If I'm wrong, please let me know.
But anyways, we've got the total number of employees here.
Here, one second.
We may have somebody joining us real quick.
So welcome, Hentoko.
We've got about 15 minutes here to finish up some interesting analysis.
So you're just in time for some good takeaways.
And then I'd be happy to talk with you some more.
So long story short, we're looking here at the GDP in Massachusetts, and we're comparing
that to, okay, what's the economic output here in the cannabis industry?
We just saw that about a quarter of a percent of people here work in the cannabis industry.
And that may be understated because as Heather pointed out, the total number of employees
here may be understated.
When that's thing, well, you can kind of correlate these two, may as well just create this statistic.
They're negatively correlated.
So it's hard to interpret this, but basically, as the total employment in Massachusetts decreases,
you actually have employment increasing in the cannabis industry, which is an interesting
observation.
So anyways, to GDP real quick.
So in this last 15 minutes, we can do some pretty incredible stuff here.
So we can measure GDP.
So what is GDP?
Well, that's the whole economic output in an economy.
In this case, we're talking about the cannabis sector, and we can simply proxy the whole
economic output as consumption.
So we can actually measure cannabis consumption.
Keep in mind, I'm simplifying this here.
There are some good resources that discuss, okay, what is GDP?
Let's see.
Right.
So in general, right, it's consumption, investment, government expenditures, and then exports.
So but right, we're just going to proxy things as consumption.
And this is the way you see things done in macroeconomics a lot.
We can abstract away the government spending and the investment, and there's not going
to be any net exports.
So we can abstract those away for the time being and just say, okay, GDP is going to
be consumption, which is going to be sales.
Here I am calculating sales.
I noticed that sales total is actually a cumulative total.
That's not what daily data should look like.
So we can actually take the difference here to calculate our daily data.
And so now if you just plot sales, there is this one outlier, which I'm quite worried
about.
And so I think we should come and revisit what happened on this day.
This could be a miscoding measurement error.
So this is a problem.
In fact, I'd probably exclude this one day, but to the time being, it doesn't overly affect
our analysis here.
But I think it should be pointed out and it needs to be investigated further.
And our analysis probably needs to be redone with this one observation excluded because
it's atypical.
So for example, if we just look at the last 100 observations here, you'll see, okay, this
is more typical for what daily data looks like, where we have fluctuations, right?
Fridays may be busier than Mondays or Tuesdays or what have you.
Which is a whole other interesting analysis of its own, right?
I'm a big fan of looking at the days of the week.
So exactly like I just said, how do sales on Friday compare to Monday or Tuesday?
In fact, we could probably do that next week.
We'll probably do that in not that much time.
But like we said, we're strapped on time here.
So we're going to try to stay focused and save some of these cool analyses for the future.
We've got sales here, daily data.
So we can aggregate this into monthly and quarterly data, which we'll do.
We've already gotten our total employees.
We've already gotten the population.
It's now time to define GDP here.
So we're going to define GDP.
And here I'm going to put everything into millions of dollars because we're actually
going to be comparing this to the GDP of Massachusetts to put things into perspective.
And the GDP of Massachusetts measured by the Federal Reserve is measured in millions of
dollars.
So we're going to put our units in millions of dollars just for convenience sake.
Then we are going to get the GDP from Federal Reserve and make sure everything's time stamped
at the end of the quarter and not the beginning of the quarter.
And so without further ado, what do these series look like?
Well, here is quarterly cannabis GDP or quarterly cannabis sales, interchangeable in our case.
So sales may be a bit more familiar to those people.
And here is GDP in Massachusetts during a slightly shorter timeframe here.
And in fact, to compare apples to apples, I'm actually going to plot just quarterly
cannabis through quarter one of 2021 because that's all we have, data for Massachusetts
GDP.
Okay, now we're comparing apples to apples here.
And what we notice is, I think this is interesting.
So remember earlier we saw employment was almost impervious to the shock of April of
2020.
Sales were actually hit here.
And so this is contrary to I think perhaps what we saw in other places or maybe just
the general perspective that sales increased during this time.
And so there's a couple things going on here.
One, we may have just entirely messed up our measurement.
That's one.
It's not impossible.
And you have an interesting effect here in economics where people will shift their purchases.
So just because you see a spike in purchases, just say everybody rushes to the store and
they buy a bunch of cannabis at this one specific time and you see a large spike, that doesn't
necessarily mean their overall consumption is going to increase.
So they may just change the time at which they make their purchase and then consume
the same amount.
So they may have purchased a lot at a given time.
So there may have been a spike in sales during this time.
So instead of just conjecturing, we can actually look.
This is going to cover the right timeframe here.
So let's see if we can't actually look at sales during this time period.
Sorry I could probably pinpoint this a little better, but just sort of ad hoc trying to
find this.
Okay this is not good.
We may even have measurement error here.
Okay so this is not good.
So we just zoomed in on this pandemic period here and would you look at this.
We don't have any sales data for this period here.
So that would actually explain our big decrease here.
So I think we may need to do a deeper dive here.
So I need you to look and see, okay did Massachusetts maybe suspend reporting during this period?
Maybe they said okay you know we don't have to report sales during this period.
There could be a lot of things going on.
So this is sort of what data science is all about here right.
We just had a monkey wrench thrown in.
Welcome back Kandoko.
I'm going to be wrapping up my spiel here then momentarily.
That way we can get through a little discussion here because this is a pretty glaring monkey
wrench that we're going to have to address for next week.
I'll still show you how the analysis can be done but this is what kind of Heather was
talking about where unfortunately if you put the data under your microscope you're going
to find some glaring oddities sometimes.
So that need to be explained and this is one of them.
So we just put the data under your microscope.
We're basically just missing data here for the most important period.
We're one of the more important periods here.
So let's see if we just I just want to see real quick if okay yep so it's the data set
themselves so maybe I'll do a deeper dive and try to figure out and explain for next
week why this is missing.
But basically we just put the data under a microscope and we found out that we're missing
data for this critical time period here and that's probably going to have an effect on
our analysis right because here we are trying to make these statements about what's going
on here in quarter two and we've got measurement errors.
So that's a big problem and so that makes us wonder like are there measurement errors
going on here that explain this dip.
So we've got problems but that's life as a data scientist but just to show you the last
little bit of analysis here because despite having measurement errors we can still calculate
the statistics because I think they're still worthwhile to look at right.
We'd rather calculate the statistics than not.
And it rated the stage we've not.
So let's calculate them real quick.
So let's grab Massachusetts GDP maybe we've already done that but let's grab it again.
We've plotted them we can calculate the correlation between the two.
They were positively correlated but not perfectly correlated.
So a lot of times you'll see much stronger correlation with sectors and GDP.
So I'd say this is a weak correlation not I mean an actual weak correlation you know
point one point two.
So this is still statistically a strong correlation but not like a I would not say this is a strong
like economic correlation which is an interesting real real real interesting observation.
But we're going to be cursory with it.
We're going to say okay we're quantifying it here and sorry that I'm rushing through
this we can expand on everything next week.
But we'll say okay what's cannabis is a percent of GDP.
Well my takeaway is Massachusetts has a quite booming robust economy here.
So yes cannabis is this amazing interesting sector but if you look at the data they may
it may just be I want to say almost like a drop in the bucket of the whole economy of
Massachusetts here.
But like I said it's not negligible.
You've got 0.04 percent of the entire economy.
So it's not nothing.
It's not everything by all means.
So you know it is what it is but it's not it's not the it's not the end all be all.
But let's put this into dollars so we can say okay what's the annual GDP here.
And we can visualize that.
Okay so like we said it's not nothing.
So here's just the annual cannabis sales or cannabis GDP in Massachusetts.
So like we said it's almost nothing.
But look at this it's almost one billion dollars in 2021.
And the year is not even over yet.
We've still got like a whole quarter left.
So Massachusetts is doing well for themselves.
Like we said Massachusetts is a big economy here.
So this is great.
Like look at look at the size of their economy here.
This is quarterly six hundred thousand million dollars.
So they've got a big economy here.
But you know a billion dollars is not nothing.
So like you said you need to weigh that against the social costs.
But I mean if you're going to increase GDP of a state by one billion dollars that's not
bad in my book.
But that's an opinion.
And so then okay what's the annual percent of GDP here?
Well as we noted you know it's not the biggest segment of the economy.
But look at this you know.
The cannabis GDP is about 0.16 percent of all of GDP.
But I mean when you're talking about like a boost to GDP right.
People are out there like the nation shooting like for like you know like a 2 percent or
so.
More than that's awesome right.
So you know when you're talking about just trying to squeak up GDP I mean you're squeaking
up GDP you know 0.16 of a percent that's not nothing.
And like to put that into dollar terms well I thought this was an interesting statistic
here.
Well we've got the population of Massachusetts.
We've calculated GDP which is used to say okay that's the it's used to kind of proxy
you know the standard of living sometimes.
And so we can say okay well how much better off is a person in Massachusetts for having
the cannabis industry in economic terms.
Social terms that's a whole nother can of worms that will maybe be for somebody.
So but we can look at the economic side.
Okay so what's the GDP per capita?
Well in 2018 that was just about two dollars so negligible.
Already by 2019 per capita that's around sixty five dollars.
So per person that's man woman and child and the retired elderly everybody sixty five dollars.
And then by 2021 almost one hundred and forty dollars.
So that's every person in Massachusetts is about one hundred and forty dollars better
off per year because of the cannabis industry just just passively.
Right just you know they're you know just the economy is better right.
It's just a bigger economy right there's more tax revenue there's just more economic activity
and they're just they're just better off.
So just having the cannabis industry permitted right you don't even have to partake in the
industry.
So great so just for some people that actually partake that's you know beneficial for them.
But even for the people that don't partake.
I mean let's say you can think about it as a check in the mail once a year for one hundred
and forty bucks and that's just now.
And so it's going to be increasing right.
So you know next year maybe it'll be two hundred bucks and just more and more and more maybe
you know for perpetuity.
So you hear we've done a thing about this this is with measurement error.
This is excluding months worth of data.
So this this number may even be biased downwards.
So I think that's sort of my takeaway for today is by permitting the cannabis industry
in Maryland in Massachusetts.
There has been an economic benefit that I think is quantifiable because it has increased
from what I can tell it appears to have increased GDP by a small amount but I would say non
negligible amount to the portion where no every person in Massachusetts is you know
at least you know on average about you know one hundred and forty or maybe one hundred
maybe we can say there may be estimated estimation errors but maybe between one hundred and two
hundred dollars per year better off than they were without the cannabis industry.
And I mean that's not nothing in my book you know if I'd rather I'd personally rather have
a check in the mail once a year for two hundred bucks than not.
So that's awesome.
And so I think this is my takeaway that you that other states could take to the bank is
okay yes you know you're just looking at maybe the social aspect of this or maybe the health
aspect where maybe some people are being like we talked about earlier they're forced into
the gray illegal economy and that's maybe not so good at a social level or maybe at
a medicinal level people can't get medicine they need or this or that.
So those are different considerations but we look at that we're looking at the economics
here and from an economic perspective you know the appears to be you know the benefit
here and so you know I think it's a consideration that people should should take into consideration
that you know if if you permit cannabis with regulations like they have in Massachusetts
right it's not like they're they're just you know out there just letting anyone do anything
they want there are rules and regulations in Massachusetts and so you know given a permitted
market there's an economic benefit and so I think that ends sort of the point I wanted
to to make today because that that was just sort of what my you know my thinking and sort
of research and studies has sort of led to I think is I think that's that's the main
takeaway is what is the economic impact of permitting these cannabis markets is it big
is it negligible and can we quantify that and I think at least in Massachusetts we made
a rough attempt at doing just that.
So any thoughts questions comments?
Well on that note it was awesome to have you Heather and then Hendo Ko if you're interested
at all I'm curious to hear about you know what perspective you're coming at the group
from because we're happy to have you.
The R programming language okay so we have people in the group that use R so I'll have
to get you in touch with one of our regulars Paul well I don't think there's a meme that
Paul that that R is is almost this poor neglected you know the poor neglected cat and then everybody's
focused on on Python the the cute the cute dog in the corner so I don't think R should
be should be neglected or forgotten about so I'll get you in touch with Paul because
like I said oh well I'll put a link here in the chat so you can join the group here meetup.com
word slash cannabis data science I believe.
Yes here we are here you can find the group put this in the chat yeah and I'll get you
in touch with Paul he uses R and all of this analysis can be done in your favorite programming
language because we're just using API's and calculating basic statistics here right so
we're just reading the data from the API calculating some means some totals some some min some
maxes what have you nothing nothing too fancy and what I think making some groundbreaking
discoveries and that's what we do that's what we do here the cannabis data science group
right we get real public we get real cannabis data we get it into a format that's usable
we poke and prod at it and find all its flaws point those out because as Heather pointed
out that's critical we analyze it talk about it have fun so that's what we're about so
glad that you joined ah in Mexico well we're incredibly happy to have you because we're
trying to you know spread the word about cannabis data science all around the world so the more
the merrier so please share the word and invite your friends family colleagues co-workers
you know share the group and you know everybody's welcome and doesn't matter your background
you know we got a little technical today we got a little programming heavy but whatever
you may be you know data science academics production processing retail whether you're
at the lab anybody touching cannabis data you're welcome join the group and let's have
some fun crunching some numbers so glad to have you all and without further ado I'm going
to go ahead and wrap it up here today so thank you for coming and then next week we'll dive
back into the data we'll look at all the flaws we'll try to redo the analysis just to make
sure it's nice and crispy maybe make some crispy charts and there's a lot more we can
get to right there's a whole slew of data points ahead of us so tune in next week because
we will be on another adventure so until then keep your nose to the grindstone