• Stars
    star
    111
  • Rank 314,510 (Top 7 %)
  • Language
    Python
  • Created almost 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Parser and database to index the terpene profile of different strains of Cannabis from online databases

Terpene Profile Parser for Cannabis Strains

Parser, Database and Web App to index the Terpene Profile of different Strains Of Cannabis from Online-Databases

Description

This repository contains:

  • The web app (at docs/index.html). Live version
  • A folder for each online database which displays test results about the terpene profile of cannabis strains (Found in labs/). These folders usually contain:
    • A parser to extract the actual terpene profile from each of those HTML-pages as CSV-list
    • The CSV list of extracted terpene profiles

FAQ

What are Terpenes? What is a Terpene?

A terpene is a chemical compound which can have physiological effects on the human body. It can make you sleepy, horny, awake, more concentrated, relaxed or less anxious. Read more on Wikipedia. This lab page has some information which is also useful.

What is a Terpene Profile?

A terpene profile is a listing of terpenes present in a biological sample. This project is only concerned with specific terpenes such as Linalool, Caryophyllene oxide, Myrcene, beta-Pinene, Limonene, Terpinolene, alpha-Pinene, Humulene and Caryophyllene, but Linalool, beta-Pinene, Limonene, alpha-Pinene are the most important ones. Also we are only interested in the terpene profile of strains from the species Cannabis sativa.

What is a cannabis strain? What is a strain?

A strain is like a dog breed. As dogs all belong to the same species, but can look really different to each other, we distinguish them by breed. This is the same for Cannabis: There are several "breeds" and each one of them has different effects on the human physiology/psyche. Also strains/breeds were emphasized by humans, not by nature.

So what is this all about? What sense makes all of this?

Research suggests that Cannabis sativa can (in the right circumstances) have positive (reduce/cure depression/anxiety, improve concentration, help with sleep problems) effects on the human body. The thing is: Each strain acts differently on the body and we do not know which acts in what way, because the plant is illegal in most countries currently. This results in a lot of incorrect information spreading about which strain acts in what way and even which plant is actually belonging to a specific strain. This produces a number of problems: Many samples are therefore labelled incorrectly, many samples weren't raised under controlled lab conditions which produces very varying results and the devices for testing the samples are somewhat (really) expensive.

The good part is that in some countries it is not illegal or at least legal enough to conduct scientific research on it. Some of those research institutions (or labs) publish their chemical analysis results of the different samples online. This data is not really machine readable (to analyse it further) but it can be extracted using modern web crawling. By building statistical models we can filter away the incorrect data from the differing growing conditions of the samples. In the future a sort-of search engine is planned to search by terpene profile which gives you a sorted list of fitting strains.

How to use

You are probably interested in the web app. Launch it here. If you are paranoid, you can also launch it locally: just clone/download the repo. Or save the web app in one browser and view it offline later. For the explanation of the sample data for each lab, see the regarding folders' README.md file for instructions.

Development

You will need to create a virtual Python environment. Go to the project root and run:

source setup_project_environment.sh

This installs Python3.9 and sets up a virtual environment in the project root.

Web App

Before you commit:

  1. Update version string in the index.html.
  2. Update version string in the cache.manifest.

Parsers

Before you commit:

  • If you changed the parsed data, also regenerate the web app db.js:
    • rm docs/db.js
    • ./make_databaseContainer.py --results results.csv --ignore analytical360 --components active_components.json --sample-types sample_types.json --outfile docs/db.js

How to contribute

Let me know if:

  • I missed some data
  • There is an online lab/database i haven't noticed
  • The scientific information to explain the project is wrong

As with all those points: Please provide sources/proofs that your information (query, link, scientifc sources) is more valid than the present one.

Project history

The idea for this project comes from Paul Fuxjäger who wants to find high quality medical cannabis for new health treatment options. The code for extracting and cleaning the data was written by Max Fuxjäger. The development (issues) has been moved to GitLab but the old GitHub remote is kept to avoid braking links to this project.

Copyright

Have fun. We hope you can use this data to do good for humanity.

More Repositories

1

Lumos-Tempum

a daemon to use your smart lights as aid for your circadian rhythm
Python
5
star
2

Minecraft-Snippets

various commands and templates thereof
2
star
3

Strudler

WIP. This will change much in the future.
CSS
2
star
4

Better-Photoview

a test to replace the default photo viewer on windows. support for gif and svg!
Batchfile
2
star
5

Ad-Filters

Various custom ad-blocking filters with focus on Austrian websites. Tested for use with AdNauseam.
1
star
6

Blinkenschild-2.0

Now even more blinky.
HTML
1
star
7

Benjamin-learns-Programming

This project was made for my nephew Benjamin who asked me to teach him programming.
Java
1
star
8

Minecraft-CAF

Optimise old, current and upcoming versions of Minecraft.
1
star
9

Project-Boilerplate

A set of files and instructions to help setting up new projects.
Python
1
star
10

Dead-Link-Spider

Find dead links, optimized for maintenance work on wikis.
Python
1
star
11

Processing-Snippets

a bunch of processing code snippets and capability tests
Processing
1
star
12

Progressive-Web-App-Boilerplate

Get up and running with PWAs by using this convenient boilerplate.
1
star
13

Greasemonkey

A collection of Greasemonkey userscripts.
JavaScript
1
star
14

APIs-for-ComputerCraft

Some additional, as well as improved APIs
Lua
1
star
15

9ReplyGuys

a website to help with linking to the tweets explaining the 9 types of reply guys, saving valuable time
1
star
16

KEM-Contacts

Get all metadata about the Klima- und Energieregionen from https://www.klimaundenergiemodellregionen.at/modellregionen/liste-der-regionen/
Python
1
star
17

Computer-Setup

Scripts to set up my computers with a double-click.
1
star
18

Terpene-Parser-Testing

test repo for the terpene parser project
1
star
19

ansible-role-borgbackup_ftp

Perform borgbackup backups of FTP directories
1
star
20

Bookmarks-Patcher

Updates the URLs of your bookmarks. Useful if a site changed its domain.
HTML
1
star
21

ansible-role-borgbackup_outline

Perform borgbackup backups of getoutline.com instances
1
star
22

IsJavascriptWorking

test if your damn browser has JS enabled
HTML
1
star
23

GitHub-Pages-site.github.url-Bug

test repository demonstrating the bug
Ruby
1
star
24

Python-Tools

a collection of python scripts which ease command-line work
Python
1
star
25

Monitor-Spider

web crawler to monitor web pages for changes
1
star