The strategy that I would love to do is you would basically mix some of the tried and
true genetics like the MAC with some of these crazy land races that people are discovering
in Southeast Asia or people are growing cannabis.
One, you want to make sure you get your seeds from a legitimate vendor.
People are growing cannabis all over the world from Afghanistan, Pakistan to Southeast Asia
down to South America, plus all over the United States.
Some of the best seed vendors are right in California, right in Humboldt County.
And then there's the whole thing where you could do feminized or unfeminized seeds.
And the more I looked into that, I don't want to harsh on anyone's seed business, but basically
definitely the big time producers, they just go straight through the feminized seeds.
They just don't want to mess around.
They just want to grow a bunch of flower and just female flower and be happy with that.
I'm more interested in genetics and whatnot.
And so if you're breeding, you may not want to get feminized seeds, right?
Because you need some males in there and all that jazz, but we're going down a whole can
of worms.
But anywho, enough seed talk.
So for those of you who are new, Grant, my name is Keegan.
Started a company, Canlytics.
So got into the space first by helping out labs that test cannabis.
And now we're just trying to organize and make cannabis data accessible.
So it's sort of all hands on deck moment.
So happy to have you here.
Thanks.
I'm happy to be here.
I'm just kind of curious about the space.
I'm a pretty young data scientist and was honestly just wanting to learn more.
Too cool.
Well, we've got a real interesting project at hand.
At the moment, we're basically wrangling data from certificates of analysis.
So basically, cannabis has to get mandated quality assurance testing.
And while that can be a sore point for a lot of producers, what I try to point out is this
is also putting a lot of data in your hands, right?
These are rigorous tests, right, and you're getting all the compounds in your products
measured.
So instead of just leaving that data on your table, it will take full advantage of it.
And so basically, people have all this data in PDFs.
Or sometimes it's on the web.
But it's amazing how much data can get locked up in a PDF and get rendered useless.
And so I've seen it where people will have hundreds, if not thousands of these COAs,
and they're just saved on their Google Drive somewhere and they're not doing anything with
them.
So basically, we're building tools here to unlock that data.
And it's open source.
So I'll show you today how, one, you can go pick up these tools and make money with them,
right?
You can go talk with labs and laboratory software providers and help them out and help out retailers,
help out producers.
So the sky's the limit here.
And anyone have any thoughts, comments, questions before we just dive straight into the fun?
One curiosity that I have is just generally how much analytics is actually happening right
now in the cannabis space.
Is data analysis or data science a pretty hot topic right now, or is it still kind of
brooding?
John may have a thought or two on this.
My thought is there's a supply, but I think the demand far outstrips the supply.
So it also can be a tough sell, right?
Going to these producer processors or retailers, I think a lot would benefit from analytics.
But their first question is going to be, what's my return on investment?
So if you're not able to clearly articulate what their return is going to be, they probably
won't even entertain a conversation with you.
So like I said, some of the more savvy players are realizing this is something that they
need, and so they're trying to find analytics providers.
And now, as I said, I think there's just a very, very small supply.
So if you're interested in bringing your skills into the space, I think there's a demand for
it.
John or anyone else, do you have any thoughts about how much analytics is needed here in
the cannabis space?
I may be buying.
Well, I could go on forever.
But as I said, people are getting more savvy to it.
It's not even just the cannabis space.
It's more just industry in general.
The way I describe it was maybe 2015 to 2018 or so were the data-basic years.
Those were basically where people were just trying to figure out how can we just put a
cap on this fire hose of data coming out.
People were trying to figure out how to collect it, what could be collected, where to store
it, how to store it, what the data should look like, what should standards be, all that
jazz.
And that's largely been figured out.
And so now people have these giant databases.
So now people have all their data.
It may have been cleaned by 2015 standards, but so be it.
We'll take it.
So now they've got their data, and now it's time to do something with it.
And the issue is severalfold.
The data sets in the cannabis space are by and large pretty narrow in focus.
Part of that is historical and as regulatory as come on, they've principally focused on
product safety and product safety attributes that can be measured.
Again, California took the lead because of their pesticide focus.
And it really drove pesticide analysis big time in the analytics space, microbial testing,
and the cannabinoid levels as they come online.
But that's about it.
We tried very hard during when there was public comment period in California during the run
up to the Prop 68.
And we tried to push pretty hard that they should be expanding it beyond just cannabinoids.
And we pushed hard for terpene analysis to be required by regulatory.
And that never happened.
And so that's hit or miss.
The field is moving towards having terpene analysis more prevalent in the commodity.
Now consumers are starting to demand it.
So you're starting to see it.
But the other key compounds that would be affecting the outcome, namely esters and thiles,
sulfur containing compounds, are not really part of the analysis yet.
So we get a very narrow perspective on what you can tease out and interpret.
Anyway, I'll stop there.
But I would like to see broader types of analyses.
Again, it's a marketing question because what's the ROI?
But at the end of the day, I think cannabis, it's pretty narrow in its focus.
And so there's only so much you can get from narrow data sets.
And that's where the cannabis data science team comes in.
And I think that's where sort of the lesson of the day will fit in so nicely because I'll
show you how we've been stuck on these real easy low-hanging fruit.
And I'll show you how we can use a cherry picker to go and get the hard to reach fruit
today because that's what we're all about, using clever tools to get the juicy fruit
that's just out of reach.
So here is one of these certificates of analysis that John is talking about.
So this is, I think, just a mock product or maybe not, but just some flower that was sampled
here in January.
And you can see, okay, it passed the overall tests.
And typically, what people will put on their label is they'll just put maybe the total
THC, the total CBD, and the total cannabinoids because chances are the vendor who purchased
– so at the retailer, right, some vendor purchased this flower from a wholesaler, like
a producer in California, it would be a distributor.
So this distributor sold this product to a retailer.
They're putting it on the shelf, and all they have is this PDF.
So this is cool, right?
So I always say the labs, their product is twofold.
One, it's the certificate saying, yes, this got signed off on by the laboratory director
at Greenleaf Labs.
And then the second part are the data points.
So the retailer could try to copy and paste this and put this into Excel.
And so they probably do that to a certain extent, right?
They probably grab the cannabinoids and they make their labels.
However, I mean, look at all these data points here.
And so this is what John was talking about.
So now you come down and, okay, this sample was tested for terpenes.
So now you have all the monoterpenes, incestuous terpenes, but that's going to, you know, you're
going to have to start paying someone by the hour, right?
If you're just going to have somebody copy and paste this into Excel, you're getting
dozens of these a day, maybe.
Maybe you've got hundreds of these, right?
You're looking at quite a cost if you just want to pay someone to copy and paste this
into Excel.
And then, oh, man, like, you know, now you've got all the pesticides down here.
So all the pesticides, heavy metals, microtoxins, which are produced by microbes.
And so then you also have your product screen.
And double check beyond that.
I'm not a microbiologist.
Definitely double check.
That's a whole field of its own.
That's what's cool about the laboratory, right?
You may have microbiologists working who know these analytes really well.
You may have a chemist who's performing your heavy metal test.
You may have another chemist performing your pesticide test.
So this is awesome data, right?
These are top-notch scientists producing this data.
So why just let this go to the garbage bin, but why just let this collect dust in your
drive?
Was there a question or comment?
Yeah.
So you mentioned that this is to some degree open source.
I guess I'm just curious now, like, how you get access to these types of compliance testing
reports and whatnot.
And I don't know.
I'll probably learn more.
I don't have too much time left until my next meeting, but I'll be coming next week to kind
of a longer meeting to talk more.
Graham, where are you?
I'm in Salt Lake City right now.
Yeah.
So you're going to be more limited in Utah than you are in jurisdictions like Washington,
California, Oregon, in terms of accessing this.
It's more or less open source.
I believe Washington state is doing a much better job at getting this out in open source
mode.
California, it's all required, but it doesn't circulate.
It circulates at the level of the distributor and the retailer, and the consumer can ask
for it and hopefully get it.
But it's not like it's all online and you can just go download it.
And Grant, I'll have to point you to our episode from last week.
I'll try to get that uploaded for you because basically the idea is these tests are being
performed for consumer safety.
So if you're a consumer, you should be able to access your data here.
So let me – for example, let's say one of your products – so here is a product that
I recently purchased here in California.
So you can get this product and then on the label it'll have a – it may have a QR code.
And so here you could find these results online.
And so the idea is at the end of the day the reason the quality assurance is mandated is
to get the consumer educated about their product.
And so that's sort of what Canalytics is here to solve.
We're just saying, okay, they've done all this fantastic quality assurance testing,
but now we need to do the final step and get this data into the hands of the consumer.
So this is a publicly available certificate.
So this is a public URL.
You can browse around this and go download this certificate.
And as a consumer you want to know what's in your product.
You want to know your cannabinoids, your terpenes.
And basically having the PDF is cool, but what we're going to do – and we've already
begun with – we've already checked off confident cannabis, tag-leaf limbs, and then
I'll show you today Greenleaf Labs.
But basically we can just start parsing these COAs.
That way you can actually walk away at the end of the day with – whether it's a JSON
file or just a simple Excel file, you can just walk away at the end of the day with
all of this data in an Excel file that you can give to your favorite data scientist.
You can call Grant up on the phone and say, hey, I've got all of my data now.
Can you crank some numbers on this?
Does that help answer your question?
Yeah, it does.
I really appreciate that.
This is really neat.
So, Gary, I'm not as knowledgeable on terpenes or these other compounds that are in the products,
but I guess I'm just interested now more in what consumers care about and why they
care about it.
Consumers care about getting high.
If you want to know that, go be a bud zender.
Do it for a week and you will learn so much.
That's actually a good recommendation.
In fact, I have heard somebody make the same recommendation that if you truly want to learn
a lot, you spend a week as a bud tender.
Different consumers will want different things.
Some just want the highest cannabinoid concentration.
A lot – I mean, think about it.
Here we're having the conversation about these analytes, but we're probably on the far end
of the distribution of people who are educated about this.
What I have found is the more that people find out about, say, terpenes or, in fact,
pesticides, the more they care about them.
For example, I, in particular, after spending time at the laboratory, I'm particularly
interested in seeing pesticide results because what people don't realize is, yes, you may
have a pesticide pass, but I want to then go and make sure that it's non-detect across
the board.
In this one, it did detect for pyrethrins, but you may have to double-check on that because
it's possible that there may be some naturally occurring pyrethrins.
But now as an educated consumer, you can now go and do your homework.
Now you don't have to research 70-some pesticides.
You can now just go and say, oh, should I be concerned about 0.1 nanogram per gram or
we'll have to find the units here.
Yeah, UG per G. I believe that's nanogram per gram.
Long story short, from my background, I believe there's some naturally occurring pyrethrins,
so I think this one you may not – once again, do your own homework.
I would say do a quick search on pyrethrins and you'll probably learn more than I can
tell you here.
But this is what I would look for as a consumer, is I would look for any detects.
I don't think producers are going to love to hear that news, but like I said, I think
it's just – it'll just kind of make everybody try a little bit harder because – and not
every consumer would care about this, but me in particular, this is what I look for.
And then the second thing I look for are just terpenes, right?
So just again, speaking from personal preference, I've recently kind of learned that limonene
may be what puts me on the couch.
So I maybe would want to try to avoid limonene if I'm wanting to be productive, so to speak.
But once again, this is getting into a whole can of worms and this is where you may want
to speak with John because this is sort of right up John's alley and the work he's
doing is you're consuming many, many milligrams of many different compounds here and what
effect is this having on your body?
Are you kind of moving all these chemical dials in your brain?
But a lot of it's just trial and error and people are just kind of just figuring it out
this haphazardly.
I've heard a saying once that if you're not measuring it, you're not managing it.
And once again, I've basically kind of found that I sort of gravitate towards cannabis
that has terpenelene in it and it took me forever to figure this out.
And then it's like what is a lot of terpenelene?
And we've done the statistics here and I think maybe.2 or.25 is maybe the average around
the mean or median.
So this would be above average terpenelene.
Once again, I'm just pulling that number out of my memory, so go double check us on this.
But that's the thing is we're sort of these real educated consumers and so the idea is
can we get this data to more and more people so that way hopefully other people can have
these revelations about what works well for them and what doesn't because we're also
kind of finding out that everybody's a little different.
We all have our different biochemistries.
So we all have individual biochemistry and then you're mixing in this complex chemistry
and now we kind of need to connect the dots.
So that's one of the reasons Cantalytics is helping with this is we're trying to help
people like John who essentially are doing clinical studies.
John's doing the dosing project where people are consuming cannabis and reporting effects
and now if we can get these data connected to all of that then people can start to figure
out what a reasonable dose may look like and how they could track their consumption over
time.
That's really neat.
I apologize.
I have to step out for a work meeting now but it's been really good to meet everyone
here and you'll see me again.
And Grant thanks for tuning in and tune in anytime.
Yeah appreciate it.
Have a good day everyone.
Thank you.
Well since we can kind of change gears now and since I believe everyone here for the
most part is a you know COA aficionado do you want to see how to start parsing these?
Yeah I'm curious to see how this is working and then I have a question for you based on
that.
Yes please.
So I'll show you how it works.
So essentially the way I've figured the way I like to do a lot of programming is all the
constants that you can sort of was there a question or comment?
So all the constants that you sort of can pull out into a JSON object the better.
So here's sort of just a Greenleaf lab observation.
Give me one second.
I may have to restart this.
Give me one second.
Okay so basically we'll try to pull out all of the constants so that way you know you
could store this in your database.
And you know this would be a typical database entry you know for your given lab right.
You've got Greenleaf lab and you've got all their details about them.
And so then the idea is we'd like to make the analyses more variable than this but in
this case I just went ahead and looked at Greenleaf lab COA and I'm like okay you know
here are their analyses.
And it may seem like a little bit of work but hopefully you should only really have
to do this you know once or twice because you know I visited labs all across the country
and these are basically the standard analyses that you'll have at laboratories right.
Cannabinoids, pesticides, water activity and moisture content.
You'll have terpenes right that may be optional so you should basically view all of these
analyses as optional.
Then you've got heavy metals, lycotoxins, microbial and then foreign matter.
And then in California they call it foreign material so that's a curve ball but you know
we can work with that.
So once again we'd try to avoid that so if there's any way we could sort of figure this
out through natural language processing that would be the best right.
So we could just read microbials by PCR and know that's microbials.
And as you can see you could come close to doing that but I've just predefined them.
Once again natural language processing could probably solve that but that's using quite
the heavy power tool for a small task.
And then basically the way I'm approaching this is I'm going to basically divide the
page up.
So I'll just show you how I'll do that real quick.
So the idea is we can read in this PDF.
One second here.
The idea is we can read in the PDF and here I'll just look at the first page and this
will just be sort of all the rectangles that we can detect on the first page.
So you can see okay awesome like we can detect this area looks like kind of looks like a
table rectangle area so we can get that data real easily.
And so the way I approach this is and this is why I was saying this could almost be a
lab by lab project that you could potentially get paid for right.
So say you go to a retailer and they say hey we've got labs for or we've got COAs from
these 10 labs.
You may want to you know that could be a good contract for you.
But once again it could pay off big time for them right.
If they're able to unlock COAs from 10 different laboratories for you know the foreseeable
future and all their historic COAs and that's a lot of value to be added.
So once again and I'll show you how you can kind of make short work of this and hopefully
it'll get faster and faster each COA we parse.
But the idea is you can just start to essentially use computer vision right.
And that's why I was saying you know that's what's so cool about the PDF plumber package
is it sort of works on you know kind of I believe it leverages sort of you know smart
parsing techniques under the hood.
So if you're interested you can get the images.
So I'll show you down below how you could actually get this image data.
So if you were predisposed you could get that image and display it on your website if you
wanted to.
This is where you kind of get into who owns the copyright of that image and what exactly
is copywritten.
And so this is where I would almost write to like who owns like the raw data of that
image.
I guess right like is the image data itself part of the COA product right.
It's like the image data is similar to like a cannabinoid result or is the image like
a proprietary Greenleaf lab image.
So I don't know.
I suspect it goes with the client.
Exactly so you know if the client paid for the COA and Greenleaf lab took that photo
you know can the client then do anything they want with that photo.
Yeah that's part of the compliance package.
That's what I that would be my argument.
Of course Greenleaf lab owns their own logo but I would say you know if you paid for your
test then I would say your image is part of your result.
But anywho that's getting a little nitpicky but these are the kind of the cool things
that we can start figuring out here in you know this digital 21st century.
Because like I said the image data is quite rich and as we're figuring out you know some
of these image processing techniques can provide a lot of data.
But we're just more interested in the words.
So basically whenever you get a PDF I would say you know the first thing you should do
is just look at all of the words on the page just to make sure that you can get everything.
And so here I'm just looking at the front page but we can look at you know subsequent
pages here.
This one we'll need to make sure that we can in fact get this area here.
Have no fear I think we can do it.
But that's sort of the first thing is you know make sure that you can extract the words.
Have no fear we can get those ones.
But I think we may have to get down to the character level.
So here if you just look at all the characters yes so that's the thing is right couldn't
find all the words but look we can get all of the characters.
So as long as you know we can get every last data point you know there should be a way
to write a clever enough algorithm to actually get the data points.
So that's sort of the first step is just make sure that you have like an actual PDF and
not like a right because you may get wild things right you may get like an image or
something that's you know or some sort of and this would be a good detection right into
this you know not that I would expect them but you know I did talk to someone once in
Oregon who mentioned that this was a problem with like you know counterfeit COAs but this
would you know detect immediately if something was say a counterfeit COA because you just
wouldn't be able to read the characters.
But anywho like I said I don't think that's going to be very common.
But the way I go about parsing this is by the page area.
So basically you know if you look at the front page so if you look at the COA which I recommend
you do first thing is basically you just want to look at the COA and just take stock of
every single data point on the COA and then think about you know how you know we're going
to get every last data point off of this COA.
So basically we've got the distributor, we've got the cultivator, we've got the sample details,
we've got the status, we could potentially get the director and stuff but I'm not doing
that for now.
If we see reason two in the future we could but I don't see a reason.
But then we see okay we've got this information repeated so we only need to get that once
and then it just repeats and then we've got new data here in this table and then we've
got a repeated footer.
And so this is a common pattern that you can expect on a certificate of analysis is a common
header a common footer with your meat in the middle.
So the way I approached this was I was like okay I'll just read the distributor data and
read the producer data so you can get the distributor, get the manufacturer and I was
saying okay you know then you could read the sample details so you could specify you know
these three areas and you know one may expect that different labs may put these in different
areas or potentially Greenleaf labs could update their COA and things may change but
hopefully you could target these areas.
And basically I was actually describing this to John the other day but I'll just tell you
so basically there's two approaches you could take to parsing these COAs.
There's the blunt crude approach which would just be to read everything and then just try
to split the data at known points so we'll just split lab samples, split at sampling
method.
So that was the route I originally went down but then you have to know every single field
on the COA ahead of time.
So if you do know that so say you're the limbs provider for Greenleaf labs then yes that
would be the way you'd want to go but the way that I'm going to do this is basically
just partition the COA into different areas and then just divide and conquer.
So I'll just get the distributor data, get the producer data, get the sample details
and then look you can get the results, just get this block of results.
And so that way if you're trying to get these results and you cut out all of this noise
then it's going to make parsing this much, much easier and I'll show you that right now.
So basically I'll just show you, we've talked the talk, let's walk the walk.
So let's cut out the distributor details from the front page.
So as you can see it takes a little bit of cleaning to, right, so we make our crop and
we just get this, right, we can read this block of text, right.
So that's this distributor shimmons consulting corporation, distributor shimmons consulting
corporation.
So we can read that text in pretty cleanly.
So the idea is it's pretty easy to parse that crop of text and it's fairly easy to parse
the producer crop of text.
So the idea is if you can specify what areas are these different sections then it can make
parsing it super simple.
And potentially I was thinking you could even build a user interface to make it even simpler,
right.
So your user interface would just be to show the PDF to somebody and just have them click
squares and just say oh that's the square for distributor, that's the square for cultivator,
so on and so forth.
But once again it depends on how many of these you have to do.
Once again just since we've got a little bit of extra time I'll show you how you can get
the image data.
So the COA doc, which I've initialized right here, has a nice built-in function to get
the PDF image data.
So here I want to go ahead and just get the image.
And so this will be the raw data for that image, right.
So this image right here, as far as the computer is concerned, that image may as well be this
block of text.
So this doesn't mean anything to a human.
This is in fact just 34,000 characters of essentially randomness.
But that's your image.
And so the idea is you can give this block of text to your developer and they can display
that on your website or print it on a label if you were so inclined on doing so.
But that's a lot of text so I'm not going to be collecting all that data.
But if you want it, it stays for the taking.
And you can get the sample details.
Once again, the Raspberry Parfait.
So here you see Raspberry Parfait.
And it's a little bit trickier to parse these.
So this block of code is a little bit specialized.
But the idea is if myself and all of you awesome data scientists, if we keep tinkering on this,
hopefully we can generalize these algorithms so that way you can just point at the area
on the PDF that you want parsed and you'll get your data here.
And I'm just going to clear this out, just to save some room here.
So now we've got all the distributor data, we've got all the producer data, we've got
all the sample details.
So that's pretty cool.
We've got the product name, right?
We may not yet.
I was hoping we did.
Well we may not have the product name yet.
Oh, that's right, I added it at the end.
So there it is.
Cool.
So now the idea is divide and conquer.
So basically you need to get a couple things at this point.
And so this is why, you know, CanLytics is here to help you standardize these.
So basically we'll standardize the analyses and so basically at the top I've got, I put
a list of all the data points that we'll collect.
So we basically collect the analyses, collect all the distributor details, and then the
big thing are the results, right?
So we'll want to go ahead and get the analyses real quick just to be complete, but then we'll
get to the results.
We've got all the analyses, product underwent, and then we have the status for the various
tests.
We can get the methods.
As we found out with PSI Labs, the method to the madness, just kidding, the method does
matter, so it's worth keeping.
I would like to tie these methods to the specific analysis, but just for time's sake, I haven't
gotten to that yet.
But we've got the methods just in case.
Now the fun part.
And so now because we've nicely cropped each page, remember for the results, we'll be cropping
the page to the meat.
We can just pull out all those rows, and then we basically have all of that data.
Yes, we have to now organize it with a pretty clever algorithm, but basically we have all
the data, right?
We've got all the rows, right?
We've got all the cannabinoids, and we've got all the terpenes.
And so the way I approach this is in this case, I predefined the columns, but ideally
your algorithm would be smart enough to detect the columns.
But I just went ahead and as you can see up top, I just predefined, okay, your cannabinoids
will have the name, the LOD, LOQ value, milligrams per gram.
On the COA, the name, LOD, LOQ percentage, milligrams per gram.
So it's not perfect, but at least we kind of know what order the data is in.
And as long as Greenleaf Labs isn't changing their COA willy-nilly, and I'll tell you now
that labs don't change their COAs willy-nilly.
They may change them once in a while.
So once in a while the routine may need to be updated, but these are controlled documents
at the laboratory that have to go through a controlled process in order to be changed.
So it kind of puts the brakes on things just changing rapidly overnight.
So as I said, it's not going to be impossible for them to change their COA, but if they
do so we can make a quick pull request to the algorithm and hopefully stay up to speed.
So it's not perfect, but as I said, it's unlocking such rich data that I think the code was worth
writing.
Kieran, what is it doing for you have these, I don't know if I'd call them header and footers
in the tables, but you've got columns with data and then it's interrupted with bars there.
In this case it's black text bars.
This?
Yeah.
So I'm skipping those.
So basically I'm just going through and I'm saying, oh, if it starts with an analysis
name, if it starts with date, time, I'll just skip it.
And so that's here, I'll show you where in the code I'm doing that.
Okay, I see what you're doing now.
Okay.
Well, I forget where in the code that is.
Oh, I'll never see it in the million years.
So that's what's happening is there is still some custom algorithms.
The idea is, and this is the way I approach programming in general is I don't even mind
writing a specific use case.
So I wrote this specific use case and basically I was like, I'm going to parse all the data
out of this COA one way or the other.
Once I found out that yes, we can read every single piece of data on here, that was the
goal.
It was like one way or the other, we're going to read every single piece of data.
And essentially we did exactly that.
So here I'll just show you this right now.
But basically, it also read in low on battery so if I cut out it's because I lost battery.
But basically we've read every single data point on this COA.
So this would be 59 or I think it's 58 data points.
So tons of data and I've tried to be as specific as possible.
I mean not as specific, I tried to be as general as possible so that way you could generalize
the code to more and more labs.
But inevitably I had to write Greenleaf Labs specific code.
So basically I tried to put as many parameters as I could into JSON.
Then I tried to generalize the code as much as possible.
And at the end of the day, I still had to have a Greenleaf Labs specific function.
So here I wrote a parse Greenleaf Labs function.
And so the idea is all of these different functions, the parse Greenleaf Labs function,
the parse Confident Cannabis function, these can be imported pretty quickly into COA doc.
And so the idea is it's sort of this pluggable user interface.
So you can basically just import your various labs.
So here I've done Confident Cannabis, Tag-Leaf Lens, Greenleaf Labs, Data Scientific, and
then SC Labs.
I'm still finishing that one.
And then MCR Labs, we've done the URL.
I don't actually have a COA PDF from them.
But if they put a QR code on their PDF, then we're good to go.
So Keegan, given what you've got so far, can you issue a report that would show how homogeneous
or not the analyte names are?
Because these are all California COAs.
And they should be, for the most part, all synonymous.
But it would be interesting to see how bad that variance is on a California set right
now.
That would be a fun exercise.
How easy is it to do with what you've got right now?
Well, in fact, this was a test that I put Candace on with, I think Candace may have done it
with the PSI Labs data, but we could do it with the SC Labs data.
But we can do it.
And essentially, we can get all the...
I wouldn't get down with the analyte names.
I would at first ask it at the top level of the assay classes themselves.
The analysis.
The analysis classes themselves.
Start 50,000 feet.
And let's just see how good or bad synonymous is in a set of California COAs.
Because that's going to tell us how we have to run our synonym databases.
I think they're actually the analyses are pretty similar.
They could be.
And I would recommend since VEDA is the most recent and is the most closest to current
DCC because they've been now recently licensed.
And what we just got back from VEDA is their current compliance COA.
It might be pretty damn current.
So here...
So long story short is I think the analyses names are similar.
Sometimes people use potency instead of cannabinoids.
For whatever reason, people just like the term potency in the industry.
I just always felt it was just less formal.
It's wrong.
It's totally fucking wrong.
People just prefer it.
It's a hard habit to break.
It's just not right.
The word potency and potent does have its time and place.
But I feel like the word cannabinoids is more appropriate.
It is totally more appropriate.
You cannot define potency without an activity assay.
And that's the last I'm going to be saying this.
But it's nomenclature that you'll see.
And so...
Fucked up cannabis industry bullshit.
And in fact, I even have a way to deal with this.
And the way we do it is we basically just have replacements.
Here basically just common replacements that I'll make on the COA.
But at least we're not bad at the level of the analyses.
Our terms are pretty synonymous, I guess, in the set you've got right now.
Exactly.
And so basically, if there's any oddball case like that, you can basically just define a
new replacement and say, okay, we just want to replace potency with cannabinoids.
So the idea is to make all of these little adjustments as sort of configurable as possible.
And then the idea is you can just configure away the intricacies of everybody's COA.
So say Greenleaf Lab uses the word potency.
That's not going to break anything.
We'll just make that replacement.
Can I make a recommendation?
What you're doing is wonderful.
Do not go outside the flower box, as it were, because it's going to get a lot worse when
you get processed cannabis products and it's going to be confounding.
So I would at this point just be working with flower because it'll become rabbit holes in
a mess once you go off that.
It could get complex once you get to edibles.
Yeah, it's going to be a mess.
We'll deal with that later.
Let's just do flowers.
And so, exactly.
So edibles often are measured in milligrams per gram and then the milligrams per serving
matters.
So the product classes and everything else gets real gnarly.
So edibles could be a whole can of worms.
If anyone ever comes across an edible COA that they want parsed, we could take a look at
it.
But as you said, we may have to take it from the top.
Later, later.
But for now, and I'll let you all get out of here.
I think my battery's about to go.
But for now, as I said, we can get all the results.
It still needs to be flattened and normalized a bit.
I forgot to add the units, so I need to go back and add the units.
But at the moment, you can parse the COA and get all of this awesome data.
And there's still more work to be done.
But I was reading a pretty inspirational blog post.
And it was basically, or actually, I think it was even a Stack Overflow answer, but basically
somebody said that it's sort of miraculous what you can pull off sort of in a business
model sense with good PDF parsing.
It's a tough task.
And not everybody does this well.
And it's just like it's all about attention to detail.
You could do this quick and dirty, but we had meticulous attention to detail to the
point where we can get the sample image, we can get every last piece of data off of this
COA.
And that's what really makes it at the end of the day is the fact that we can get it
all and organize it in a way that you can save it and your favorite data scientist can
use this.
So that's what really makes this special, I think.
And so for any of you that want to work on this, as I said, we've got a pretty well-defined
way to go about collecting this data.
At least for California, we've got a nice list here of about 50 to 60 data points that
you can expect on almost any COA.
And you should be able to readily parse these data points without too much trouble.
And then write some routines and hopefully get paid for your work.
And that's the limit.
And as I said, I think each bit that you tinker on this, I think, will be helping the cannabis
industry out.
So that's the presentation for today.
Any thoughts, comments, questions before we get out of here and enjoy the bright sunny
day?
That's looking good.
And I want to thank you all for coming along.
And your eyes and your ears are helping.
Thanks Jerry.
Thanks Candice.
John.
All right.
Keegan, hopefully we get more.
As I said, we're waiting on Cafe Floor to see what they can roust up for us.
So maybe it gets faster and easier as if you've gotten this far, maybe it's not so hard to
put a new one in and see how fast it parses.
Exactly.
And that's what I was thinking is it's almost the classic learning by doing.
So the more of these that we do, the...