Welcome to the Cannabis Data Science Meetup Group.
Happy to have you all here.
So just a big group of like-minded individuals,
just from all walks of life,
with all different interests in the cannabis industry and data science.
So see a couple of new faces today.
So just a quick round of introductions.
I'll start and then we can start in my top left.
Essentially, my name is Keegan Skeet.
I got into the cannabis industry as a laboratory analyst,
and then started developing software and realized I could help
many people in the industry just with data and crunching numbers at the lab.
So started Cannlytics to do exactly that.
So we've been providing software solutions to laboratories across the country,
and now we're branching into data science,
because that's what my background is in, in particular economics.
So I would love to hear about what you all do and what you like to get out of the group,
and what your interests may be.
So Nina, would you mind introducing yourself real quick?
Hi Keegan, nice to meet you.
I've been trying to catch this class for about two to three weeks now.
I could never quite get it at 1130.
But I'm here and I'm ready to learn.
Right now, I am learning data science as far as programming and R coding.
I graduated from college,
so I want to get into data analysis as a career. Yeah.
Awesome. You're in the right place.
I always tell people there's a shortage of data scientists.
So there are people that are in need of your talents.
So just have to connect the dots.
So happy to have you aboard.
John, would you mind introducing yourself real quick?
Hello all. I'm really here just to observe.
I'm new to the industry.
I'm new to trying out coding.
I've always been interested in data,
and I happen to see that I'm new to Meetup.
So I'm overall new to everything and I just happen to see it.
I had the hour free, so I thought I'd join in.
Welcome aboard, John.
We do focus on the cannabis industry just to give the group direction.
However, a lot of these skills can be applied elsewhere.
So a lot of this is just data wrangling and statistics,
and a little bit of economic theory splashed in.
We talked about the cannabis industry.
So you can, I'm sure, apply these skills in many aspects of life.
Sure. I'm interested in the cannabis industry.
So I'm interested to see where this data is coming from and what's going on in general.
Exactly. Then, Heather,
you don't have to chime up if you don't want to.
I know you're going through a bit of recovery right now.
So Heather's got experience at the lab and has been a classic cannabis data science,
meetup member for a long time now.
So you're free to chime in.
I have a question.
Yeah, by all means.
I have a question.
With our data over the past couple of weeks,
do dark stores make it to the data?
I know that, or at least in my area,
some stores have not made it to the public essentially.
They're just operating from the curbside because
the employees just have gotten hit with COVID.
So it's like, they're dark stores anyway.
So it's like, what's the purpose?
I mean, me, I can't bear the lights in the dispensary.
So when they see me, they think I have COVID and I don't.
I'm like, I can't bear their orbs of light.
So I don't mean I just need my cannabis.
I know what it looks like anyway,
as long as it doesn't have,
it's the product that I know is what I need.
So it's like, I'm just curious if the stores themselves are,
when you say the stores and the dispensaries,
these are not dark stores included?
As far as dark stores, I think we're just measuring
the ones that are officially on the books with,
so we've been looking at sales in different states.
And so, exactly.
So we're just looking at stores that are on the books
and reporting all their revenue.
So, I mean, I myself lived in California for a little bit.
So I think things have shaping up a bit there.
But when I was there,
I kind of know what you're talking about.
There are definitely some that are clearly licensed
and then there are some that you're lesser
and if they are licensed.
Is that what you're talking about?
So like, oh, no, no, no, no, no, no.
Like they don't have a retail presence,
like a store that you can step into.
So anybody that reports sales
is gonna contribute to your data.
Heather, are you talking about like street dealers?
I don't think there are. No.
No, so there are dispensaries that allow the customer
to step into the store.
And then there are dispensaries that don't.
And I don't believe that we have these in Maryland.
But like if you listen to, I guess, cannabis podcasts
or whatever, there are people
that have these cannabis dark stores
where they don't wanna bother with the retail aspect
of the customer stepping into the store,
having to deal with, you know, speaking to a bud tender,
which is fine.
That's a whole education aspect
that they're missing out on, fine.
But it's just, they just wanna sell out online,
pick up from the little store somewhere else.
Or maybe they even just ship it.
And then you're just done with it.
Don't bother dealing with a grocery store or a restaurant,
like, you know, how restaurants,
they have their own dark stores, the same principle.
Interesting.
I'm going to have to do more research.
I think this may be something that's unique to,
well, I guess maybe you said present in multiple states,
but I don't know the least about this.
West Coast, Midwest and West, not here.
Meaning I'm saying here, not East Coast.
I don't think so, not East Coast.
I don't think.
Graham, do you have any light to shed on this?
Yeah, but East Coast markets are much more structured.
And that's what we've primarily been looking at
is particularly structured markets.
Probably one of the only West Coast markets
that we've looked at is Washington.
But there are some like Southwestern states
where it's kind of like the Wild West.
It's what we talked about before,
how in Oklahoma, the quality of the product just went down.
And I think that's what she's talking about
when it's all screwed up around there.
Politics has taken up everything.
But if I had to guess an answer to Heather's question,
we are not taking into account these dark stores
because they are dark for a reason.
They aren't reporting their data
because they'll probably get fined for not being legal.
Yes.
In some aspects, right?
Like, I just curious, I don't know.
I just kind of brought this term in there.
I don't know.
I was just wondering.
Yes, well, you bring up a good point because I,
like I said, I observed a similar thing in California
when I was there back in 2016 or so.
So, what I was just going to say is there's a lot of variation
and potential measurement error from state to state.
So I would just kind of chalk that up as measurement error,
which is a big deal and can introduce bias
into your results.
So long story short is we just need to just do more
research on all these states.
And that's why it's so beneficial for you to,
let us know how things are operating in state Maryland,
because you're like boots on the ground there.
So, you can report firsthand.
So that would exactly fall in,
like Graham said, as in structure and performance.
So how are these retailers structured
and how are they doing their work?
How are these retailers structured and how are they,
well, actually that's conduct.
How are they conducting themselves?
So critical aspects that aren't captured by the data.
So if we're just looking at the data alone,
then we may mislead ourselves.
So definitely a factor.
I also like to say that you stumbled upon
exactly what we'll be talking about today,
which is quality in particular,
West Coast versus East Coast.
So we'll let Graham and Alice introduce themselves
and then we can dive into that.
So it'll be exciting.
So Graham, do you have a quick introduction
that you would like to give yourself to the group?
Yep. Hey guys, I'm Graham.
I live in Maryland as well.
And I've been a cannabis user for over a decade,
but in particular, I've realized it's medical properties
ever since I've been diagnosed
with a recessive genetic disorder
that causes a lot of side effects and has no cure.
So cannabis is really the only way I can medicate for myself.
So I have a lot of passion in that
that's come about the past three years.
And I am trained.
I have a master's in applied mathematics
and I was a junior data scientist working in aerospace.
I worked particularly in satellite imaging.
So I know we can see your faces from space.
Yes.
Graham is sharp.
So Graham keeps me on my toes and make sure
that I'm doing things right.
So if all of you want to come
to the Saturday morning statistics,
we'll be in for a good treat this coming Saturday.
We'll relook at our forecast for 2022 and do them correctly
as Graham noted that there's ways
that we can improve our forecasts and not make rookie errors.
So love having you aboard, Graham.
You keep us sharp and you give us a real life story
as to some of the value that can be had from cannabis.
So thank you.
Alice, happy to have you today, Alice.
Would you mind introducing yourself if you want to the group?
Oh yeah.
Hi everyone.
I'm Alice.
I'm currently in New York
and I'm pretty new to the cannabis and analytics.
I'm currently pursuing my master degree
in analytics here in New York.
Nice to meet you all.
Hope to see you more.
Awesome.
Awesome to have you, Alice.
You'll have to keep us informed
as New York rolls out their program.
We'll be talking about one of your neighbors,
Connecticut today.
All right.
So without further ado,
I'll go ahead and share my screen
and just sort of guide the talk for today.
So normally the way it goes is I just kind of drone
on and on and on.
And so I don't mean to do that.
So feel free to just chime in at any point
with questions or thoughts or comments.
And basically I'll present a little bit of recent work
that I've done probably for about 30 minutes
and then we can save 15 minutes at the end to talk about it.
So, well, it's been a good year
at the Cannabis Data Science Meetup Group.
This will be the last meetup for the year, 2021.
And so since we're sort of spearheading the movement
in data science, I thought it'd be worthwhile
to outline some principles that we've covered
and are utilizing.
And we can start to formalize principles
for other data scientists that follow in our footsteps.
And these aren't golden.
This is just a starting point.
So if you have principles to add,
ways to improve these principles,
or you think any of these need to be crossed out,
then feel free to mention this.
But basically, you see schools, universities
creating data science programs.
And well, it would be helpful to ask,
what is data science and what are some of the principles?
And so I think of data science
as sort of a merging of a few fields.
Of course, computer science,
maybe sprinkle in a bit of economics and business.
Of course, you have data visualization and statistics.
So I pulled some principles from some of these fields.
And we've used these,
and I'll show you how we use them today.
So right off the bat,
the top three rules of programming,
reuse, reuse, reuse.
So once you've write code,
it's a very, very low marginal cost
to copy and paste that code somewhere else.
So as you've seen throughout the year,
we've used various snippets of code
over and over and over again.
And that's the beauty of computer science.
And so I encourage all of you to pull out any snippets
that you find useful and reuse, reuse,
and reuse them as much as you please.
And that brings us nicely to another principle, refactor.
So that just means essentially clean up your code
and tidy it up, make it more readable, more maintainable.
So this is something that you can always be doing.
So you can look at the code
that we've written throughout the year,
and almost all of it needs a good refactor.
And as you're refactoring it, you can build upon it,
then you can iterate.
So iteration can mean a lot of things
that can mean applying something multiple times
or using a piece of software over and over and over again.
So for example, we're sort of iterating
with our forecasting software.
So maybe didn't do the best job at this principle,
but refactoring is critical.
So I wanted to include it.
I guess from my perspective with iterate,
you never run code just once.
You have to run it over and over to get it better.
Exactly.
And that's one of the reasons why I love Python
is it's so quick from right time to run time.
Depends on how you define quick,
but for me it's simple to write Python code
and then get it running and then find your errors,
fix your errors and run it again.
So thank you for that, Graham.
Countless principles from economics that could be used.
However, economics I've heard is basically
the study of choices.
And we've seen over and over again
that the choices that we make matter.
So that could be anything from what we choose to look at,
how we choose to look at it,
or even how people in the industry make choices.
So I thought that was a good way to sum up economics
into a small little nugget.
There was a principle that an entrepreneur taught me
that kind of goes back to principle one, reuse,
which is take stock of what you already have.
So this applies it nicely to reuse.
And you'll see today that it's just,
take stock of this repository that we've created
at the Cannabis Data Science Group.
And figure out which pieces that you can reuse.
So once again, just sort of starting the starting point.
So this principle could almost be condensed
into principle one.
And then finally, one of the most important principles
that I learned from Edward Tuft,
who published his book on data visualization,
I think in 1983.
So he's been at it for a long time now.
And I'm sure if you've been coming to the group for a while,
you've heard me promote his work.
But for those of you who are new,
I'd highly recommend checking out Edward Tuft.
His books had been a great influence on my work.
And so I would sum up all of his brilliant contributions
as show the data visualization,
show the data.
So first and foremost, you've got all this data,
you need to show it for a couple of reasons.
One, to analyze it.
Two, to inform other people.
Three, whether you like it or not, to persuade other people.
So a good visualization,
it goes a long way into helping explain a concept.
So these are the main principles I've laid out.
And then I'll return to the presentation here in a bit.
But without further ado,
let's go ahead and get to the data here.
So gonna use a couple of different data sources here.
So you can hunt down this data
that was produced by a Freedom of Information Act request
by Cannabis Observer.
So they do diligent work in Washington State.
And so Washington State has a very generous
freedom of information.
And so you can actually get the entire
database of traceability data.
So be warned, some of these are quite large.
So for example, just the inventory's data,
if you unzip it, that's 30 gigabytes of data.
So there's almost 40 gigabytes unzipped
so we're looking at a large scale data here.
And so this is probably,
maybe not, I would call this big data.
People that work at large retailers,
they deal with much larger data sets,
but this is a large enough data set
to be able to do a large scale analysis
of a large enough data set that it's tough to wrangle.
We've been so focused on sales
that we can come back to sales later.
So today, when we looked at this earlier in the year,
so apologize if this is a bit of a review for some of us,
but this is where we go back to reuse,
reuse, refactor, build upon, iterate.
So we'll be looking at lab results.
Where did this come about?
Well, I opened up the cannabis data science repository
and I just did a search for cannabinoids.
And I started to see all of the times
that we've talked about cannabinoids this year.
So, we started off the year in February
talking about these data points.
We've touched on them here and there.
And so I thought it would be fitting
that we end the year talking about these lab results.
And long story short, I've copied some of this code
and I realized, oh, you know, we also talked about
cannabinoids when we were researching Connecticut.
So I thought today, why don't we look at
both Washington and Connecticut?
So these are the two states that I know of
that we can get cannabinoid data from.
And so I thought, why not let's analyze them
and compare them because we basically have
one West Coast state, Washington,
and then an East Coast state, Connecticut.
So we could start to see, you know,
if there's a difference between
East Coast and West Coast cannabis.
So kind of what we were talking about earlier,
but you know, I thought it would be fun.
So right off the bat, we're reusing,
we're refactoring, we're building upon,
and we're iterating.
And then we've also taken stock of what we already have.
So now I'll tell you at the end how our choices matter,
but for now, let's show the data.
So first things first, I needed to,
or we needed to read in the data.
And so this doesn't take very long,
maybe 30 seconds to a minute,
but I've already read in the data just for,
for time sake here, you know,
just to save us a minute or so.
So let's go ahead and do that.
You know, just to save us a minute or so.
Well, I probably shouldn't have just, okay.
Maybe I can keyboard interrupt.
Okay, the long story short,
we have many observations here just from Washington.
So just these lab results
are almost two million observations.
So we're starting to get into the big data realm.
Once you get into around, you know,
the millions of observations,
you're in, you're in big data world.
So awesome, we're there.
Added a time column.
So let's see if we can't,
so let's see if we can't,
I realized that some of these operations
may take a long time since we have,
you know, two million observations.
Computers are brilliantly smart
doing these number crunches.
So long story short, we've got data ranging from
the beginning of 2018 through November.
So we don't have quite the full year of 2021.
We'll do, I'm sure the Canvas Observer
will get us a complete data set here before too long.
But for now, we've got a lot of data to work with.
So just for today,
we're just going to be looking at cannabinoid data
and I figured, well,
we could start just looking at differences
from year to year.
So here, I just separated the data into 2020 and 2021.
And this is one of my favorite things to do with data
is find conditional, say averages,
or conditional statistics.
So I'm going to go ahead and do that.
So we're going to find data averages
or conditional statistics.
And so this is exactly what we're doing here.
We're basically going to find data conditional
on the year 2020 or 2021.
And then we're also going to add another condition,
whether the data is flower data
or whether the data is a concentrate.
And I have added a link to the data guide
so that way you can see
where I'm pulling all of these fields from.
So long story short,
software is always the most boring part.
So I'll let you just kind of pick through this code
when you have a chance
and we'll get onto the fun part, looking at the data.
So first things first,
one of the principal compounds people are interested in
is THCA.
So this is essentially the intoxicating compound
found in cannabis.
And so here I just plotted the distribution of THCA
in all cannabis products in Washington state.
I realize now that I actually like this setting.
So when I think of a histogram,
I think of it in terms of density.
So let me just add this parameter real quick.
Okay.
So basically before we were plotting
in terms of frequency on the Y axis,
but I kind of typically think of a histogram
as having density.
So the proportion of samples that have a given X value
on the Y axis.
So,
I love histograms.
So as you can see, they're fairly overlapping.
There are tests, statistical tests that you can do
to tell if, or estimate if, you know,
these distributions are different.
I won't get into that today,
but if you're interested,
that's a good topic for Saturday morning statistics.
So we've got THCA
or,
what was this next plot?
Ah, yes.
So now instead of just looking at the data,
I'm going to look at the data.
Yes, so now instead of just looking at cannabis,
just all varieties, we'll just look at flower.
So flower in Washington state, as you can see,
has a distribution between, you know,
around, I can't see if this is like 10 or 15%,
do around 30, 35% or so.
So this is the distribution of THCA
that you observe in Washington.
And you actually don't really see that much of a difference
from 2020 to 2021.
So,
you can draw what inferences you want from this.
The one inference that I'm kind of thinking is
maybe, you know, growers in Washington state
have kind of perfected their craft.
So they maybe have figured out how to grow cannabis
and, oh, Graham, question.
Yeah, can you go back to that plot?
Because like the mathematician in me is kind of
just seeing on that graph exactly what you're saying
in comparison with the blue and the pink.
Pink is the later years.
The spike is much sharper.
The silhouette width of that Gaussian distribution
is just ever so thinner.
And you can only see it with the higher spikes in orange
in like the top four bars.
But you can also, if you zoom in, I'm assuming,
there's bottom areas in like the 10 and 20 and all that stuff.
That's primarily blue.
And I guess it's just basically saying,
you're right, I think they're getting better at their craft,
but not significantly.
Exactly.
And like I said, Graham keeps it sharp.
So, exactly.
And so there is a difference between these distributions.
So the blue one is, as Graham said,
it doesn't have quite the same normal distribution as 2021 does.
It has a bit sharper of a...
It's got lower variance, essentially.
Well, I'll have to think about this,
but you do raise an interesting point that the average...
Actually, I guess we could technically calculate the averages real quick.
So let's actually do that because...
So in 2020, the mean was 22% and then in 2021...
So this is what's so interesting.
And we talked about this once in Saturday Morning Statistics is
just because the mean is the same doesn't necessarily mean
all the moments are the same.
And when I say moments, that could be variance,
kurtosis, and skew.
So there's multiple ways to characterize a distribution.
And so we could further look at this
and really kind of get nitpicky about how things have changed.
So I love the sharp eye, Graham.
So...
Good work.
What am I hearing?
Thank you.
So...
So that's definitely, you know, something to take note of.
So just to go ahead and look at some of these other distributions here,
let's actually crank up the bins.
So this is sort of the number of groupings.
So let's crank that up to 100 and look at...
Let's look at concentrates.
Or let's actually crank this back down.
So concentrates, I think, is interesting too,
where on first glance, the distributions look similar.
But to me, it looks like 2021 is slightly different.
So I think that's a good point.
Sure. But to me, it looks like 2021 is slightly...
may have a slightly higher mean.
So we can calculate that.
Well, some of them may have...
Well, 2021 may have sort of a heavy tail towards the left.
Yeah, use the median.
I wonder...
The tail on the left is due to CBD concentrates.
You may have to exclude the CBD concentrates in somehow.
But...
Well...
Just real quick, let's just look at...
this data...
where this is greater than 50%.
So this is sort of an ad hoc way to do this.
But you see, if we just look at concentrates at the top end of the distribution here,
above 50% THCA,
then 2021 has a slightly higher mean,
76.1 to 75.8.
Once again, you can do statistical tests to see if that is statistically different.
But...
basically, the inference I would take from this is it looks to me like the processors, the manufacturers,
creating THCA concentrates may be getting slightly better at it.
So they may be sort of refining their technique.
But once again, that's sort of a big inference to make.
From this little bit of data and visualizations that we've done.
Question?
Yeah, I just had one question.
Kind of, this is maybe like a shot in the dark here.
But when it comes to like molecules and stuff, like they have half-lives,
kind of like they kind of split down.
Is there any chance that we would see, whether in the future or previously in the past,
where they're a lot, not their half-lives, but the word I'm looking for.
You're looking for shelf life stability.
Yeah.
So that's a critical factor.
So this is something that, of course, the laboratories are taking into consideration,
but a lot of producers and manufacturers, they may not even know about this.
Or if they do, they may, it's tough to factor it in.
Long story short, there's been studies done on essentially the degradation of cannabinoids at various temperatures.
And so you actually do see degradation of cannabinoids at room temperature over time.
So I'll have to refer you to the papers.
But you know, if you keep cannabis at room temperature for months on end,
you will see diminishing in the cannabinoids.
If you keep the cannabis refrigerated or frozen,
you have substantially less degradation to the point where it's almost negligible.
So that's why laboratories really stress to keep samples refrigerated, if not frozen.
So if you're running a lab, that's a critical step.
For example, in Missouri, they have to hold the samples, I think, for 60 to 90 days in case you have to do a confirmation study.
If you're doing that, you want to keep the cannabis refrigerated.
So that way, when you measure it again, say in a couple of months from now, you'll still get the same measurement.
Long story short, as to your question, the data we're looking at doesn't really take this into consideration.
The values are assigned when the sample is tested.
And it like you said, that may not actually be the value when it is sold.
So say if something's tested and it's sold three months later,
if it's been sitting at room temperature, then you could likely assume that it's going to have slightly lower cannabinoids, maybe not even slightly.
So this is actually something that needs a lot more work.
So I think there's only been like, you know, cursory research done on this at laboratories and controlled settings.
I think you're brilliant because I think this is an avenue for really good research,
because this is something that essentially people are concerned about is it's a big concern to say,
to have products on the shelves that may be misleading.
And, you know, it's one thing for it to be intentional, but it could be entirely unintentional.
So if you just didn't know better and you were just keeping your products at room temperature, they may not be as potent as the label says.
Thank you.
So long answer, but awesome question. So important question.
So on to cannabinoids. Well, this is just the distribution of total cannabinoids in Washington flower.
And actually, sure enough, if you look at total cannabinoids here and let's look at density,
then once again, it looks like it 2021 has a little bit sharper distribution there.
More variants, it looks like in 2020.
Well, that plot, well, actually, the prior plot was misleading because we were looking at frequency.
If we look at density, the density is, you know, it's quite similar.
And once again, that's a subjective statement.
You can try to get a bit more objective with it with actually calculating statistics to tell the difference between these distributions.
I commented this section out just to kind of save time here.
But for the adventurous ones, try to uncomment this code because
we've all heard it. Well, a lot of us have heard of the Indica sativa dichotomy.
Well, at a cannabis conference I was at, they introduced a new classification system that is basically based on five types,
where you basically say, OK, is something high THC to CBD?
So that would be what you may think of as your typical sativas.
There's the near unitary, which is a balance between THC and CBD.
So that's sort of a whole new type of its own.
Then there's the high CBD to THC ratio, which is what you would typically think of as an Indica.
And then you have some that are high in CBG. And what's going on with those types?
And then there are some types that there's not really a distinct major cannabinoid.
What's going on there? So this is sort of an avenue for further research.
Just for brevity today, I'm just going to move past this.
But long story short, you can use THC and CBD to start to classify these cannabinoids.
So we did this once earlier this year, so I'll refer you to that day.
But today I thought it would be really interesting.
We were reusing various bits of code, so we've looked at cannabinoids in Washington.
On another day, we looked at cannabinoids in Connecticut.
And we've also talked about comparative analysis, how important it is to compare one state to another state.
So let's do just that.
So this bit of code is just where you read the data from the Socrata API, clean up the data a little bit.
So the data is in strings in text format with some values that you see frequently at a laboratory.
So when you're measuring cannabis in a laboratory setting, you can never...
And this goes just to the principles of science. You can't prove a negative.
So at no point can they say, oh, there's no, say, THC in a product.
They can just say, we didn't detect it. We didn't detect it.
Our measurements can detect everything down to 0.1% accurately.
So all we can say is it's less than 0.1%.
So long story short, I just code those as zero because in my mind, it's effectively zero,
even though technically it's non-detected.
So a little bit of science mixed in.
So long story short, clean up the Connecticut data.
And then we get some nice observations here from Connecticut.
So the Connecticut data is awesome because in addition to the cannabinoids, we also get terpenes.
So if you're interested in looking at terpenes,
Connecticut is the only state that I know of that has publicly available terpene data.
I am frequently mistaken, so maybe there's more terpene data out there to be had.
I think there's a lot of informative analysis and research and inferences that can be made from terpenes.
So I personally think terpenes may be a better way to classify cannabis than, say, the high THC ratio.
So if you're adventurous, then you can maybe try to see how these types shake out in Connecticut in terms of terpenes.
So, for example, does type 4 that's high in CBG, does that also have a particular terpene that is also frequently present?
So terpene shouldn't be neglected.
So, for example, I've heard that beta-karyophylline is actually considered quite a bit of an intoxicant.
And so when people get, say, sleepy or what have you from like an indica,
I've heard that's often actually the effect of beta-karyophylline.
And it seems there's a threshold to it. So beta-karyophylline is found in many, many, many strains.
But it seems that once you cross a threshold, then you get the intoxicant sedative effect.
So long story short, you may actually want to sort of be on the lookout for some of these terpenes
if you're consuming cannabis and how they may have an effect on you. So interesting point there.
But without further ado, back to the cannabinoids and enough of just looking at numbers here.
Let's look at the data. So this is just for fun, just a scatter plot of CBDA to THCA.
And then we're doing comparative analysis.
So here's the same plot with both Washington and Connecticut. So Washington sort of has a lot more observations.
So kind of kind of dominates the plot there. So I don't know. Sorry, got a little off track there.
The main thing we're looking at here is distributions. So this is sort of the hammer for the day.
So if we look at, say, the distribution of THCA in Washington to Connecticut.
So remember, we were just looking at distributions above in Washington.
And we see in Washington from year to year, there's quite the overlap.
When we look at, say, THCA in Washington to Connecticut, there's a big difference.
The distributions just visually look different.
And once again, we can do a statistical test to see if they are, in fact, different.
But the visualization is quite powerful.
I was just going to just look at the means here.
So in Washington, right, we've got the 22.5.
And then in Connecticut, we see actually 27 percent. OK, something's going on.
Let's just look at total cannabinoids here.
So once again, if you just look at all the cannabinoids,
there is still a different distribution that appears in Connecticut.
So one thinks, OK, this may be going on with all the cannabinoids, not necessarily just THCA.
Well, the choices you make matter.
And what I suspect and I don't know for certain here,
but the recent trend, I know this is the case in Massachusetts.
So I am suspecting it's the case in Connecticut. I need to confirm.
But the science community is coming to the conclusion or coming to the agreement
that for a more standardized measure, that scientists should measure cannabinoids
in a moisture corrected manner.
So, for example, cannabis has a moisture content, right?
So part of the flower is.
Graham, do you have a question?
No, I'm just water activity level. You're spot on.
It was what I was going to say. So I type.
A water activity level. Moisture content.
What was the hold on?
I think we want to use moisture content, but let me just.
Find out what the water activity measure is because there is one. Yeah, the water activity rate.
So the water activity rate is essentially how much like water vapor.
Once again, not a chemist here, so I could be butchering the interpretation of this.
But from my understanding, the water activity rate is sort of the vapor that a product gives off measured in this abstract unit.
Water activity rate, and that just ranges from zero to one, and it's not a percentage. It's just a rate.
And then the moisture content.
Is how much actual, you know, H2O is in a particular.
In a particular substance.
Let me try to.
Okay, there's a better distribution plot.
So that's sort of the distribution of moisture content in flour in Washington state.
And so, as you can see, you know, the mean.
Is around 7%.
And then I want to say.
Well, there may be some outliers, but essentially anything with the moisture content above 15% actually fails quality assurance testing.
Because that's sort of the.
The limit that people have suggested would encourage mold, right? We were talking about shelf life stability earlier of cannabinoids.
Well, this is actually sort of a concern, you know, in a lot of food industries, and it's sort of.
Was adopted by the cannabis industry in that, you know, you don't want, you know, flour sitting on the shelf to potentially mold over time.
You know, it's one thing for it to lose cannabinoids, but you definitely don't want it molding on the shelf.
And so in Washington state, they've said, OK, the moisture content percent needs to be less than 15%.
And the water activity rate needs to be less than 0.65.
So these are metrics that people have set for shelf life stability.
Long story short, flour has different moisture content.
And from states such as Oklahoma, and I know they're doing it in Massachusetts, and I suspect they're doing it in Connecticut, need to confirm.
You basically correct the.
Concentration of cannabinoids in respect to the moisture.
So you basically say, OK, if all of the moisture evaporated out and we're left with an entirely dry cannabis flour, what percentage of that dry flour is the cannabinoid?
And so this is going to be a higher percentage because.
If all the water is taken out. And you're just left with the exact same amount of THCA in the dry flour, it's going to make up a higher proportion of that flour.
So I suspect that may be why Connecticut had a higher distribution.
So here I calculate total cannabinoids with the moisture correction.
So I divide by one minus the moisture content.
Which will inflate the cannabinoids, but you know, just in in.
Attempt to standardize this right because we want to compare apples to apples.
So if they're correcting for moisture content in Connecticut, then we'll want to do the same in Washington.
And so without further ado, let's look at that plot.
And so let's actually look at these back to back.
So this was the original plot we calculated and then if we correct for moisture content in Washington.
Then the distributions.
Well, that was maybe too many bins.
Long story short, it looks like the Washington distribution is still a little lower than Connecticut, even with the moisture correction factor.
So.
I think we still need to get to the bottom of this.
Why is the distribution in Connecticut different than it is in Washington?
I mean, perhaps they're just as much as I would love to believe that they're just growing better cannabis on the East Coast.
That may not necessarily be the case.
So that's why I said, you know, the choices you make matter and not just the choices we make, but the choices other people make.
So it matters how the laboratories are measuring cannabinoids.
It measure it matters if they're doing a moisture correction factor.
You know, and it matters, you know, how we look at the data and calculate statistics and create our visualizations.
So. I always like to cast a lot of uncertainty and doubt upon my analysis because, you know, you should take any data or statistical analysis with a little bit of skepticism
and make sure people justify their assumptions, explain the shortcomings in their data.
So. You know, nothing's set in stone, but I just thought this was an interesting analysis here that warrants further research.
So after today, when we get off the call, I'm going to see, OK.
Are they actually doing moisture correction in Connecticut?
So it may have to dig into the regulations there or maybe even call some labs in Connecticut and ask them directly.
And. And this is why, you know, there's a lot of science conferences where people at different laboratories are discussing what's the best way to measure cannabis,
because how you go about measuring it matters. So your sample preparation matters.
So that's essentially how you're, you know, they call it homogenizing, which is just a fancy word for grinding the sample up.
So when you send a sample to the lab, they grind it up before they test it or they probably should.
They may not be. And so a lot of things like this aren't standardized and things like this make a big difference.
So it's how you homogenize the sample can affect your results.
You know, so it would be so it looks like.
I mean, we can't tell, right. Or growers just doing a little better job in Connecticut, maybe.
Or the laboratories measuring the cannabinoids differently, maybe.
Or are we doing something wrong on our end? Maybe. So all of these things need to be reviewed.
So. And we could always just get more and more data points. So we just have observations from two states.
So say you're a laboratory in one of these other states, maybe you maybe you could add your observations to this mix and see where your state shakes out in.
On this scale in terms in regards in relation to Washington in Connecticut.
So.
So that's me droning on and on and on. So do any of you have any questions or comments or thoughts from the analysis today?
Well, in that case, definitely feel free to reach out if you have, you know, any where that you want to see the analysis extended or anything of that sort.
Graham lost you there for a second. So if you have any last questions, you're free to chime in.
Yes. One thing I do have to say is that I don't think carotene has psychoactive activities.
I personally heard carotene is the only terpenoid that acts on the CV2 receptors, which are specifically found in the muscular organs as compared to the central nervous system.
But I have heard that carotene is related to couch lock. But I also understand that mercy, I believe, is the most psychoactive of it.
It maxes out the CV1 activation level and is the closest to opioids. Sorry, I just I'm not sure if I'm wrong or I.
You're 100% correct. Don't be sorry, Graham. You're 100% correct. I that was in the back of my mind and should have mentioned it.
And like I said, I'm not the expert chemist here. So thank you for keeping it sharp as always. Should have mentioned that Mersene is another terpene, as Graham said.
You should look out for if you're concerned about the intoxicant effects of cannabis. So once again, if you're just looking at cannabinoids, may miss Mersene.
So critical point. So exactly. So I exactly. So I made mix mix those two up a bit. So as Graham keeps it sharp here, you know, Mersene may actually be one that is a bit more intoxicant.
And then the curiophiline may I've heard it's maybe almost like an irritant. So depending on your body chemistry, it may kind of clash with your body chemistry.
So, you know, everybody's different and, you know, everyone's reaction to cannabis is a little bit different.
And so this is why it's so important to get granular and scientific as we try to do. Perfect ending Keegan. I couldn't have said it better myself.
Thank you, Graham. Love having you. Love having you all. I hope you all have gotten something of value from today.
And like to encourage you all to come to Saturday Morning Statistics. I was just going to tease real quick. Saturday Morning Statistics.
So there's a funny comment going around at XKCD.
It's just so relevant to some of the things that we've been talking about where they say, oh, you know, if you don't control for content bounding variables, you'll have bias.
We talked about this when we talked about instrumental variables.
And then we've talked about if you include too many variables, we may overfit or over identify the model.
We've also ran into that problem. But I kind of disagree with the statistician here in this last one, because, you know, I kind of agree in that, you know, you definitely want to be skeptical of all analysis.
But the statistician is forgetting that there is a whole lot of work that's been done exactly on this problem, which is model selection. And so we'll talk about that on Saturday, where there's actually been statistics done where you can actually try to find, you know, what is, you know, the statistically best model to use.
So essentially penalizing yourself for adding more variables while recognizing that more variables add more information.
So just thought I would add a little bit of fun here at the end. But, you know, thank you for coming. And, you know, feel free to start exploring some of the code for yourself.
Yes. So all the data is open to the public. That was the final question here. And so I've got the links in the source code, and then that is found on GitHub.
So check out GitHub Analytics, Innovist Data Science. And I've got references to these various sources. But that's one thing we stress is, you know, it's important to have reproducible results.
And so we try to find public data, do everything publicly and transparently so that they can be reproduced. So we're making our effort.
And so you don't have to use these on public data. So if you have an awesome private data set, then by all means use our statistics on your private data. But in this group, we tend to focus on public data.
Awesome.
Well, I know everyone's time's precious. So thank you for staying a little extra today. So check out XKCD for a good laugh or two.
You know, feel free to be in touch. And definitely. And if you have any directions for future meetups for next year, any topics you want covered, any states you want to deep dive in, definitely feel free to reach out because always happy to accommodate.
On that note, as I like to say, I hope everybody, you keep your nose to the grindstone, stay productive, and have fun.
And I'll see you all next year in 2022, unless you come to Saturday morning statistics. In that case, we'll dive into model selection and touch up our forecast for 2022.
Awesome.
Bye everyone. Thank you for coming. Thank you. Bye, else. Bye, Graham. Bye, Nina.