Changelog e3410d3
more details for subunits
4 files of code, design or docs +182 −28 lines
Code, design and documents 4 files
src/components/CountryArticle.astro +28 −15
@@ -61,19 +61,30 @@ const circ = 2 * Math.PI * r; <h2 class="d-h">Score breakdown <span>▏world average</span></h2> {sub - ? <p class="d-hint">{group.intro} Segment-by-segment explanations are written at national level — <a href={countryUrl} data-subunit>see {c.name}</a>.</p> + ? <p class="d-hint">{group.intro} Select a segment to show or hide the rules.</p> : <p class="d-hint">Select a segment to show or hide the exact rules and sources.{d && ` Reviewed ${d.reviewed}.`}</p>} {sub && SEGMENTS.map((s, i) => ( - <div class="segrow"> - <div class="segrow-top"> - <span>{s.name} <small>· {s.weight}%</small></span> - <b>{sub.s[i]}/10 <small class="vs">{c.name}: {c.s[i]}</small></b> - </div> - <div class="bar" title={`World average ${segAvg[i].toFixed(1)}/10`}> - <i style={`width:${sub.s[i] * 10}%;background:${tierColor(sub.s[i] * 10)}`}></i> - <span class="avg-tick" style={`left:calc(${segAvg[i] * 10}% - 1px)`}></span> - </div> - <div class="pts">adds {segmentPoints(i, sub.s[i]).toFixed(1)} of {segmentMax(i).toFixed(0)} points</div> - </div> + <details class="segrow" open> + <summary> + <div class="segrow-top"> + <span>{s.name} <small>· {s.weight}%</small></span> + <b>{sub.s[i]}/10 <small class="vs">{c.name}: {c.s[i]}</small><i class="chev" aria-hidden="true"></i></b> + </div> + <div class="bar" title={`World average ${segAvg[i].toFixed(1)}/10`}> + <i style={`width:${sub.s[i] * 10}%;background:${tierColor(sub.s[i] * 10)}`}></i> + <span class="avg-tick" style={`left:calc(${segAvg[i] * 10}% - 1px)`}></span> + </div> + <div class="pts">adds {segmentPoints(i, sub.s[i]).toFixed(1)} of {segmentMax(i).toFixed(0)} points</div> + </summary> + {sub.seg && <div class="why"><p>{sub.seg[i]}</p></div>} + </details> ))} + {sub && ( + <section class="c-unit-sources"> + <h2 class="d-h">Sources</h2> + <ul class="srcs"> + {sub.sources.map(([label, url]) => <li><a href={url} target="_blank" rel="noopener noreferrer">{label}</a></li>)} + </ul> + </section> + )} {!sub && SEGMENTS.map((s, i) => { const seg = d?.seg[s.detail]; @@ -121,7 +132,9 @@ const circ = 2 * Math.PI * r; ))} </ol> - <ul class="srcs"> - {group.sources.map(([label, url]) => <li><a href={url} target="_blank" rel="noopener noreferrer">{label}</a></li>)} - </ul> + {!sub && ( + <ul class="srcs"> + {group.sources.map(([label, url]) => <li><a href={url} target="_blank" rel="noopener noreferrer">{label}</a></li>)} + </ul> + )} </section> )}
src/data/subunit-details.js +134 −0
@@ -0,0 +1,134 @@ +/* Cannabis Freedom Index — explanations for states, provinces and territories + * + * SUBUNIT_DETAILS[countryId][unitId] = six short explanations, in SEGMENTS order: + * [possession, cultivation, enforcement, sharing, consumption, access] + * + * US penalties follow NORML's state pages (linked per state as the source). Canadian rules + * follow Health Canada's province table; Australian rules follow the state-by-state summary + * in Wikipedia's "Cannabis in Australia". Not legal advice. + */ + +const US = { + al: ["Possession of any amount for personal use is a misdemeanour with up to a year in jail and a $6,000 fine. With a prior conviction it becomes a felony.", "Growing is charged as manufacturing, a felony with 2 to 20 years.", "Jail is a real possibility for a first offence, and a repeat offence is a felony.", "Any sale or transfer is a felony with a two-year mandatory minimum.", "Use is illegal everywhere.", "No legal source. A 2021 medical law has yet to deliver products because of licensing disputes."], + ak: ["Adults 21+ may hold 1 oz with no penalty, and up to 4 oz inside their own home. Between 1 and 4 oz outside the home is a misdemeanour; 4 oz or more is a felony.", "Six plants per adult, no more than three mature, and up to twelve per dwelling.", "Nothing within the limits. Selling under 1 oz without a licence is a misdemeanour with up to a year.", "Adults may give each other up to 1 oz; any unlicensed sale is a crime.", "Private use, plus on-site consumption at shops holding a special endorsement.", "Licensed shops since 2016."], + az: ["1 oz is legal. Between 1 and 2.5 oz is a petty offence with a $300 fine; more than 2.5 oz is a felony.", "Six plants per adult, twelve per household.", "Nothing within the limits, but the jump above 2.5 oz is steep: a felony with months in prison.", "Transfers of up to 1 oz between adults without payment are legal.", "Private only; smoking in public is a petty offence.", "Licensed shops since 2021."], + ar: ["Under 4 oz is a misdemeanour with up to a year in jail and a $2,500 fine for a first offence; a repeat offence with over 1 oz is a felony.", "Illegal, and medical patients may not grow either.", "Jail is possible; fines and probation are typical for a first offence.", "Any delivery is a crime, graded by weight.", "Illegal without a medical card.", "Medical dispensaries for registered patients only."], + ca: ["Adults 21+ may hold 28.5 g of flower and 8 g of concentrate.", "Six plants per household. More than six is a misdemeanour with up to six months.", "Among the mildest in the country: most personal offences beyond the limits are infractions or misdemeanours.", "Gifts of up to 28.5 g between adults are legal.", "Private use and licensed consumption lounges; smoking in public is a $100 infraction.", "Licensed shops and delivery, although many cities and counties ban sales."], + co: ["2 oz is legal. Slightly more is a petty offence; over 3 oz is a misdemeanour.", "Six plants per adult, three of them flowering. More than six is a felony.", "Nothing within the limits; open public use is a $100 petty offence.", "Transfers of up to 2 oz without payment are legal.", "Private use, plus licensed hospitality venues in some cities.", "Licensed shops since 2014, the first in the country."], + ct: ["1.5 oz on your person and up to 5 oz in a locked container or at home. More than 5 oz is a $500 civil infraction on a first offence.", "Six plants per adult (three mature), twelve per household. Going over brings a written warning first.", "Nothing within the limits; small overages are warnings or civil fines.", "Adults may give cannabis to other adults within the possession limit.", "Private use; towns may restrict or designate public areas.", "Licensed shops since 2023."], + de: ["1 oz is legal. From 1 oz to 175 g is a misdemeanour with up to three months; more is a felony.", "Not allowed: home growing remains a crime.", "Nothing within the limit, but amounts above it escalate quickly to felonies.", "Adults may give each other up to 1 oz without payment.", "Private only.", "Licensed shops opened in August 2025."], + dc: ["2 oz is legal. More is a misdemeanour with up to six months.", "Six plants per adult, three mature.", "Nothing within the limits; public use is handled by citation.", "Gifts of up to 1 oz between adults are legal.", "Private only, and federal land — a large part of the city — is off-limits entirely.", "No licensed adult-use shops, because Congress blocks them. Adults can self-certify as medical patients and buy from dispensaries."], + fl: ["20 g or less is a misdemeanour with up to a year in jail and a $1,000 fine. More than 20 g is a felony with up to five years.", "A felony.", "Jail is possible for small amounts; several counties and cities issue civil citations instead.", "Giving 20 g or less without payment is a misdemeanour; any sale is a felony.", "Illegal without a medical card; patients may not smoke in public.", "A large medical programme with dispensaries statewide. A 2024 ballot measure to legalise won 56% but needed 60%."], + ga: ["1 oz or less is a misdemeanour with up to a year and a $1,000 fine. More than 1 oz is a felony with one to ten years.", "A felony with one to ten years.", "Jail is possible; Atlanta, Savannah and other cities fine small possession instead.", "Any sale is a felony with a one-year minimum.", "Illegal.", "Only low-THC oil for registered patients, through a few licensed dispensaries."], + hi: ["Up to 3 g is a $130 violation. From 3 g to 1 oz is a petty misdemeanour with up to 30 days; 1 oz or more is a misdemeanour with up to a year.", "Illegal outside the medical programme; registered patients may grow a limited number of plants.", "A fine for tiny amounts, jail possible above 3 g.", "Selling under 1 oz is a misdemeanour with up to a year.", "Illegal without a medical card.", "Medical dispensaries for card holders, including visiting patients."], + id: ["3 oz or less is a misdemeanour with up to a year in jail and a $1,000 fine. More is a felony with up to five years.", "A felony with up to five years, for any number of plants.", "No decriminalisation, diversion or medical exception in state law.", "A felony with up to five years.", "Illegal.", "None. Even CBD products must contain no THC at all."], + il: ["Residents may hold 30 g of flower, visitors half that. From 30 to 100 g is a misdemeanour on a first offence.", "Only registered medical patients may grow, up to five plants. For anyone else five plants or fewer is a $200 civil violation; more is a felony.", "Nothing within the limits.", "The law has no clear allowance for gifts: delivering even 2.5 g outside the licensed system is a misdemeanour.", "Private only, with licensed consumption lounges in a few towns.", "Licensed shops since 2020, with some of the highest taxes in the country."], + in: ["Any amount is a misdemeanour with up to 180 days and a $1,000 fine. With a prior drug offence it rises to a year, or a felony for 30 g or more.", "Illegal; charged like possession for small grows and as a felony for larger ones.", "Jail is possible for a first offence.", "Selling under 30 g is a misdemeanour with up to a year.", "Illegal.", "None. Only CBD with under 0.3% THC is legal."], + ia: ["A first offence is a misdemeanour with up to six months and a $1,000 fine; a second, up to a year; a third, up to two years.", "A felony with up to five years.", "Jail is possible; chronic users may be sent to treatment instead.", "Sale is a felony.", "Illegal.", "A narrow medical cannabidiol programme with a cap on THC per patient; no flower."], + ks: ["Any amount is a misdemeanour with up to six months and a $1,000 fine.", "More than four plants is a felony with several years.", "Jail is possible for a first offence; penalties rise for repeat offences.", "Selling under 25 g is a felony.", "Illegal.", "None. Only CBD with 0% THC is legal."], + ky: ["Less than 8 oz is a misdemeanour capped at 45 days in jail and a $250 fine.", "Fewer than five plants is a misdemeanour with up to a year on a first offence; five or more is a felony.", "Short jail terms are possible; many counties cite and release.", "Selling under 8 oz is a misdemeanour with up to a year on a first offence.", "Illegal.", "A medical programme since January 2025, limited to non-smokable products."], + la: ["14 g or less is a $100 fine with no possibility of jail. More than 14 g is a misdemeanour with up to six months.", "Illegal; charged as production.", "A fine only for small amounts.", "Distribution carries one to ten years.", "Illegal.", "Medical cannabis, including flower, through licensed pharmacies on a doctor's recommendation."], + me: ["2.5 oz is legal. From 2.5 to 8 oz is a crime with up to six months.", "Three mature plants and twelve immature ones per adult.", "Nothing within the limits.", "Adults may share up to 2.5 oz without payment.", "Private only.", "Licensed shops since 2020, in towns that have opted in, alongside a long-standing medical caregiver market."], + md: ["1.5 oz is legal. From 1.5 to 2.5 oz is a $250 civil offence.", "Two plants per household. More is a misdemeanour with up to three years.", "Nothing within the limits; small overages are civil fines.", "Adult sharing of up to 1.5 oz is legal.", "Private only; public consumption is a $250 civil fine.", "Licensed shops since July 2023."], + ma: ["1 oz in public and 10 oz at home. More than 1 oz in public is a misdemeanour.", "Six plants per adult, twelve per household. Plants visible from a public place bring a $300 civil penalty.", "Nothing within the limits.", "Gifts of up to 1 oz between adults are legal.", "Private only; social consumption sites have been approved in principle.", "Licensed shops since 2018; towns can ban them."], + mi: ["2.5 oz on your person and 10 oz at home. From 2.5 to 5 oz is a $500 civil infraction.", "Twelve plants per household.", "Overages are civil infractions at first, not crimes.", "Up to 2.5 oz may be given away without payment.", "Private use, plus licensed consumption lounges.", "Licensed shops since December 2019, with some of the lowest prices in the country."], + mn: ["2 oz in public and 2 lb at home. From 2 to 4 oz in public is a $300 petty misdemeanour.", "Eight plants per residence, four of them mature. Up to sixteen is a civil penalty.", "Nothing within the limits; small overages are petty offences.", "Gifts of up to 2 oz, 8 g of concentrate or 800 mg of edibles are legal.", "Private property and licensed events; not in vehicles or where smoking is banned.", "Tribal dispensaries from 2023 and state-licensed shops from 2025."], + ms: ["A first offence with 30 g or less is a fine of up to $250 with no jail. A second brings 5 to 60 days. More than 30 g is a felony.", "A felony.", "A fine only for a first small offence, but jail from the second.", "Selling up to 30 g is a felony with up to three years.", "Illegal.", "Medical dispensaries for card holders."], + mo: ["3 oz is legal.", "Six flowering plants, but only with a state registration card.", "Nothing within the limits.", "Adults may give each other up to 3 oz without payment.", "Private only.", "Licensed shops since February 2023."], + mt: ["1 oz is legal. From 1 to 2 oz is a $200 civil infraction; more than 2 oz is a felony with up to five years.", "Two mature plants and two seedlings per adult.", "Nothing within the limits, but a steep jump to a felony above 2 oz.", "Transfers of up to 1 oz without compensation are legal.", "Private only.", "Licensed shops in counties that voted for legalisation."], + ne: ["A first offence with 1 oz or less is a $300 infraction. A second brings up to five days in jail, a third up to seven.", "Illegal; charged as manufacturing.", "A fine for a first offence, short jail terms after that.", "Any sale is a felony with up to twenty years.", "Illegal.", "Voters approved medical cannabis in November 2024; the regulated programme is still being set up."], + nv: ["2.5 oz is legal. More is a misdemeanour with a $600 fine.", "Allowed only if you live more than 25 miles from a licensed shop. Twelve plants or more is a felony.", "Nothing within the limits.", "Gifts of up to 1 oz of flower or 1/8 oz of concentrate are legal.", "Private use and licensed lounges; public use is a misdemeanour with a $600 fine.", "Licensed shops since 2017."], + nh: ["Up to ¾ oz is a $100 civil violation for a first or second offence. More is a misdemeanour with up to a year.", "Illegal.", "A fine only for small amounts.", "Selling under 1 oz is a felony with up to three years.", "Illegal.", "Therapeutic cannabis centres for registered patients. The only New England state without legal sales."], + nj: ["Up to 6 oz is legal. More is a crime with up to 18 months.", "Not allowed. Growing even a few plants is a crime with three to five years.", "Nothing within the limit, but home growing is still heavily punished.", "Giving less than 1 oz without payment is legal.", "Private only; licensed consumption areas are authorised.", "Licensed shops since April 2022."], + nm: ["2 oz in public and no limit at home. From 2 to 8 oz in public is a misdemeanour.", "Six mature plants per adult, twelve per household. More is a felony.", "Nothing within the limits.", "Adults may give each other up to 2 oz.", "Private use and licensed consumption areas.", "Licensed shops since April 2022."], + ny: ["3 oz on your person and 5 lb at home. From 3 to 16 oz is a $150 violation.", "Six plants per adult, three of them mature.", "Mild: overages are violations before they become misdemeanours.", "Up to 3 oz, or 24 g of concentrate, may be given away without compensation.", "Allowed almost anywhere tobacco smoking is.", "Licensed shops since December 2022, after a slow rollout."], + nc: ["½ oz or less is a misdemeanour punished by a fine of up to $200 with no jail. From ½ to 1.5 oz brings up to 120 days; more is a felony.", "A felony.", "A fine only for the smallest amounts.", "Any sale is a felony.", "Illegal.", "None under state law. A dispensary on Eastern Band of Cherokee land sells to adults under tribal law."], + nd: ["Less than ½ oz is a criminal infraction with a fine of up to $1,000 and no jail. More is a misdemeanour with up to 30 days.", "Illegal; charged as manufacturing.", "A fine for small amounts.", "Any sale is a felony with up to five years.", "Ingesting cannabis is itself a misdemeanour with up to 30 days.", "Medical dispensaries for card holders. Voters rejected legalisation in 2018, 2022 and 2024."], + oh: ["Up to 2.5 oz (70 g) is legal. From 70 to 100 g is a minor misdemeanour with a $150 fine.", "Six plants per adult, twelve per household.", "Nothing within the limits.", "Adults may transfer up to 2.5 oz to other adults without payment.", "Private only; lawmakers tightened the rules on public use in 2025.", "Licensed shops since August 2024."], + ok: ["Without a medical card, any amount is a misdemeanour with up to a year and a $1,000 fine.", "Registered patients may grow six mature plants and six seedlings. For others it is a felony.", "Jail is possible for non-patients, though uncommon for small amounts.", "Sale carries two years to life.", "Illegal without a card.", "Medical only, but the programme has no list of qualifying conditions and dispensaries are everywhere."], + or: ["2 oz in public and 8 oz at home.", "Four plants per household. From four to eight is a misdemeanour.", "Nothing within the limits.", "Adults may give each other cannabis within the possession limits without payment.", "Private only.", "Licensed shops since 2015, with some of the lowest prices in the country."], + pa: ["30 g or less is a misdemeanour with up to 30 days and a $500 fine; a first conviction is eligible for conditional release. More is a misdemeanour with up to a year.", "Any number of plants is a felony with 2.5 to 5 years.", "Short jail terms are possible; Philadelphia, Pittsburgh and other cities issue small fines instead.", "Giving 30 g or less without payment is a misdemeanour with up to 30 days.", "Illegal without a medical card.", "A large medical programme with dispensaries statewide."], + ri: ["1 oz in public and 10 oz at home. More than 1 oz is a misdemeanour with up to a year.", "Three mature and three immature plants.", "Nothing within the limits.", "Adults may give each other up to 1 oz.", "Generally treated like tobacco smoking, subject to local restrictions.", "Licensed shops since December 2022."], + sc: ["A first offence with 1 oz or less is a misdemeanour with up to 30 days and a $200 fine; later offences bring up to a year. More than 1 oz is a felony.", "A felony with up to five years.", "Jail is possible for a first offence.", "Sale is a felony with up to five years.", "Illegal.", "None."], + sd: ["2 oz or less is a misdemeanour with up to a year and a $2,000 fine. More is a felony.", "Illegal; registered patients may grow a small number of plants.", "Jail is possible.", "Giving under ½ oz without payment is a misdemeanour with a 15-day minimum.", "Ingesting cannabis is itself an offence.", "Medical dispensaries for card holders."], + tn: ["½ oz or less is a misdemeanour with up to a year in jail.", "Ten plants or fewer is a felony with one to six years.", "Jail is possible for a first offence.", "Selling ½ oz or more is a felony.", "Illegal.", "None. Low-THC oil may be possessed by some patients but there is no in-state source."], + tx: ["2 oz or less is a misdemeanour with up to 180 days and a $2,000 fine. Any amount of concentrate is a felony.", "Charged by weight, like possession.", "Jail is possible; Austin, Dallas and several other places no longer arrest for small amounts.", "Giving 7 g or less without payment is a misdemeanour with up to 180 days.", "Illegal.", "A restricted low-THC medical programme, widened in 2025. Hemp-derived THC products are sold widely in a legal grey zone."], + ut: ["Under 1 oz is a misdemeanour with up to six months and a $1,000 fine.", "Illegal.", "Jail is possible.", "Any sale is a felony with up to five years.", "Illegal without a medical card; patients may not smoke it.", "Medical cannabis through licensed pharmacies for card holders."], + vt: ["Small amounts are legal — NORML lists up to 2 oz with no penalty. Larger amounts are a felony with up to three years.", "Two mature and four immature plants per household.", "Nothing within the limits, but a steep jump above them.", "Selling under ½ oz without a licence is a misdemeanour; small gifts between adults are tolerated.", "Private only.", "Licensed shops since October 2022."], + va: ["Legal at home and in small amounts in public; slightly larger amounts bring only a $25 civil penalty, and over 4 oz in public is a misdemeanour.", "Four plants per household, tagged and out of public view.", "Among the mildest penalties for small overages anywhere in the country.", "Adults may share up to 1 oz without payment.", "Private only.", "No adult-use shops: bills to license them were vetoed. Medical dispensaries are the only legal place to buy."], + wa: ["1 oz is legal. From 1 oz to 40 g is a misdemeanour with a 24-hour mandatory minimum; more than 40 g is a felony.", "Any amount is a felony unless you are a registered medical patient.", "Nothing within the limit, but small overages mean jail time.", "Adults may share small amounts without payment; any sale outside a licensed shop is a felony.", "Private only; public consumption is a $50 civil penalty.", "Licensed shops since 2014."], + wv: ["Any amount is a misdemeanour with 90 days to six months and a $1,000 fine. A first offence under 15 g gets a conditional discharge.", "A felony.", "Jail is on the books, with a way out for first offences.", "Any sale is a felony with one to five years.", "Illegal without a medical card.", "Medical dispensaries for card holders; no smoking of flower."], + wi: ["A first offence is a misdemeanour with up to six months and a $1,000 fine. A second is a felony with up to 3.5 years.", "Four plants or fewer is a felony with up to 3.5 years.", "Jail is possible; Madison and Milwaukee impose only small fines.", "Selling 200 g or less is a felony.", "Illegal.", "None, while three neighbouring states have legal shops."], + wy: ["3 oz or less is a misdemeanour with up to 12 months and a $1,000 fine. More is a felony.", "A misdemeanour with up to six months.", "Jail is possible for a first offence.", "Any sale is a felony with up to ten years.", "Being under the influence is itself a misdemeanour with up to six months.", "None."], +}; + +// Canada: the federal Cannabis Act sets most rules; provinces vary the rest. +const caBase = (age) => [ + `The federal limit applies: adults ${age}+ may carry 30 g of dried cannabis, or its equivalent, in public. There is no provincial cap at home.`, + "Four plants per residence, as federal law allows.", + "Nothing within the limits. Provincial offences, such as consuming in the wrong place, are ticketed; unlicensed selling is a federal crime with up to 14 years.", + "Adults may share up to 30 g with other adults.", +]; +const ca = (age, consumption, access, overrides = {}) => { + const seg = [...caBase(age), consumption, access]; + Object.entries(overrides).forEach(([i, text]) => (seg[i] = text)); + return seg; +}; +const PRIVATE_ONLY = "Private residences only; consumption in public places is prohibited."; +const LIKE_TOBACCO = "Allowed in most places where tobacco smoking is, but not near children, in vehicles or where local by-laws forbid it."; +const CA = { + ab: ca(18, LIKE_TOBACCO, "Private licensed shops and online sales. The minimum age of 18 is the lowest in Canada."), + bc: ca(19, LIKE_TOBACCO, "Government-run and private licensed shops, in person and online."), + mb: ca(19, PRIVATE_ONLY, "Private licensed shops and online sales.", { 1: "Four plants per residence since May 2025; before that the province banned home growing." }), + nb: ca(19, PRIVATE_ONLY, "Government-operated Cannabis NB shops and online sales."), + nl: ca(19, PRIVATE_ONLY, "Government and private licensed shops, in person and online."), + ns: ca(19, "Follows tobacco rules: allowed where smoking is, with municipal restrictions.", "Government-operated shops run by the provincial liquor corporation, and online."), + nt: ca(19, "Allowed on private property and in some public places; communities may restrict it.", "Government-operated shops and online sales; communities may hold votes to restrict cannabis."), + nu: ca(19, PRIVATE_ONLY, "Private licensed shops and online sales."), + on: ca(19, LIKE_TOBACCO, "The provincial online store and the largest private retail network in the country."), + pe: ca(19, PRIVATE_ONLY, "Government-operated shops and online sales only."), + qc: ca(21, "Prohibited in all public places, indoors and out.", "Only through the state-run SQDC, with a narrower product range: many edibles and high-THC products are not sold.", { + 0: "30 g in public and a provincial cap of 150 g at home. The minimum age is 21, the highest in Canada.", + 1: "Prohibited by provincial law, with fines for growing even one plant. The Supreme Court of Canada upheld the ban in 2023.", + }), + sk: ca(19, PRIVATE_ONLY, "Private licensed shops and online sales."), + yt: ca(19, PRIVATE_ONLY, "Private licensed shops and online sales."), +}; + +const AU_MED = "No shops. Medical cannabis is available on prescription, mostly through telehealth clinics."; +const AU = { + act: ["Since 31 January 2020 adults may possess up to 50 g of dried cannabis, or 150 g fresh.", "Two plants per adult, at most four per household. Hydroponic growing is not allowed.", "Nothing within the limits. Federal law technically still applies, though it has not been enforced against personal use.", "Not allowed: giving cannabis to anyone else remains an offence.", "At home only; not in public or near children.", "No legal way to buy cannabis or even seeds. Medical cannabis is available on prescription."], + nsw: ["Illegal. Police may issue a caution for up to 15 g, for a first or second offence; otherwise the maximum is a $2,200 fine and two years in prison.", "Illegal: up to $11,000 and two years even for small numbers of plants.", "Cautions at police discretion, criminal charges otherwise.", "Supply is an offence.", "Illegal; covered by the same cautioning scheme.", AU_MED], + nt: ["Decriminalised: up to 50 g is an infringement with a fine of up to $200. More than 50 g, or possession in a public place, carries up to two years.", "Two non-hydroponic plants bring a $200 fine rather than a charge.", "A fine for small amounts kept at home.", "Supply is an offence.", "A fine at home; an offence in public.", AU_MED], + qld: ["Illegal. Police offer diversion instead of a charge for small amounts — under 50 g — and the scheme was widened in 2024. Outside it, maximum penalties are very high.", "Illegal, with the same heavy maximums as possession.", "Diversion for small amounts; severe penalties on paper beyond that.", "Supply is an offence.", "Illegal; covered by the diversion scheme.", AU_MED], + sa: ["Illegal, but up to 100 g is dealt with by an expiation notice — a fine of around $150 — rather than a charge. More than 100 g carries up to $2,000 and two years.", "One non-hydroponic plant is an expiation fine.", "Fines rather than charges for small amounts, under Australia's oldest decriminalisation scheme (1987).", "Supply is an offence.", "A fine in private; public use is treated more seriously.", AU_MED], + tas: ["Illegal. Police may divert a person for up to 50 g, for their first three offences; otherwise up to $7,950 and two years.", "Illegal.", "Cautions and diversion at police discretion.", "Supply is an offence.", "Illegal; covered by the diversion scheme.", AU_MED], + vic: ["Illegal. A caution is available for 50 g or less on a first or second offence; otherwise up to $2,200 and two years.", "Illegal.", "Cautions at police discretion, criminal charges otherwise.", "Supply is an offence.", "Illegal; covered by the cautioning scheme.", AU_MED], + wa: ["Illegal. Up to 10 g leads to a Cannabis Intervention Requirement — a one-off counselling session — instead of a charge. From 10 to 100 g carries up to $2,000 and two years. An earlier infringement-notice scheme was repealed in 2011.", "Illegal.", "One chance at counselling for tiny amounts; criminal charges otherwise.", "Supply is an offence.", "Illegal.", AU_MED], +}; + +export const SUBUNIT_DETAILS = { US, CA, AU }; + +// One specific source per unit, shown above the country-wide sources. +const wiki = (page, label) => [`Wikipedia — Cannabis in ${label}`, `https://en.wikipedia.org/wiki/Cannabis_in_${page}`]; +const CA_WIKI = { + ab: ["Alberta", "Alberta"], bc: ["British_Columbia", "British Columbia"], mb: ["Manitoba", "Manitoba"], + nb: ["New_Brunswick", "New Brunswick"], nl: ["Newfoundland_and_Labrador", "Newfoundland and Labrador"], + ns: ["Nova_Scotia", "Nova Scotia"], nt: ["the_Northwest_Territories", "the Northwest Territories"], + nu: ["Nunavut", "Nunavut"], on: ["Ontario", "Ontario"], pe: ["Prince_Edward_Island", "Prince Edward Island"], + qc: ["Quebec", "Quebec"], sk: ["Saskatchewan", "Saskatchewan"], yt: ["Yukon", "Yukon"], +}; + +// NORML's state pages end in "-penalties" or "-penalties-2"; these are the ones using the latter. +const NORML_PAGE_2 = new Set(["indiana", "iowa", "kansas", "kentucky", "louisiana", "maine", "maryland", "massachusetts", "michigan", "minnesota", "mississippi", "missouri", "montana", "nebraska", "nevada", "new-hampshire", "new-jersey", "new-mexico", "new-york", "north-carolina", "north-dakota", "ohio", "oklahoma", "oregon", "pennsylvania", "rhode-island", "south-carolina", "south-dakota", "tennessee", "texas", "utah", "vermont", "virginia", "washington", "west-virginia", "wisconsin", "wyoming"]); + +export function unitSource(countryId, unit) { + if (countryId === "US") { + const slug = unit.name.toLowerCase().replace(/ /g, "-"); + const suffix = NORML_PAGE_2.has(slug) ? "penalties-2" : "penalties"; + return [`NORML — ${unit.name} laws and penalties`, `https://norml.org/laws/${slug}-${suffix}/`]; + } + if (countryId === "CA" && CA_WIKI[unit.id]) return wiki(...CA_WIKI[unit.id]); + if (countryId === "AU" && unit.id === "act") return wiki("the_Australian_Capital_Territory", "the Australian Capital Territory"); + return null; +}
src/data/subunits.js +12 −12
@@ -6,5 +6,5 @@ * * The home-page ranking and map still use the single national estimate in data.js. - * Units have a short note rather than a full segment-by-segment write-up. + * Segment-by-segment explanations for each unit live in subunit-details.js. * Scores are editorial estimates, not legal advice. */ @@ -35,5 +35,5 @@ export const SUBUNITS = { u("hi", "Hawaii", [2, 1, 3, 1, 1, 3], "decrim", "yes", "Up to 3 g is a $130 violation; more is a misdemeanour. Medical cannabis is dispensed to card holders, who may also grow."), u("id", "Idaho", [1, 0, 1, 0, 1, 0], "illegal", "no", "No medical programme and no decriminalisation: under 3 oz is a misdemeanour with up to a year in jail and a mandatory minimum fine."), - u("il", "Illinois", [5, 2, 6, 5, 3, 6], "legal", "yes", "Residents may hold 30 g. Only medical patients may grow (five plants); for others a few plants is a $200 civil fine. Licensed shops since 2020."), + u("il", "Illinois", [5, 2, 6, 2, 3, 6], "legal", "yes", "Residents may hold 30 g. Only medical patients may grow (five plants); for others a few plants is a $200 civil fine. Licensed shops since 2020."), u("in", "Indiana", [1, 0, 2, 0, 1, 0], "illegal", "no", "Possession is a misdemeanour with up to 180 days in jail. No medical programme."), u("ia", "Iowa", [1, 0, 2, 0, 1, 1], "illegal", "limited", "A first offence carries up to six months in jail. A narrow medical programme caps THC per patient."), @@ -56,10 +56,10 @@ export const SUBUNITS = { u("ny", "New York", [6, 4, 6, 5, 6, 6], "legal", "yes", "3 oz on you and 5 lb at home; six plants per adult. Uniquely, smoking cannabis is allowed almost anywhere tobacco smoking is."), u("nc", "North Carolina", [2, 1, 3, 1, 1, 0], "decrim", "no", "Up to ½ oz is a misdemeanour punished by a fine of up to $200 with no jail. No medical programme; the only legal shop is on Cherokee tribal land."), - u("nd", "North Dakota", [2, 1, 3, 1, 1, 3], "decrim", "yes", "Up to ½ oz is an infraction with a fine. Medical cannabis is available; voters rejected legalisation in 2018, 2022 and 2024."), + u("nd", "North Dakota", [2, 1, 3, 1, 0, 3], "decrim", "yes", "Up to ½ oz is an infraction with a fine. Medical cannabis is available; voters rejected legalisation in 2018, 2022 and 2024."), u("oh", "Ohio", [5, 4, 6, 5, 3, 6], "legal", "yes", "2.5 oz and six plants per adult, twelve per household. Licensed shops since August 2024; lawmakers have since tightened rules on public use."), u("ok", "Oklahoma", [1, 1, 2, 1, 1, 3], "illegal", "yes", "Without a card, possession is a misdemeanour. But the medical programme has no list of qualifying conditions and is among the easiest to join; patients may grow six mature plants."), u("or", "Oregon", [6, 4, 6, 5, 3, 6], "legal", "yes", "2 oz in public and 8 oz at home; four plants per household. Licensed shops since 2015."), u("pa", "Pennsylvania", [1, 1, 2, 1, 1, 3], "illegal", "yes", "30 g or less is a misdemeanour with up to 30 days in jail, cut to a small fine in Philadelphia, Pittsburgh and other cities. A large medical programme operates."), - u("ri", "Rhode Island", [6, 4, 6, 5, 3, 6], "legal", "yes", "1 oz in public and 10 oz at home; three mature plants. Licensed shops since December 2022."), + u("ri", "Rhode Island", [6, 4, 6, 5, 4, 6], "legal", "yes", "1 oz in public and 10 oz at home; three mature plants. Licensed shops since December 2022."), u("sc", "South Carolina", [1, 0, 2, 0, 1, 0], "illegal", "no", "1 oz or less is a misdemeanour with up to 30 days in jail. No medical programme."), u("sd", "South Dakota", [1, 1, 2, 1, 0, 3], "illegal", "yes", "Up to 2 oz is a misdemeanour with up to a year in jail, and ingesting cannabis is itself an offence. Medical cannabis is available to card holders."), @@ -67,10 +67,10 @@ export const SUBUNITS = { u("tx", "Texas", [1, 0, 2, 0, 1, 1], "illegal", "limited", "2 oz or less is a misdemeanour with up to 180 days in jail; several cities no longer enforce it. A restricted low-THC medical programme was widened in 2025."), u("ut", "Utah", [1, 1, 2, 1, 1, 3], "illegal", "yes", "Under 1 oz is a misdemeanour with up to six months in jail. Medical cannabis is sold through licensed pharmacies; smoking it is not allowed."), - u("vt", "Vermont", [5, 4, 6, 5, 3, 6], "legal", "yes", "1 oz and two mature plus four immature plants per household. The first state to legalise through its legislature; shops since 2022."), + u("vt", "Vermont", [5, 4, 6, 5, 3, 6], "legal", "yes", "Small amounts and two mature plus four immature plants per household are legal. The first state to legalise through its legislature; shops since 2022."), u("va", "Virginia", [5, 4, 6, 5, 3, 3], "legal", "yes", "1 oz and four plants per household have been legal since 2021, but adult-use shops were repeatedly vetoed. Medical dispensaries are the only legal place to buy."), u("wa", "Washington", [5, 1, 6, 4, 3, 6], "legal", "yes", "1 oz is legal and shops have operated since 2014, but only medical patients may grow; for everyone else it is a felony."), u("wv", "West Virginia", [1, 1, 2, 1, 1, 3], "illegal", "yes", "Possession carries 90 days to six months in jail, with conditional discharge for a first offence. Medical dispensaries serve card holders; no flower smoking."), u("wi", "Wisconsin", [1, 0, 2, 0, 1, 0], "illegal", "no", "A first offence is a misdemeanour with up to six months in jail; a second is a felony. No medical programme, though Madison and Milwaukee impose only small fines."), - u("wy", "Wyoming", [1, 0, 1, 0, 0, 0], "illegal", "no", "Up to 3 oz is a misdemeanour with up to a year in jail, and being under the influence is a separate offence. No medical programme."), + u("wy", "Wyoming", [1, 1, 1, 0, 0, 0], "illegal", "no", "Up to 3 oz is a misdemeanour with up to a year in jail, and being under the influence is a separate offence. No medical programme."), ], }, @@ -82,5 +82,5 @@ export const SUBUNITS = { sources: [ ["Department of Justice Canada — Cannabis legalization and regulation", "https://www.justice.gc.ca/eng/cj-jp/cannabis/"], - ["Health Canada — Cannabis laws and regulations", "https://www.canada.ca/en/health-canada/services/drugs-medication/cannabis/laws-regulations.html"], + ["Health Canada — Cannabis in the provinces and territories", "https://www.canada.ca/en/health-canada/services/drugs-medication/cannabis/laws-regulations/provinces-territories.html"], ], units: [ @@ -88,9 +88,9 @@ export const SUBUNITS = { u("bc", "British Columbia", [6, 4, 6, 5, 6, 6], "legal", "yes", "Age 19. Public and private shops; smoking generally allowed where tobacco is, except around children."), u("mb", "Manitoba", [6, 4, 6, 5, 3, 6], "legal", "yes", "Age 19. Private shops. Home growing was banned until May 2025; public consumption is prohibited."), - u("nb", "New Brunswick", [6, 4, 6, 5, 3, 6], "legal", "yes", "Age 19. Government-run Cannabis NB plus some private shops; consumption only in private."), - u("nl", "Newfoundland and Labrador", [6, 4, 6, 5, 3, 6], "legal", "yes", "Age 19. Private licensed shops; consumption only in private residences."), - u("ns", "Nova Scotia", [6, 4, 6, 5, 5, 6], "legal", "yes", "Age 19. Sold through the provincial liquor corporation; smoking follows tobacco rules."), + u("nb", "New Brunswick", [6, 4, 6, 5, 3, 6], "legal", "yes", "Age 19. Government-operated Cannabis NB shops; consumption only in private."), + u("nl", "Newfoundland and Labrador", [6, 4, 6, 5, 3, 6], "legal", "yes", "Age 19. Government and private licensed shops; consumption only in private residences."), + u("ns", "Nova Scotia", [6, 4, 6, 5, 5, 6], "legal", "yes", "Age 19. Sold only through the government-run provincial liquor corporation; smoking follows tobacco rules."), u("nt", "Northwest Territories", [6, 4, 6, 5, 4, 6], "legal", "yes", "Age 19. Government-run sales; communities may restrict or ban cannabis locally."), - u("nu", "Nunavut", [6, 4, 6, 5, 3, 6], "legal", "yes", "Age 19. Sales mostly online through the territorial agency, with few physical shops."), + u("nu", "Nunavut", [6, 4, 6, 5, 3, 6], "legal", "yes", "Age 19. Private licensed shops and online sales; consumption in private only."), u("on", "Ontario", [6, 4, 6, 5, 6, 6], "legal", "yes", "Age 19. The largest private retail market in the country; smoking allowed almost anywhere tobacco is."), u("pe", "Prince Edward Island", [6, 4, 6, 5, 3, 6], "legal", "yes", "Age 19. Government-run shops only; consumption limited to private residences."), @@ -107,5 +107,5 @@ export const SUBUNITS = { sources: [ ["Wikipedia — Cannabis in Australia", "https://en.wikipedia.org/wiki/Cannabis_in_Australia"], - ["The Conversation — ACT cannabis laws come into effect", "https://theconversation.com/act-cannabis-laws-come-into-effect-on-friday-but-they-may-not-be-what-you-hoped-for-130050"], + ["Alcohol and Drug Foundation — Cannabis", "https://adf.org.au/drug-facts/cannabis/"], ], units: [
src/lib/countries.js +8 −1
@@ -27,4 +27,5 @@ export const worldAvg = countries.reduce((a, c) => a + c.raw, 0) / countries.len // ── States, provinces and territories of federations ── import { SUBUNITS } from "../data/subunits.js"; +import { SUBUNIT_DETAILS, unitSource } from "../data/subunit-details.js"; const scoreOf = (s) => s.reduce((a, v, i) => a + segmentPoints(i, v), 0); @@ -38,5 +39,11 @@ export function subunitsOf(id) { .map((x) => { const raw = scoreOf(x.s); - return { ...x, raw, score: Math.round(raw), worldRank: 1 + countries.filter((c) => c.raw > raw).length }; + const own = unitSource(id, x); + return { + ...x, raw, score: Math.round(raw), + worldRank: 1 + countries.filter((c) => c.raw > raw).length, + seg: SUBUNIT_DETAILS[id]?.[x.id] ?? null, // six explanations, in SEGMENTS order + sources: [...(own ? [own] : []), ...group.sources], // the unit's own source first + }; }) .sort((a, b) => b.raw - a.raw || a.name.localeCompare(b.name));