Welcome to the Cannabis Data Science Meetup Group.
Thrilled to have you all here.
Thank you all for coming.
It's your eyes, your attention, it's your interest that's
really moving the ball forward, helping us move the cannabis
space hopefully forward, at least the molecule at a time.
So that's the goal.
And the idea today is to get our paws
on a big set of cannabis data.
Today, we happen to be working with lab results.
We've worked with all sorts of cannabis data, sales, products,
strains, licensees.
And there's just been a big demand for lab results.
So we've gone through some of the tedious stuff
in the past weeks.
We just wanted to find out who are all the players in the game.
So we found all the licensees.
As I'll show you, that's pretty important information
because all of these, where do these lab results originate
from?
Well, they originate from licensees.
So we can start augmenting data.
So then we have the lab result. Then we have licensee.
Then we may know where in the world they grew it.
And then all of a sudden, once you know where in the world
they grew it, then you can start doing
all sorts of augmentation.
You can augment climate data.
Maybe you want to augment regulation data.
Maybe regulations are having a play.
The sky's the limit, in some cases,
literally, if you're doing outdoor.
So anywho, it's going to be good fun.
But I'll drone on long enough.
So it's a meetup after all.
So you're all welcome to bring any ideas, questions,
research your own projects that you want to share.
This is a platform for everybody.
And in the past, we've had people come and present
their own research and talk about some
of their own projects.
So feel free to promote anything that you're working on.
Give some big ups to yourselves.
And then, yeah, feel free to share anything
that you're interested in.
So my intrepid co-host, Candice, who's been a cannabis data
science team member for years now, it's lovely.
We've really been moving the bull forward.
So Candice, how have you been?
And how are your data collection efforts going, say,
in Florida?
And anything on your mind?
Let's see.
I'm getting closer to getting an API, a metric sandbox API,
which is key.
And I'm going through the agreements.
And I'm pretty excited about it.
And that way, too, I'll be able to help cannabis businesses
easily integrate with metric with the Canlytic software
developer kit, the metric software developer kit.
So I'm pretty excited about that.
And then, actually, too, instead of just gathering a lot
of Cjoas in Florida, Keegan, I'm just
looking for different labs.
But I did come across a lab called
Canlytics, which was interesting.
And that way, too, when we start parsing them.
Because I really would like to see COADARC supporting
all of the labs in Florida.
Because the patients right now are using brute force
spreadsheets and typing in their COA numbers.
And I really think they would get excited.
But I haven't had a lot of time.
I've been working with some other stuff outside
of cannabis data science.
But I think that could be pretty exciting.
So until we come up with a universal GPT script that
will just scrape everything, I'm going
to need to get my hands dirty and start
PDF plumbing some COAs and try to update and add labs
to COADARC.
That's it.
I absolutely love it, Candice.
And maybe I'm getting on in my years,
because a younger me would have already accomplished this
for you.
And this is why it's an all hands on deck moment.
There's just so much to do.
But that's the thing we're sprinting on,
is to start unlocking some of these data
points for consumers.
Lab results, they're right there.
And as we said, as soon as the consumers get them,
then they can augment all sorts of data,
find out information about their products,
and do all sorts of interesting statistics.
And what's cool is Candice says she's learning the metric
traceability system.
We can stand on the shoulders of giants.
I mean, I think I was seeing somewhere
that metric is operating in 24 states or so.
So they're a giant.
And they've done their work of they have,
what do you call them, data models for various entities
in the cannabis space, right?
Strain, plant, package, sale, receipt, things like that.
Well, there's the transaction, and then there's sales items.
And so what's cool is we're also working
to standardize results.
And so why not just incorporate a lot of the metric data
models?
And so basically, the idea is, oh, well,
if somebody has, say, a cannabis receipt in California,
one would expect that it'll have most of the standard metric
receipts on there, or just the various fields on there,
which, you know, like a price, item name,
it may have a metric ID on the label.
Awesome.
And so the idea is, why not get the standard metric points,
say, from the metric from a consumer's receipt
or the product label, or maybe they even
have a certificate?
Phenomenal.
And then what we can do is do the old analytics philosophy
is work with whatever we're given.
So maybe they only have a couple data points.
Maybe they just have a label that just had THC, CBD,
but maybe it has the metric ID on it.
Awesome.
Maybe somebody else has a COA with that same metric ID.
And so then we can almost connect and augment
the data points.
So that's the idea is just try to just rapidly collect data.
So maybe that metric ID was for one of the IDs,
some of these lab results we've already collected.
So then all of a sudden, we can let the consumer know, oh,
these are your THC.
These are your terpenes.
Maybe there's a pesticide screening, so on and so forth.
You can find out the licensee, who grew it.
Maybe you can go view their website
and look at some of the other strains they grow.
Once again, the sky's the limit.
And so that's the big work underway is we're just
coming at this from the opposite end that some other people do.
So my philosophy is a lot of people really rely on metric.
But unfortunately, sometimes the traceability system is
almost like a game of telephone.
So it's like we'd love to call up the lab,
but instead, we have to go through metric
and go get the lab results.
But then the idea is why not go directly?
So if for whatever reason, maybe the consumer
has access to a certificate or a producer has access
to a certificate, just go straight to the source
and get the lab results.
So it's far from perfect.
But as I'll show you, as we just try
to get our sample size large, then life will get better.
So that's what we're working on.
It's really cool.
But I'm talking too long.
Have you had a thought on that question, please?
No, I was just going to say I need to be careful, too,
though, because just because I have a metric API,
I can't be scraping that data and publishing that publicly.
I need to still go for public data sets,
asking government states to please give me
this public data set.
But it would be kind of cool if patients,
because I'm telling you, they're all doing it.
They're going in spreadsheets.
They're putting them in the graphs.
They're plotting them.
And I don't know if anybody's thinking about it.
But I think it's so cool what you're doing, Keegan.
And it's my fault, too.
I didn't do any parsing coding at all this week.
So bad.
One, don't blame yourself.
We're the turtle after all.
And then let you speak one second, Rick.
And then two, you approach things ethically,
slow and steady, following the rules, wins the race.
And then three, we'll just get the results
wherever they may be.
And so say we can't get them from the producer or the lab.
If the consumer has a right to have them
and they want to share, then that works for us.
So Rick, what are your thoughts?
So when Candice mentioned scraping the data from metric
and being careful, I just thought,
I don't know too much about that.
Is any of that considered PHI?
Or is that state to state?
Is that federal?
I'm not sure what type of info, personal info,
is included if you were to scrape that.
Well, I'm not scraping metric API.
What I'm doing with that key is I'm
helping cannabis businesses that want to integrate
with the metric system.
And I'm only getting authorized right now in Massachusetts.
But then myself, as a software consultant,
I can help people integrate.
And I'll be using the CanLytics metric software developer
kit to help me do that.
But I still have a key, so I haven't learned metric yet.
But I won't be scraping any public data for metric ever
because I have signed agreements too that that's private data.
But there are public data sets available
being published by states.
That's data I'm scraping.
And then also too, I'm in a Facebook.
You see, I'm a medical marijuana patient.
I started late in my age, and I do it medically.
And I don't take any pharmaceuticals.
And I used to be prescribed like benzos, Percocets,
and artane, a Parkinson pill daily for a long time.
And it was affecting my health.
But anyway, I digress.
But the thing is that so anyway, I'm
on these medical marijuana Facebook groups.
And we kind of talk because none of my friends smoke pot still
because I didn't do it till late in life.
My friends just don't smoke it or do it.
And but they're publishing COAs and batch numbers.
So we have like Jungle Boys.
And we have like True Leave.
In fact, True Leave now, we can actually turn around.
And I can just download COAs as a patient.
Now see, as far as just going onto a website
and scraping it, you have to look at agreements.
You just can't be willy nilly taking pulling data
off the internet.
And but we have, well, not.
Well, Keegan, Canlytics has had some labs
that want transparency.
And they've given him data or have allowed us to scrape data.
And then also too, sometimes labs
might want you as a software developer
to run code to help them quantify, verify
that their data is good.
Whereas the Canlytics code could pick some outliers
and anomalies.
But anyway, sorry, Keegan.
I'm talking to you.
You made a lot of good points there, Candice.
And the way I would say it is, yes, of course, definitely
read the terms.
And especially for metrics, so they're very explicit.
Data in metric is metrics data.
And in fact, yeah.
Yeah, I'm just wondering how much value you can extract out
of it if you can't use it.
So when you say it's metrics data,
if you have a license to use, can you house on-site data
and use it to run your own analytics?
Is that a?
No, no, no.
See, Rick, it's like an apple and an orange.
So metric is why I'm pursuing the metric API,
is so that I can help cannabis resellers, suspensories,
connect into the metric system.
That has nothing to do, that apple
has nothing to do with the collection of data.
Because I won't be collecting any data for myself
from the metric API.
But go ahead, Keegan.
OK, so I'm just going to share my thoughts.
And once again, not a lawyer.
So as I said, this is really dicey territory.
So definitely check your lawyer.
And in fact, I was reading some or I
was hearing somewhere data is now
like the digital oil or digital gold.
So it's incredibly valuable.
We've known that for a while.
But now, especially with the rise
of the AI statistical models, yeah,
it's really driven the point home.
So I think a lot of this is still kind of getting hashed out,
sometimes literally hashed out.
But this is my understanding is anything in metrics database
is their data.
If you sign a terms of service to use their API,
from my understanding, you're strictly
only supposed to do that for traceability purposes.
So it's a traceability system.
So they want to know how many plants you have in the ground.
They want to know how much you harvested.
They want to know how much you sold.
That's it.
So from my understanding, that's all you're really
allowed to do with the API.
Things get weird because it's like, well, companies
have their own inventory systems or sales systems.
So retailers keeping track of what products they sold,
what time they sold it at, how much they sold it at.
So to a certain extent, the company has their own data.
And so it's weird because it's like, well,
if they then put that data into Metric,
then maybe that's the sole place they're putting it.
Is that still their data?
And my point of view is, well, that's Metric's data.
So maybe the company could maintain their own database,
their own data, and do analytics on that.
Not really clear.
From my understanding, there are analytics companies out there
that say, hey, we'll integrate with Metric.
Put in our API key, and we'll give you analytics.
I don't know about the legality or if that follows Metric's
terms of service because that analytics company may
be reading in data from the Metric API,
calculating statistics, and then distributing those statistics
likely for profit.
And that's not really a needed step in traceability.
And so to me, it's not real clear
if that's valid using the data.
So I've just stayed away from that.
CanLytics has pursued getting integrated with Metric
because I want to understand the system
and potentially help people out if they're, say,
looking to automate some of their workflow.
So I think it's a useful tool to have in your tool belt
to know the Metric API.
But personally, I don't know.
I'm leaving that to some of the other analytics companies
that want to do statistics on Metric data
for private companies.
Once again, it may all be above ground.
It may all be permitted because, as I said,
to a certain extent, the companies
have their own data, right?
They may have their own database of products and lab results
and sales.
But I think if I was running a company,
I would make real certain to have my own private database
with my own private data that's almost
separate from traceability.
And then you just go through traceability
for compliance purposes.
So it's like, OK, I made a sale.
I need to record that in the compliance system.
I'll put some of my sales data into Metric.
But this is still my sales data.
And then, yes, if I wanted to share my personal data
for my database with the analytics company
to do statistics, then I think that would be reasonable.
But once again, not a lawyer.
Don't press me because, as I said at the beginning,
the data landscape, to me, is not really well-defined.
And as I said, there's tons of analytics companies out there.
I don't really know how they operate.
But the way I'm approaching it is just saying, OK,
that's a little murky.
And as Candice says, let's just go for open data sets
that we know are public, we know we're allowed to work with.
And sometimes we have to limit ourselves.
We can't just put our paws all over everybody's stuff.
But if it's in the public domain,
so for example, the Washington results,
I think MCR Labs is publishing results on the web.
In the past, we've collected results.
They will look at PSI Labs.
And then in the past, SC Labs has published lab results.
And then what was our final source?
Oh, yeah, Connecticut.
And then in Connecticut, they have a public registry
of products and their results.
So those are public avenues.
And then as Candice was saying, in some states,
people are allowed to get certificates.
And of course, I realized if you make a purchase,
your sales receipt is technically in the metric.
Well, that's going to be added up into the sales total.
And so that's why I was saying, if we're creative,
we can still get to the data in a legitimate manner.
So it's like, OK, you can't get sales data directly
out of the metric API just willy nilly.
So well, if a consumer purchased a product in Florida,
they'll have a receipt.
You can take a picture of their receipt.
And I've been looking at these receipts.
And they have a surprisingly large number
of the exact same data points that are in the metric API.
And that's why I said it's so useful to know the data models.
Because on the receipt, you may have things
like date, time sold, or I forget the official key,
but time sold, price, sales tax.
You may even have the ID.
And so the idea is just to get as much data
as you can through that avenue.
So I don't know.
I'm maybe talking too long.
But there's more to come in that regard.
But Rick?
No, that was great.
That was a great explanation.
So you gave me a lot of info.
I just didn't know a lot about the metric system.
I knew about the public data sets,
which I found very, very valuable.
Seems like there's just a problem unifying the data.
And it takes a lot of groundwork to go and tie it all together,
which is understandable given where we're at.
And hopefully, that changes.
So thank you.
Phenomenal, Rick.
And just wait till you see what's in the store today.
But some of that.
So too cool.
And once again, that's my perspective.
As I said, there are other companies
that do data analytics.
So some of them are quite nice.
And they've got some good representatives.
So feel free to reach out.
I can even get you a contact.
And you can pick their brains.
But this is the avenue we're pursuing.
But as I'll show you, it can actually be quite fruitful.
Because our other philosophy is just go ahead and don't wait.
Just go get it.
So it's like we can't just wait around for lab results
to fall into our lap.
So we'll just go get what we can.
And also, I'll show you today.
We got a fair amount.
But I've been talking a lot.
Edwin, any thoughts, comments, questions?
I'm not sure if I've seen you before.
But you're also welcome to introduce yourself.
So sorry if I don't remember you.
You seem a little familiar.
No, this is actually my first time in the group.
So hi, everybody.
I'm a, I guess, budding data scientist for a little, little
fun there.
But I actually have very little experience
in the data science world.
I'm currently a college grad with a degree in biology.
I've just started a data science certification program,
because that's where I want to head in life.
And one of the things that they suggest that we do
is look around for meetups to kind of see
what it's like in spaces like these.
And I am an occasional user of cannabis products.
And I wanted to see where data science is being,
how it's being used in this space.
And it's honestly really cool.
And it's really interesting to hear
what you guys are talking about.
And it seems like a lot of the things so far,
a lot of our concerns have been focused
around procuring data.
Am I correct in that?
Or is that, like, what are some of the challenges
that you guys are facing in using data
science in this industry?
Just wait.
You're going to be in for a super, super good treat,
because I've got a full demonstration about what we're
doing and how we go about it.
Exactly.
Almost the, right.
So we've been at this group for a little over two years.
And almost the solid first year, we're
spent just collecting the data.
And then the second year, we're spent just
trying to standardize it so that way we could just calculate
the most basic of statistics.
You can't calculate the mean until you can add everything up
correctly.
And so it's like you're adding things up.
And then all of a sudden, you get numbers, numbers, numbers.
And then you've got less than 0.01.
How do you handle that?
So that's what we spent almost the whole second year doing,
was just figuring out how we could actually
run basic statistics with the data.
And then we got a little beyond basic statistics
and did some pretty cool modeling.
And then I think, at least for me,
I reached the limitation of my knowledge real quickly,
especially in the recent months with just
the rapid developments in AI and statistics.
So I'm just sprinting to stay at the back of the pack.
But I'm having fun.
But anywho, let's go ahead and start pretty soon.
I'm going to go ahead and share my screen.
And you're going to be in for a treat today.
So I'm just going to go ahead and get all this data loading
while we talk about it.
And so what do we have here?
So we've collected data from five different states
for lab results.
As I said, unfortunately, I don't
think they published their lab results anymore.
And then I missed about 1,000 or so of them.
But we had collected around 6,000 or so lab results
from SC labs in California.
And as I said, we've got lab results from Connecticut.
And see here, I'm just doing a little last minute data
cleaning.
That's another thing is I try to say standardization
over cleaning these days.
Because data cleaning almost implies the data's dirty
and you're manipulating it.
And so I don't know.
I don't feel like it leads to think
it may hurt your credibility to use words like data
cleaning and data manipulation, even though that
may be a reasonable jargon.
But anywho, we're standardizing some of these fields
we have for the various states.
Some states are already a bit more standardized than others.
So I'll have to share with you some prior meetups where
we went into depth collecting these.
And so this is where I was saying all of these
were journeys.
It was an expedition to get all these lab results
from California and Michigan.
The Washington ones took a long time
because there's a ton of data augmentation
where we have to match lab results to inventory
all the way to the plant stream.
So that one's a little complicated.
And then the Massachusetts one, that's
where we're getting results from MCR labs.
And once again, a little more, actually more than a little.
So I'm just going to go ahead and run all of this
while I talk because my philosophy is the code is
a little less interesting than the data,
and in particular, the visualizations.
So I'm just going to rush through this as quick
as possible to get to the visualizations.
But I'll at least talk about what I'm doing.
We've got a sizable amount of lab results for each state.
And I'm just making sure we have all of the same data points.
So I'm just making sure for each observation,
which is a cannabis product that was sampled and sent
to a laboratory to get tested.
So these are lab results for some cannabis product that
was sold at some retail dispensary.
And so we're keeping track of the THC content and the CBD
content.
And then just for simplicity, I'm
just going to use total THC and total CBD for today.
And then where possible, I'm going
to be standardizing these top, I think, five or six terpenes
that we've looked at in the past.
And so there are maybe anywhere from a dozen to two dozen
or more terpenes that are tested on a regular basis
in the plants.
And as we discovered in, remember
when we talked about what makes a cheese a cheese,
some of the minor terpenes may actually be quite important.
But we found these major terpenes
have some interesting relationships.
So basically, just going to get to these are just compounds,
beta-cariophylline, alpha-humulene, beta-mercine,
cariophylline oxide, beta-pinene, d-lemonine.
And we won't look at this one today,
but this is a compound that I think
is interesting for penicillin.
So once again, for any of you who want to do some research,
we found that chemistry can be remarkably explanatory.
So once you actually have this analyte name,
there's a whole other suite of data augmentation
that we haven't done yet.
You could augment the compound boiling point,
which and other properties of these chemicals.
So I'm not a chemist, but the boiling point
is a low-hanging fruit data point.
But that one's of critical importance.
So for example, processors, people making cannabis oil
from flour, the boiling point for each compound
is of utmost importance.
So this is an error that I think I can troubleshoot pretty quick.
We may just have to do without.
Hopefully, we can still aggregate these.
OK, wonderful.
So as promised, we've gone through all of this rigmarole.
I'll just show you what a data point looks like.
We'll just take a random sample of five.
And then let's just look at some of these top fields.
So we've got the product name.
And then we've got the total THC and the total CDE.
So we can just start taking some samples of these.
And these are the types of products we're working with.
So here's an infused joint, an indica joint.
Here's ridge-rite.
Here's ridge-line runs, 30% THC, so on and so forth.
And we've done all sorts of fine analysis in the past
because this is natural language.
And so we found the product names are a fun field
to use natural language processing on.
OK, that's all for today.
That's all fine and dandy.
So what's a good research question for today?
Well, last week, we were talking about South Africa.
We were talking about licenses in South Africa.
Well, what I realized is from I was
starting to look at the map to figure out all
the different provinces.
And I may forget the name of it.
But correct me if I'm wrong, but I
want to say there's a city in South Africa, Durban.
And well, that jogged my memory that, oh, yes, there's
a famous cannabis strain, Durban poison.
Let's just print all these out real quick.
And also, let me actually check the map real quick just
to make sure I'm not quittering this.
Right?
Yeah.
So yeah, so here we were talking about South Africa.
And there you see Durban is in KwaZulu-Natal,
which is one of the provinces.
So OK, so just wanted to do a quick sanity check.
That's what I always recommend in data science.
And that's a philosophy from Python, right,
is don't guess, you know.
So check.
So anywho, so there's a city in South Africa, Durban.
So we found all these Durban poisons.
And then I realized we were just talking about Thailand.
So we could find Thai strains.
So here are a bunch of Thai strains that we've observed.
So we've seen a lot in Michigan, some in Massachusetts.
Not certain if this is a Thai, this Thai leva, but perhaps.
And then just to go ahead and add a third,
I was trying to find some Colombian strains.
And so there's Colombian gold is the famous one.
But the only one observed was this one in Michigan.
And so I'm not certain if this one is valid or not.
But there's a Colombian profit and a newer strain
that I realized may technically be Colombian is Medellin,
which I think is, once again, let's double check.
I want to say Medellin is a city in Colombia.
Maybe or maybe not.
So Medellin.
So this is a newer strain.
There's also a strain Santa Marta.
But I didn't see any of those in the data set.
And now we can start getting to some of the visualizations.
So this is what's interesting in the importance of getting
our sample size large.
So out of the 125,000 plus lab results,
there are only 77 Durbin type strains or flower type strains
that were tested, which is actually we'll take it.
So remember, I've said in previous meetups
that I'm a small sample guy.
So I'm OK with that.
And what I like to say is this is
called doing conditional upon conditional means.
So I may or may not be able to do this because we were talking
about standardization here.
Yeah, so this is what I was saying.
It's sometimes non-trivial just to do a mean.
But I'll try here.
So we can just say, oh, let's make this numeric.
And let's coerce our errors.
And let's see.
OK, so that's not even logical, right?
Because it's like, oh, you know, there
are some THC values above 100.
So you could get fancy and say, oh, let's just
get everything where THC is less than 100.
So once again, any who, I'm not going to comment question.
Yeah, a quick question.
We don't have to go through this exercise.
But I was just curious.
You had mentioned augmenting the data back there.
So could we, and kind of getting crazy with it,
but if we went down a rabbit hole,
if we were that interested, could we
take the results for all of the raw flower material
with the Durbin poison name and then track,
is there growing conditions of the facility,
how they grew it?
Because I think there's expressions for turpenes,
especially, that come out under certain environments.
So if we were to look at that city in South Africa
or wherever that land race that still is attached to that strain
name originated, as a grower or breeder,
I would be interested in trying to make that expression stronger
either through environmental variables or some other way.
So can we go that deep down the rabbit hole with this?
You can go pretty deep.
So for example, we have the 77 Thai results, or 13.
We've got 13 Thai results.
So for example, you can look at this one.
This first one was a lemon Thai.
And you can see that, OK, this was actually
grown in Palm Springs, California.
So my guess is it was probably grown inside,
because this is Southern California, I think.
So this was probably grown inside.
And then let's see if we can't find one of the Durbans.
And so where was this Durban grown?
OK, actually, this is interesting here.
And so for example, this strain was
grown in Oakland, California.
Once again, maybe inside.
So this is something that's come up before
and something that's super tricky
is that, like you said, the plants
may have different terpenes expressions
based on environmental factors.
And this is something that we've racked our brain around.
But we haven't had any insights to add here.
Then let us know.
But basically, we've run into this conundrum,
because one would expect outdoor strains would be different.
One would expect people in, say, California
would be more likely to grow outdoor than, say, somebody
in Massachusetts or Michigan.
So where is this person located?
And so look, this is just an anonymous producer,
so we don't know where this person is.
This person's in Santa Cruz.
This one's anonymous, but it's a Detroit Durban.
So they must be up in Michigan.
So I don't know.
I think there may be something there, like state effects.
Are people better at growing in Massachusetts or Michigan?
Is there an effect of being in California on your terpenes?
So maybe people are growing in greenhouses in California,
and they're getting that bright California sun,
and it's doing wonders for their plants.
That may be a problem.
But it's going to take an ambitious data scientist
like yourself to figure out a way to have an orchestrator that
has access to all these random different data sets
and tries to intelligently string them together.
So I think that's where AI steps in.
It's going to take an ambitious data scientist,
and it's going to take an ambitious data scientist
to figure out a way to have an orchestrator that has access
to all these random different data sets
and tries to intelligently string them together,
because it gets overwhelming quickly.
You're quite right.
Because as I was saying, in a lot of the meetups,
I'm just using the data point, and then some of the compounds.
So I'm just using product name, and total THC, and total CBD,
and some of the terpenes.
But as you were saying, if you built a more complex statistical
model or somehow used some of the AI models,
you may be able to incorporate every data point.
I'm missing.
But the location in the state may, well, not may.
I think they're probably significant predictors
of the results.
But there may be other interesting things
you could uncover.
So it ended up being controversial.
But a long time ago, I had suggested that, oh, you
could look at pesticide failures by location
and see if, oh, if you're near anything,
if you may be failing.
And then all of a sudden in Washington,
they did this sampling of samples.
And they were finding the derivative of BDT
from old apple orchards.
But then I was actually hearing a scientist
from Health Canada speak.
And what he was saying was, yes, they
used to test for these DDT compounds in Canada.
But unfortunately, they're so ubiquitous.
Because I think they were used maybe heavily, maybe
in the 70s or maybe earlier.
They were just spraying them all over the place on orchards
and stuff.
And I don't think they'd be great.
So they were just spraying them all over.
And they're ending up in the soil.
So unfortunately, a lot of agricultural products
just test high for DDT.
And so they were saying they just stopped testing for it
in Canada because people were getting detections.
But it's not really their fault. I
don't know if they thought they were high concentrations or not.
So it's just sort of an unfortunate thing
that we live in this dirty world.
But anywho, that was something they
were looking at in Washington was proximity to orchards
and failure rates for pesticides.
But actually, last week we talked about terra noire.
And I think that would actually be a more interesting, that's
more fun, uplifting thing to look at is,
instead of looking at pesticides,
maybe look at geographic density of terpenes.
And my hypothesis would be, I'd bet you anything,
the Emerald Triangle and just in general, sunny California,
I bet they have pretty high expressions of terpenes,
maybe versus some of the coal indoor warehouse-grown cannabis
maybe in Massachusetts or Michigan or even
Washington state.
But indoor growers can sometimes impress you, so who knows?
But anywho, let me go ahead and run through some of this.
That was an awesome comment there, Rick.
So feel free to chime in any time.
But basically, the question was posed in the prior weeks,
like how could we even go about distinguishing
between these various varieties?
And so let's see if we can kind of do that.
So we've got three varieties here,
like pie, Colombian, and Durban.
And if we just look at their THC and CBD,
they're kind of all clustered together.
You may look at the average.
So you may just say, oh, just looking at the average THC,
maybe Durban poison just has the highest on average.
But once again, how much can you really read into this?
Are these, first off, are they statistically different?
So you can use, first off, you can use an ANOVA.
So this is an analysis of variance.
So that's the statistical test you
would do to actually test if these are statistically
different.
And that basically depends on mostly the sample size
you have and then the standard deviation.
So if these have large standard deviations, which they do,
and you have a small sample size, which we do,
then you probably can't conclude these
are statistically different.
So the smallest standard deviation we have
is around 4 and 1.5%.
So all of these are well within two standard deviations
of each other.
So I almost don't even have to do an ANOVA test
to just know for pretty high confidence
that I don't think these are statistically different.
OK, but once again, so this is left to do.
So if you're interested, this is something
we've done in prior weeks.
You can probably just grab the code and reuse it.
Also, this is code we've done in prior weeks, probant models.
So you could actually see if you could predict
high Colombian Durbin with CBD using a probant model.
Once again, you can do this.
But how accurate is that model going to be?
Probably not super accurate.
But have no fear.
So you may be getting a little worried.
You're like, OK, we've got almost no data.
And things aren't looking very good.
But have no fear.
We can still do some analysis here.
So we can start, say, looking at the ratios.
So this is the ratio of THC to CBD,
see if anything jumps out at us.
So basically, it looks like these are high THC strains.
That's not super surprising.
Once again, OK, so for me, nothing really jumped out
at me here as just saying, OK, these three strains,
there's something different about them.
So right now, just from looking at THC and CBD,
they all look relatively similar.
But now we can augment, or not augment.
We already have these points.
But we can start looking at some of the terpenes.
And so this is where it's going to get a little interesting.
And these relationships, I want to go ahead and thank
old John Abrams at the CESC.
He was the one who first told me about the relationships
between some of these terpenes.
And for you ambitious chemists, this
is where I think some of the frontier lies.
So these chemicals are produced in the plant
by various synthases for my understanding.
And so I think maybe understanding
of the relationship between the synthases.
And once again, I'm not a chemist,
so I may be butchering this.
But maybe there's a THC synthase.
And maybe there's another synthase
that produces some of the terpenes.
Maybe there's some correlation between these.
Maybe the Surin genetics express some synthases more
and some less.
So that's sort of, like I said, I barely know anything there.
If you're particularly interested,
that's what I think an avenue for new research
is, actually studying how the plant produces
these chemicals and the properties of these chemicals.
I think that's going to be important.
But for now, we'll just see if we can't start finding
differences between these.
So here, here's all the derbins.
You see beta-karyophylline is generally less than 0.15.
And alpha-humulenes generally less than 0.06.
You see the Colombian profit.
It's kind of starting to drag away a little bit.
So this may just be maybe it's just a more potent strain.
But you see it's got a bit higher, 0.25.
And then I don't think I've done the tie.
But we can just try the tie results real quick.
Yeah, so for some reason, I don't think
I have terpenes for the ties.
So unfortunately, the tie has dropped out of the race.
And so now we're just dropped out of the land race.
So right now, we've just got derbin and Colombian
that we're looking at.
And so this is the next relationship,
is looking at beta-mercine to delimitene
and seeing if we can't parse out anything interesting.
And as I was saying, tie fell out of the land race.
But check this out.
You've got land race derbin.
That's kind of an outlier here.
And so you see almost all the other derbin poisons
have less than 1% beta-mercine.
And for some odd reason, this land race has 2%.
So that's double the normal amount of beta-mercine
that you would see in a derbin.
And it's labeled a land race.
And if you do a little research, you'll
learn that land race strains are basically,
from my understanding, where people
go to remote regions of the world.
Maybe they go to South Africa.
Maybe they go to Colombia or India or Thailand
or where have you.
And they try to go to regions where the cannabis plants
haven't been interbred with a lot of the general plants
that we see today.
So as I was saying, a lot of the California OG and Cush
has been interbred with so many strains
because people are just trying to get high THC.
And so I think people go and try to find these untapped genetics
and bring those back to the US market
to breed in with the Cushes and the OGs
to get some new flavor profiles with that super high THC
stuff that the market demands.
So I'll zoom in in just one second on that land race.
Just to finish these off, check this out.
Colombian profit has a significant amount
of delimiting, which you just don't
observe in the derbin poisons.
And beta-mercine is maybe less.
C has only got 0.1% beta-mercine, where over here
you're seeing anywhere from 0.5% to 1%.
So that's notable.
But here's the goal.
So this is my favorite relationship
that I've been introduced to, in that it's not perfect,
but a good rule of thumb to me is using the beta-pinene
to deliminin ratio as a proxy for indica sativa.
So what I would find is anything with a greater than around 0.2,
0.25 ratio of beta-pinene to deliminin
is what I'd call a sativa.
And anything lower would be kind of what I would
call more on the indica side.
And so if you look at this, see that most things here,
they're less than 0.1 to 0.1.
So this is 0.1 to 0.1, right?
That's like a 1 to 1 ratio.
So it looks at first glance that this
has around a 1 to 1 ratio between beta-pinene
and deliminin, whereas see the Colombian profit,
you've got 1 to 5 to 0.6.
So the Colombian profit has around a 1 to 5 ratio
between beta-pinene and deliminin.
And so they get lower than this.
So I wouldn't call this a strong indica.
What this is looking to me like is maybe the Colombian profit
is kind of falling right at sort of the hybrid point,
in my opinion, because I think these get really low.
You can get some really strong indicas.
So this is looking like right at sort of like the indica cut
off line to me.
But once again, we only have a sample size of 1.
And you can't really do that much with a sample size of 1
because it's like you may have just grabbed the outlier.
So we'd really like to see more Colombian terpene profiles.
So if any of you are growing Colombian gold, Santa Marta,
medellin, get your terpenes tested
because these are critical data points.
And from the 125,000 lab results we have,
from my understanding, we only have one Colombian
that has lab results.
We'll take it.
It's better than nothing.
So just given this one data point,
before this, my prior was a null hypothesis.
My prior was there's no difference
between Colombian and Durban.
However, after seeing just one observation,
my prior is now updated.
And I now think that Colombian is closer to a hybrid.
And Durban, Durban poison, looks closer to a sativa to me.
And once again, you can actually calculate the average Durban
beta-pinene to d-limonene.
That one is 0.75.
And then this one is 0.23.
And once again, let's look at just the min here.
Because there may be some, see look,
there are some Durbans that have low ratios.
So the question is, are these just not traditional Durbans?
Or is it possible that the distribution goes all the way
down to 0.2?
And then it's not even abnormal to have, say, a strain down
here.
So this is the problem about having these tiny sample sizes
is we don't know if this Colombian profit is kind
of an outlier or if this is around average.
So don't know.
And then we've gone way, way over time.
But I just wanted to show you one last set of charts
just to really drive this point home.
I mean, this one's kind of fun.
Remember, we talked about the land race Durban.
So I thought, well, why not actually just look
at its terpene profile?
So this may just be improperly named.
But if this is, in fact, the true land race,
then this may be characteristic of some of the genetics
that you would see in South Africa cannabis.
So I kind of was super curious about what
the terpene profile of this particular strain would be.
And if you look at it, so these are the absolute concentrations
with over 2% betamersene.
If you look at just the relative concentration,
you'll see almost 60% of the terpenes in this plant
are betamersene, which is interesting.
But we need a comparison.
So let's look at the Colombian profit.
So here are the terpenes of the Colombian profit.
One thing we notice is this sample
was tested for more terpenes.
So you see here, we're testing for about a dozen terpenes.
And then the Colombian, they tested for about two dozen
terpenes.
So you have a more granular strain footprint here.
But check this out.
You right off the bat, we can start doing some comparison.
So I'm going to put this one up side by side.
So check this out.
Someone have a thought comment question?
Feel free to chime in.
Or someone had to go.
That's OK.
I'll wrap this up since we're well over time here.
But long story short is, and in fact, let
me pull back up the absolute concentration here.
I thought the relative concentration
would be interesting.
But let's just stick with the absolute concentration
just to not get confused.
So to this one, and remember, if we actually
look at this land-raised derbin, so if we look at this one,
do we still have total THC for this?
So this land-raised derbin has kind of a low THC percentage.
In my opinion.
So its THC percentage is only 14%.
But it's got almost 2% beta-mercine.
So that just seems like a staggering amount
of beta-mercine relative to its THC levels.
And so here you see the Colombian has less than 0.1%
beta-mercine.
So is that meaningful?
Not super certain.
But the other thing that was really kind of jumping out
at these, and that's what I was saying about statistics.
We were looking at the THC and CBD,
and nothing was jumping out at us.
When you look at statistics, you want something
to jump out at you almost immediately,
and then you can pursue it further.
Otherwise, you have to be super cautious about spurious
causation and bias.
But here, once again, this is just two observations.
One observation of Landry's Durban,
and one observation of Colombian profit.
So we've got a sample size of one for each.
So we'd really like to get our sample sizes a lot higher.
They look like different strains to me.
So it looks like this one maybe just has small or fewer
amounts of terpenes except for beta-mercine.
And then, as I said, what's jumping out at the Colombian,
we kind of noted earlier, is it has a high concentration
of D-limonene, whereas the Landry's Durban does not.
So I don't know if that's meaningful or not to you,
but if you were, say, interested in what makes a Durban
a Durban, what makes a Colombian a Colombian,
well, we can start to think about the chemical profiles.
Maybe if you wanted a strain that was a sativa that also
had beta-mercine, you could grow some Durban.
Or if you want a nice, maybe this is a nice hybrid,
you can try some Colombian out.
Or maybe you could get creative.
And what would happen if you mix a Colombian and a Durban
together?
And so I think that would be wildly interesting
predictive analytics.
Rick, you talked about what could AI models
do that we couldn't do.
This is about as far as I can go.
All I can really do is just calculate
a bunch of conditional statistics
and to a very limited extent.
I can just calculate the concentrate.
This is just the raw data.
So this is just the raw concentration.
Just the raw concentration.
But what if some AI model could start
thinking about what would a terpene profile of the offspring
of these two plants look like?
And so then you could almost do AI-powered breeding.
And try to figure out for statistical or statistics
powered breeding.
Where instead of just thinking, oh, maybe today
I'll breed the Colombian with the Thai.
You could actually do predictive analytics
and try to figure out what would be the terpene
profile of a Colombian Thai.
And what would be the terpene profile of a Colombian Durban
or a profile of a Thai Durban.
And you can mix and match to get those ideal terpene profiles
that maybe you've done other predictive analytics.
And we were talking about matching terpene profiles
to consumers.
So maybe there's a consumer or a big consumer segment that
likes a certain profile.
And you can laser focus in your breeding
and give the consumer just what they want.
That's sort of what I see sort of the future of all of this.
What am I doing?
I'm just doing basic statistics.
But where can you take this?
The sky is the limit.
So any thoughts, comments, questions
before I let you all out of here to go seize the day?
Since this is my second meeting, I just
wanted to briefly introduce myself to the group.
Similar to Edwin, I'm also in a data science
program and interested in natural language processing
and just finished up a classification project.
And this, to me, is very fascinating data.
Like you said, looking at terpene profiles
and just some of the raw data that's out there.
So I just wanted to say hi.
I don't want to keep the group too much longer.
I guess the user interface had the speaker off earlier.
So I couldn't chime in earlier, but just wanted to say hello.
Phenomenal, Robert.
And that's where, as I said, ambitious data scientists
like yourself can just take this one step further.
Today we're just doing summary statistics.
How many Thai strains have we observed?
How many Durban strains have we observed?
What's the average concentration?
So these are just low-hanging fruit.
This is just either raw data, simple statistics,
or conditional statistics.
Nothing super fancy.
But you can do much further.
So classification.
We just looked at a couple strains today.
But I think that may be the name of the game in the future,
is trying to put these into buckets.
So there's the Colombian.
There's Thai.
There's Durban.
In the past, we've looked at cheese.
We've looked at push, OG, cape, skunk.
So the strain names is sort of a fun.
It's fun because people come up with all these wild
and wacky strain names.
And there's been some papers that say, oh, this
may not be very consistent.
But I feel like there may be something to it.
So as I said today, there may be absolutely no difference
between all these strains.
But I don't know.
I just feel like there's just something
different between a plant that originated out of South Africa
and a plant that originated out of Colombia.
Who knows where the skunks originated?
And as I said, there's been a lot of breeding in California.
So I think there's ripe ground for classification.
But it's going to take your brilliant thinking.
So Rick, any thoughts, comments, questions real quick?
Yeah, real quick.
And I didn't want to take us over time more than we already
are.
But I just wanted to say thank you.
You were spot on with a lot of stuff
that I've been working on personally
in regards to breeding and tracking,
essentially, land races through different data sets.
One you might be interested in and find helpful
is seedfinder.eu has an API where you can basically
track genetics through strain names.
So you type a strain name.
And then there's basically a family tree
of all the different crosses, if it was cubed,
or the entire genetic process behind it.
Usually a lot of backstory, too.
So it's helpful as a breeder to be
able to track the lineage of the strains
that you're working with.
Now you've helped me make a connection to lab results.
So now I can tie the genetic data
that I've been working with now with lab results
to do predictive analytics for crosses or see
what's a hybrid or a polyhybrid and try to track a land race
to get a cut.
There's a lot of interesting work
being done with node labs, jungle boys,
with genetic preservation and tracking that aspect of things
as well, which is another good avenue if we could get
that data, obviously, later, but to track
the environmental variables and how.
Because a clone should be a standardized test
across different variables for a genetic sample.
So just want to say hi and lots of interesting things
that you're doing.
I really appreciate all the work that you've
done to tie everything together.
And it's been extremely valuable to me just
by discovering it today.
So thanks.
Phenomenal, Rick.
And let's keep the conversation going.
This seed finder has been brought up before.
And you're spot on.
And that's where a lot of the value is added,
is tying all these rich data sets together.
And I didn't know they had an API.
So I'm definitely going to have to explore this now.
Because I just want to see.
So you should definitely do it.
Oh, I will today.
And I'll share everything with you all.
Because as you said, all you need is a name.
And then you can start tying these together.
And that's where a lot of the beauty in data science
comes from.
It's just tying together interesting data
sets in interesting ways that maybe people
haven't thought of before.
I love every bit of it, Rick.
And why don't we maybe pick up with the conversation there
next week?
Because I'll start exploring seed finder.
And as you pointed out, readers have their own set of data
points that they're interested in.
Because we're talking a lot about, oh, Indica Sativa
from the consumer point of view.
Well, from the producer point of view,
Indica and Sativa have their whole other wide variety
of associations.
For example, breeders are super interested in how many days
is it going to take to flower?
How tall is the plant going to be?
So they're super concerned about the morphology of the plant.
How big are the leaves?
How far apart are the buds going to be?
So these are things that are of utmost importance to breeders.
Because if you're growing a Sativa,
it's going to be 8 feet tall.
Or an Indica that's 5 feet tall, that matter
is about where you hang your lights.
And then, of course, the days to flower.
I've heard everybody wants that real quick turnaround time.
And that's typically the Indica type strains
with the shorter flowering periods.
And so that's a whole other reason why maybe you
don't see a bunch of Sativas out there on the market.
Because generally, from my understanding,
they have a much longer time to flower.
Yeah, and that's unfortunate with how things are going
with THC percentage being the primary goal
to be the highest.
And I think a lot of strains and cultivators
are looking for that.
Or it's difficult to grow.
That particular land race can be squirrely.
And it's unfortunate because you miss out
on some of the outliers like you had identified
with the terpenes.
It had a 13% or 14% THC value, which a lot of people
would overlook.
But there could be some entourage effect
or that double amount of whatever that terpene value
was to put you on your butt or heal you or do
a specific need or something.
So yeah.
You've got my mind jogging.
So I'll be thinking about this for next week.
A potential thing is let's just maybe
just try to augment some of these variables
that the producers may care more about.
So say go to Seed Finder and get things
like what's the expected flowering date?
Or maybe they have the expected height or expected yield.
So what if we got some of those interesting data points
and then once again tied them in and started to see
what insights we can draw?
Maybe there is some predictive factor
about how long something is going to be growing
and how much is going to be sold.
And so for example, once again, my mind's
racing a million miles a minute.
But we were looking at factors that
make the cultivator successful.
So we may want to look at all the successful cultivators
and look at what varieties are they growing?
Are they growing quick flowering strains?
Or who knows?
Maybe some of the successful cultivators
are growing some of the slow flowering strains.
So I think there's a million and one things we could look at.
So I encourage you all to explore the data.
Well, let's get on this.
As I said, my mind's racing, land racing.
So let's keep this up.
Keep the conversation going until next week.
I'll make sure to get all the lab results published
and delivered to you today.
So thank you for coming.
That's one of the reasons you came was rich cannabis data.
And I'll make sure to get that to you.
Until next week, thank you for helping
advance cannabis science.
Thank you for coming.
Thank you for being awesome.
Now go on and go enjoy your day.
Way cool.
Thank you, Keegan.
Thank you all.
Thank you.
See you next week.
Until next week, everyone.
Keep your nation to the grindstone
and have fun while you do it.
And rock your day.
["The Star-Spangled Banner"]