InĀ [1]:
%reload_ext autotime
import pandas as pd
from bertopic import BERTopic
from bertopic.representation import KeyBERTInspired
import plotly.io as pio
import plotly.express as px # Plotting
pio.renderers.default = 'notebook'
pd.options.plotting.backend = "plotly"
pd.set_option("display.max_columns", None)
pd.set_option("display.max_colwidth", 100)

df = pd.read_excel("givealittle_health.xlsx")
df.index = pd.to_datetime(df["start"])
df["text"] = df.title.str.cat(df[["pitch", "description", "use_of_funds"]].astype(str), sep=" ")
df
Out[1]:
title pitch hero uri amountRaised goal timeLeft action actionUri start end n_questions location n_donors description use_of_funds whos_involved moderated n_updates updates Q&A text
start
2025-06-09 Rugby league lover, Ben Stowers, has had his whole life turned upside down from one tackle. This page has been started to help Ben, his partner and their families with the financial impact... https://static.givealittle.co.nz/assets/hero/82a33c79-46e8-4c6c-ad1a-b2f7010ebbc2-320:False https://givealittle.co.nz/cause/rugby-league-lover-ben-stowers-has-had-his-whole 3070.0 0.0 362 days to go Donate https://givealittle.co.nz/donate/cause/rugby-league-lover-ben-stowers-has-had-his-whole 9 Jun 2025 8 Jun 2026 0 Porirua, Wellington 52.0 On the 22nd of March Ben's life took a turn for the worse, playing the sport he loved - Rugby Le... Travel between Wellington and Christchurch, day to day living expenses, modifications to home Created by\r\nKarra Hanara \n\n\n\n\r\n Paying to a verified bank account of\r\nPeta Manav... Page Moderated NaN NaN NaN Rugby league lover, Ben Stowers, has had his whole life turned upside down from one tackle. This...
2025-06-09 HOPE FOR SUMMER #BATTENSBEATER An ultra rare Princess who is fighting a rare disease Batten Disease CLN1 only one ever in NZ he... https://static.givealittle.co.nz/assets/hero/62b8152b-4f56-4c62-b602-b2f701558791-320:False https://givealittle.co.nz/cause/hope-for-summer-battensbeater 585.0 0.0 727 days to go Donate https://givealittle.co.nz/donate/cause/hope-for-summer-battensbeater 9 Jun 2025 9 Jun 2027 0 Nationwide 14.0 Summer is 11 years old with a rare terminal Disease called Batten Disease CLN1 there is no cure ... Medical costs medical equipment costs making memeories and other expenses for helping Summer to ... Created by, and paying to a verified bank account of,\r\nRay Mudford on behalf of Summer M... Page Moderated 1.0 A little something about Summer šŸ¦„\n11 June 2025\nYou will never see Summer without a reborn she ... NaN HOPE FOR SUMMER #BATTENSBEATER An ultra rare Princess who is fighting a rare disease Batten Dise...
2025-06-08 Help Esther Fight Breast Cancer — A Young Mum from Vanuatu Please help a Vanuatu family through a hard time! https://static.givealittle.co.nz/assets/hero/be4d939b-2ea7-4b03-b2d0-b2f60130466f-320:False https://givealittle.co.nz/cause/help-esther-fight-breast-cancer-a-young-mum 760.0 2100.0 11 days to go Donate https://givealittle.co.nz/donate/cause/help-esther-fight-breast-cancer-a-young-mum 8 Jun 2025 22 Jun 2025 0 Cromwell, Otago 16.0 This fundraiser is for Esther, a strong and loving 31-year-old mother from Vanuatu, who is coura... To Esther treatment in india Created by, and paying to a verified bank account of,\r\nMagali Domingo on behalf of Esther... Page Moderated 1.0 Update on Esther – Thank You for Your Support\n10 June 2025\nGood morning everyone,\nI want to s... NaN Help Esther Fight Breast Cancer — A Young Mum from Vanuatu Please help a Vanuatu family through ...
2025-06-08 $100k in 100 days! Help save a life saving service for mothers in South Auckland & North Waikato https://static.givealittle.co.nz/assets/hero/e70859ac-626e-4150-9be2-b2f9011aee93-320:False https://givealittle.co.nz/cause/savewellwomen 4779.0 100000.0 110 days to go Donate https://givealittle.co.nz/donate/cause/savewellwomen 8 Jun 2025 30 Sep 2025 0 Auckland 63.0 At Well Women Trust, we walk alongside women through some of the most vulnerable times in their ... Well Women Trust needs to raise $100,000 within 100 days to keep services running.We are calling... Created by, and paying to a verified bank account of,\r\n \r\n Well Women\r\n ... Page Moderated NaN NaN NaN $100k in 100 days! Help save a life saving service for mothers in South Auckland & North Waikato...
2025-06-08 Goldenhar Syndrome: Help a Young Girl Through Her Medical Hurdles My daughter was born with Goldenhar syndrome, a rare congenital disorder. After years of treatme... https://static.givealittle.co.nz/assets/hero/f1fc251d-37f0-48f1-aff8-b2f600cd85cd-320:False https://givealittle.co.nz/cause/goldenhar-syndrome-help-a-young-girl 35.0 30000.0 180 days to go Donate https://givealittle.co.nz/donate/cause/goldenhar-syndrome-help-a-young-girl 8 Jun 2025 8 Dec 2025 0 Nationwide 3.0 In 2010, my daughter was born with Goldenhar Syndrome, a rare congenital condition. She has face... Ongoing medical costs. Every sent will be put towards doctors' and hospital bills. Our journey w... Created by, and paying to a verified bank account of,\r\n \r\n Jo Coetzer Page Moderated NaN NaN NaN Goldenhar Syndrome: Help a Young Girl Through Her Medical Hurdles My daughter was born with Gold...
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
2016-05-02 Amber and Daniel were twins born on 24th and 25th December 2015. They were born at 23 weeks gest... Raising money for the little McSweeney family who have spent the last 5 months in hospital! https://static.givealittle.co.nz/assets/hero/a07c15e8-a593-48bb-a652-a5fa009e35b9-320:False https://givealittle.co.nz/cause/hartleytwinsmicropremmies 4834.0 0.0 closed Read more https://givealittle.co.nz/cause/hartleytwinsmicropremmies 2 May 2016 6 Jun 2016 0 Canterbury 122.0 PLEASE READ THE UPDATE TO THIS POST UNDER UPDATE TAB. We need you all to know how much of an imp... NaN Created by, and paying to a verified bank account of,_x000D_\n _x000D_\n Elise Hartl... Page Moderated 1.0 Attention all followers of our story\n31 May 2016\nHello, my name is Elise Hartley and I am the ... NaN Amber and Daniel were twins born on 24th and 25th December 2015. They were born at 23 weeks gest...
2016-05-01 Tania Whanau, known by most as Tarnz, is a strong, 40 year old woman who was diagnosed with brea... Since February '16 Tarnz has undergone two operations; one removing 34 lymph nodes from her righ... https://static.givealittle.co.nz/assets/hero/652566e9-6f90-4632-9b3f-a5f900e9af2c-320:False https://givealittle.co.nz/cause/fightbreastcancerlikeabitch 1550.0 0.0 closed Read more https://givealittle.co.nz/cause/fightbreastcancerlikeabitch 1 May 2016 22 Jul 2016 0 Hawke's Bay 34.0 Tania Whanau, known by most as Tarnz, is a strong, 40 year old woman who was diagnosed with Grad... NaN Created by_x000D_\n _x000D_\n Nancy Easthope_x000D_\n \n\n\n\n\n_x000D_\n ... Page Moderated NaN NaN NaN Tania Whanau, known by most as Tarnz, is a strong, 40 year old woman who was diagnosed with brea...
2016-05-01 Cardiology Fundraiser Fundraising for patients & families affected by Heart Disease. https://static.givealittle.co.nz/assets/hero/bfefeb94-f041-478f-80a0-a5f900c0dc47-320:False https://givealittle.co.nz/cause/fund4aheart 915.0 0.0 closed Read more https://givealittle.co.nz/cause/fund4aheart 1 May 2016 15 Aug 2016 0 Waikato 9.0 We aim to provide clients with the most up-to-date education around their Heart Disease diagnosi... NaN Created by, and paying to a verified bank account of,_x000D_\n _x000D_\n Cardiology ... Page Moderated NaN NaN NaN Cardiology Fundraiser Fundraising for patients & families affected by Heart Disease. We aim to p...
2016-04-30 Help for Julia, while she is caring for Ian Robertson Please support me so I'll be able to continue caring for my dear friend Ian Roberston. He suffer... https://static.givealittle.co.nz/assets/hero/531d73ca-22d8-423b-93be-a5f700a2c8ed-320:False https://givealittle.co.nz/cause/help4julia 2645.0 0.0 closed Read more https://givealittle.co.nz/cause/help4julia 30 Apr 2016 30 May 2016 0 Canterbury 31.0 I'm caring for my dear Kiwi friend Ian Robertson, who suffers from terminal lung cancer. It's ge... NaN Created by, and paying to a verified bank account of,_x000D_\n _x000D_\n Julia Schlu... Page Moderated NaN NaN NaN Help for Julia, while she is caring for Ian Robertson Please support me so I'll be able to conti...
2016-04-29 TRUS Biopsy Machine for Taranaki The men of Taranaki need this TRUS Biopsy Machine to diagnose Prostate Cancer. Reduce waiting t... https://static.givealittle.co.nz/assets/hero/c9169845-63b5-4c1e-bb50-a5fc00e5abd0-320:False https://givealittle.co.nz/cause/prostatebiopsymachinenewplymouth 1910.0 20000.0 closed Read more https://givealittle.co.nz/cause/prostatebiopsymachinenewplymouth 29 Apr 2016 31 Aug 2016 0 Taranaki 15.0 Currently the TRUS (Trans Rectal Ultrasound) machine for diagnosing prostate cancer is only avai... NaN Created by, and paying to a verified bank account of,_x000D_\n _x000D_\n Rotary Club... Page Moderated NaN NaN NaN TRUS Biopsy Machine for Taranaki The men of Taranaki need this TRUS Biopsy Machine to diagnose P...

11213 rows Ɨ 22 columns

time: 15.3 s (started: 2025-07-22 14:46:54 +12:00)
InĀ [2]:
df.amountRaised.resample("1YS").sum().plot.bar()
time: 249 ms (started: 2025-07-22 14:47:10 +12:00)
InĀ [3]:
df.resample("ME").size().plot()
time: 108 ms (started: 2025-07-22 14:47:11 +12:00)
InĀ [4]:
keywords = ["covid", "cancer", "leukemia", "heart", "stroke", "kidney", "bowel"]
for word in keywords:
  df[word] = df.text.str.lower().str.contains(rf"\b{word}\b")
df
Out[4]:
title pitch hero uri amountRaised goal timeLeft action actionUri start end n_questions location n_donors description use_of_funds whos_involved moderated n_updates updates Q&A text covid cancer leukemia heart stroke kidney bowel
start
2025-06-09 Rugby league lover, Ben Stowers, has had his whole life turned upside down from one tackle. This page has been started to help Ben, his partner and their families with the financial impact... https://static.givealittle.co.nz/assets/hero/82a33c79-46e8-4c6c-ad1a-b2f7010ebbc2-320:False https://givealittle.co.nz/cause/rugby-league-lover-ben-stowers-has-had-his-whole 3070.0 0.0 362 days to go Donate https://givealittle.co.nz/donate/cause/rugby-league-lover-ben-stowers-has-had-his-whole 9 Jun 2025 8 Jun 2026 0 Porirua, Wellington 52.0 On the 22nd of March Ben's life took a turn for the worse, playing the sport he loved - Rugby Le... Travel between Wellington and Christchurch, day to day living expenses, modifications to home Created by\r\nKarra Hanara \n\n\n\n\r\n Paying to a verified bank account of\r\nPeta Manav... Page Moderated NaN NaN NaN Rugby league lover, Ben Stowers, has had his whole life turned upside down from one tackle. This... False False False False False False False
2025-06-09 HOPE FOR SUMMER #BATTENSBEATER An ultra rare Princess who is fighting a rare disease Batten Disease CLN1 only one ever in NZ he... https://static.givealittle.co.nz/assets/hero/62b8152b-4f56-4c62-b602-b2f701558791-320:False https://givealittle.co.nz/cause/hope-for-summer-battensbeater 585.0 0.0 727 days to go Donate https://givealittle.co.nz/donate/cause/hope-for-summer-battensbeater 9 Jun 2025 9 Jun 2027 0 Nationwide 14.0 Summer is 11 years old with a rare terminal Disease called Batten Disease CLN1 there is no cure ... Medical costs medical equipment costs making memeories and other expenses for helping Summer to ... Created by, and paying to a verified bank account of,\r\nRay Mudford on behalf of Summer M... Page Moderated 1.0 A little something about Summer šŸ¦„\n11 June 2025\nYou will never see Summer without a reborn she ... NaN HOPE FOR SUMMER #BATTENSBEATER An ultra rare Princess who is fighting a rare disease Batten Dise... False False False False False False False
2025-06-08 Help Esther Fight Breast Cancer — A Young Mum from Vanuatu Please help a Vanuatu family through a hard time! https://static.givealittle.co.nz/assets/hero/be4d939b-2ea7-4b03-b2d0-b2f60130466f-320:False https://givealittle.co.nz/cause/help-esther-fight-breast-cancer-a-young-mum 760.0 2100.0 11 days to go Donate https://givealittle.co.nz/donate/cause/help-esther-fight-breast-cancer-a-young-mum 8 Jun 2025 22 Jun 2025 0 Cromwell, Otago 16.0 This fundraiser is for Esther, a strong and loving 31-year-old mother from Vanuatu, who is coura... To Esther treatment in india Created by, and paying to a verified bank account of,\r\nMagali Domingo on behalf of Esther... Page Moderated 1.0 Update on Esther – Thank You for Your Support\n10 June 2025\nGood morning everyone,\nI want to s... NaN Help Esther Fight Breast Cancer — A Young Mum from Vanuatu Please help a Vanuatu family through ... False True False False False False False
2025-06-08 $100k in 100 days! Help save a life saving service for mothers in South Auckland & North Waikato https://static.givealittle.co.nz/assets/hero/e70859ac-626e-4150-9be2-b2f9011aee93-320:False https://givealittle.co.nz/cause/savewellwomen 4779.0 100000.0 110 days to go Donate https://givealittle.co.nz/donate/cause/savewellwomen 8 Jun 2025 30 Sep 2025 0 Auckland 63.0 At Well Women Trust, we walk alongside women through some of the most vulnerable times in their ... Well Women Trust needs to raise $100,000 within 100 days to keep services running.We are calling... Created by, and paying to a verified bank account of,\r\n \r\n Well Women\r\n ... Page Moderated NaN NaN NaN $100k in 100 days! Help save a life saving service for mothers in South Auckland & North Waikato... False False False False False False False
2025-06-08 Goldenhar Syndrome: Help a Young Girl Through Her Medical Hurdles My daughter was born with Goldenhar syndrome, a rare congenital disorder. After years of treatme... https://static.givealittle.co.nz/assets/hero/f1fc251d-37f0-48f1-aff8-b2f600cd85cd-320:False https://givealittle.co.nz/cause/goldenhar-syndrome-help-a-young-girl 35.0 30000.0 180 days to go Donate https://givealittle.co.nz/donate/cause/goldenhar-syndrome-help-a-young-girl 8 Jun 2025 8 Dec 2025 0 Nationwide 3.0 In 2010, my daughter was born with Goldenhar Syndrome, a rare congenital condition. She has face... Ongoing medical costs. Every sent will be put towards doctors' and hospital bills. Our journey w... Created by, and paying to a verified bank account of,\r\n \r\n Jo Coetzer Page Moderated NaN NaN NaN Goldenhar Syndrome: Help a Young Girl Through Her Medical Hurdles My daughter was born with Gold... False False False False False True False
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
2016-05-02 Amber and Daniel were twins born on 24th and 25th December 2015. They were born at 23 weeks gest... Raising money for the little McSweeney family who have spent the last 5 months in hospital! https://static.givealittle.co.nz/assets/hero/a07c15e8-a593-48bb-a652-a5fa009e35b9-320:False https://givealittle.co.nz/cause/hartleytwinsmicropremmies 4834.0 0.0 closed Read more https://givealittle.co.nz/cause/hartleytwinsmicropremmies 2 May 2016 6 Jun 2016 0 Canterbury 122.0 PLEASE READ THE UPDATE TO THIS POST UNDER UPDATE TAB. We need you all to know how much of an imp... NaN Created by, and paying to a verified bank account of,_x000D_\n _x000D_\n Elise Hartl... Page Moderated 1.0 Attention all followers of our story\n31 May 2016\nHello, my name is Elise Hartley and I am the ... NaN Amber and Daniel were twins born on 24th and 25th December 2015. They were born at 23 weeks gest... False False False False False False False
2016-05-01 Tania Whanau, known by most as Tarnz, is a strong, 40 year old woman who was diagnosed with brea... Since February '16 Tarnz has undergone two operations; one removing 34 lymph nodes from her righ... https://static.givealittle.co.nz/assets/hero/652566e9-6f90-4632-9b3f-a5f900e9af2c-320:False https://givealittle.co.nz/cause/fightbreastcancerlikeabitch 1550.0 0.0 closed Read more https://givealittle.co.nz/cause/fightbreastcancerlikeabitch 1 May 2016 22 Jul 2016 0 Hawke's Bay 34.0 Tania Whanau, known by most as Tarnz, is a strong, 40 year old woman who was diagnosed with Grad... NaN Created by_x000D_\n _x000D_\n Nancy Easthope_x000D_\n \n\n\n\n\n_x000D_\n ... Page Moderated NaN NaN NaN Tania Whanau, known by most as Tarnz, is a strong, 40 year old woman who was diagnosed with brea... False True False False False False False
2016-05-01 Cardiology Fundraiser Fundraising for patients & families affected by Heart Disease. https://static.givealittle.co.nz/assets/hero/bfefeb94-f041-478f-80a0-a5f900c0dc47-320:False https://givealittle.co.nz/cause/fund4aheart 915.0 0.0 closed Read more https://givealittle.co.nz/cause/fund4aheart 1 May 2016 15 Aug 2016 0 Waikato 9.0 We aim to provide clients with the most up-to-date education around their Heart Disease diagnosi... NaN Created by, and paying to a verified bank account of,_x000D_\n _x000D_\n Cardiology ... Page Moderated NaN NaN NaN Cardiology Fundraiser Fundraising for patients & families affected by Heart Disease. We aim to p... False False False True False False False
2016-04-30 Help for Julia, while she is caring for Ian Robertson Please support me so I'll be able to continue caring for my dear friend Ian Roberston. He suffer... https://static.givealittle.co.nz/assets/hero/531d73ca-22d8-423b-93be-a5f700a2c8ed-320:False https://givealittle.co.nz/cause/help4julia 2645.0 0.0 closed Read more https://givealittle.co.nz/cause/help4julia 30 Apr 2016 30 May 2016 0 Canterbury 31.0 I'm caring for my dear Kiwi friend Ian Robertson, who suffers from terminal lung cancer. It's ge... NaN Created by, and paying to a verified bank account of,_x000D_\n _x000D_\n Julia Schlu... Page Moderated NaN NaN NaN Help for Julia, while she is caring for Ian Robertson Please support me so I'll be able to conti... False True False True False False False
2016-04-29 TRUS Biopsy Machine for Taranaki The men of Taranaki need this TRUS Biopsy Machine to diagnose Prostate Cancer. Reduce waiting t... https://static.givealittle.co.nz/assets/hero/c9169845-63b5-4c1e-bb50-a5fc00e5abd0-320:False https://givealittle.co.nz/cause/prostatebiopsymachinenewplymouth 1910.0 20000.0 closed Read more https://givealittle.co.nz/cause/prostatebiopsymachinenewplymouth 29 Apr 2016 31 Aug 2016 0 Taranaki 15.0 Currently the TRUS (Trans Rectal Ultrasound) machine for diagnosing prostate cancer is only avai... NaN Created by, and paying to a verified bank account of,_x000D_\n _x000D_\n Rotary Club... Page Moderated NaN NaN NaN TRUS Biopsy Machine for Taranaki The men of Taranaki need this TRUS Biopsy Machine to diagnose P... False True False False False False False

11213 rows Ɨ 29 columns

time: 2.88 s (started: 2025-07-22 14:47:11 +12:00)
InĀ [5]:
df.resample("1M").cancer.sum().describe()
Out[5]:
count    111.000000
mean      37.981982
std        9.530794
min        2.000000
25%       32.500000
50%       38.000000
75%       44.000000
max       58.000000
Name: cancer, dtype: float64
time: 33.4 ms (started: 2025-07-22 14:47:14 +12:00)
InĀ [6]:
df.resample("1M")[keywords].sum().plot(height=800)
time: 106 ms (started: 2025-07-22 14:47:14 +12:00)
InĀ [7]:
topic_model = BERTopic(representation_model=KeyBERTInspired(), min_topic_size=10, verbose=True)
topic_model.fit(df.text)
topic_model.get_topic_info()
2025-07-22 14:47:14,384 - BERTopic - Embedding - Transforming documents to embeddings.
Batches:   0%|          | 0/351 [00:00<?, ?it/s]
2025-07-22 14:47:38,389 - BERTopic - Embedding - Completed āœ“
2025-07-22 14:47:38,391 - BERTopic - Dimensionality - Fitting the dimensionality reduction algorithm
2025-07-22 14:48:00,735 - BERTopic - Dimensionality - Completed āœ“
2025-07-22 14:48:00,737 - BERTopic - Cluster - Start clustering the reduced embeddings
2025-07-22 14:48:01,192 - BERTopic - Cluster - Completed āœ“
2025-07-22 14:48:01,199 - BERTopic - Representation - Fine-tuning topics using representation models.
2025-07-22 14:48:06,525 - BERTopic - Representation - Completed āœ“
Out[7]:
Topic Count Name Representation Representative_Docs
0 -1 4746 -1_cancer_treatment_care_support [cancer, treatment, care, support, family, hospital, surgery, medical, health, funds] [Please help me help my brother Peter who is very ill and all alone who lives in South Africa. P...
1 0 2288 0_cancer_chemotherapy_diagnosed_treatments [cancer, chemotherapy, diagnosed, treatments, chemo, treatment, mum, family, support, funded] [PLEASE!! Give a little to help give our Mum, Wife, Nana, Aunty, Friend, Sister Carolyn, Carol šŸ’•...
2 1 364 1_rehabilitation_recovery_injury_support [rehabilitation, recovery, injury, support, stroke, family, injuries, hospital, care, funds] [Support for an Awesome family in a time of need. Give Shannon a hand up in his stroke recovery....
3 2 258 2_whanau_aunty_support_family [whanau, aunty, support, family, accommodation, auckland, aroha, care, expenses, funds] [Waikato Nurse, Wife and Mother battles Metastatic Cancer 17 years of marriage, studying to beco...
4 3 210 3_surgery_mastectomy_fund_raise [surgery, mastectomy, fund, raise, funds, costs, chest, pay, transgender, affirming] [Top Surgery Fund I am saving and fundraising for Top Surgery I am saving and fundraising for to...
... ... ... ... ... ...
75 74 11 74_surgery_syndrome_treatment_medically [surgery, syndrome, treatment, medically, autism, levi, levitt, bowel, hirschsprungs, dr] [Help koston get life changing treatment and surgery in america Koston aged 4 needs corrective b...
76 75 11 75_autism_autistics_autistic_fund [autism, autistics, autistic, fund, advocating, aac, workshops, adhd, advocates, exhibition] [Help Sarah raise money for The ACFB Fund, a charity that provides low-cost ADHD and autism asse...
77 76 11 76_treatment_wheelchair_spinal_syndrome [treatment, wheelchair, spinal, syndrome, pain, painful, nerve, relief, medical, crps] [Kaari Ruka Slade 8 Years Old - "The reality of Perthes Disease " We are asking for people to do...
78 77 11 77_funds_expenses_jason_expensesd [funds, expenses, jason, expensesd, family, send, pay, bring, helping, money] [Help send Leo great beer! Leo suffers from stage 3 terminal brain cancer, we want to send him s...
79 78 10 78_meningitis_infection_hospital_bailey [meningitis, infection, hospital, bailey, baileys, support, care, medical, plight, arley] [Please support Jaimee and Bailey Supporting Jaimee with Baileys battle with meningitis Our beau...

80 rows Ɨ 5 columns

time: 53.3 s (started: 2025-07-22 14:47:14 +12:00)
InĀ [8]:
topic_model.visualize_topics()
time: 5.05 s (started: 2025-07-22 14:48:07 +12:00)
InĀ [9]:
topics_over_time = topic_model.topics_over_time(df.text, df.index, nr_bins=10)
topics_over_time
10it [00:27,  2.70s/it]
Out[9]:
Topic Words Frequency Timestamp
0 -1 treatment, care, cancer, support, family 441 2016-04-25 16:07:40.800
1 0 cancer, chemotherapy, diagnosed, treatments, treatment 169 2016-04-25 16:07:40.800
2 1 recovery, injury, injuries, rehabilitation, accident 38 2016-04-25 16:07:40.800
3 2 evie, hospital, whanau, support, family 10 2016-04-25 16:07:40.800
4 3 transgender, depression, trans, surgery, dysphoria 2 2016-04-25 16:07:40.800
... ... ... ... ...
692 71 kellys, kelly, mortgage, support, metastasized 1 2024-07-11 04:48:00.000
693 72 yoga, trainer, anahera, attend, dance 2 2024-07-11 04:48:00.000
694 73 parkinsons, diagnosed, barre, polyneuropathy, disease 2 2024-07-11 04:48:00.000
695 74 craniosynostosis, colitis, cranial, surgery, ulcerative 2 2024-07-11 04:48:00.000
696 75 acfb, fund, adhdautism, aac, support 2 2024-07-11 04:48:00.000

697 rows Ɨ 4 columns

time: 27.2 s (started: 2025-07-22 14:48:12 +12:00)
InĀ [10]:
topic_model.visualize_topics_over_time(topics_over_time, top_n_topics=20, height=600)
time: 87.9 ms (started: 2025-07-22 14:48:39 +12:00)
InĀ [11]:
df = df[(df.timeLeft == "closed") & (df.goal > 0)]
df["Target_completion"] = df.amountRaised / df.goal * 100
display(df["Target_completion"].describe())
df.sort_values("Target_completion")
count     4505.000000
mean        64.721481
std        764.409357
min          0.000000
25%          6.051760
50%         23.214286
75%         62.215000
max      44000.000000
Name: Target_completion, dtype: float64
Out[11]:
title pitch hero uri amountRaised goal timeLeft action actionUri start end n_questions location n_donors description use_of_funds whos_involved moderated n_updates updates Q&A text covid cancer leukemia heart stroke kidney bowel Target_completion
start
2024-06-01 Me and you against the world Help keep my bro alive ā¤ļø https://static.givealittle.co.nz/assets/hero/11e8353e-d3b1-4e38-983f-b18200aeb589-320:False https://givealittle.co.nz/cause/me-and-you-against-the-world 0.0 5000.0 closed Read more https://givealittle.co.nz/cause/me-and-you-against-the-world 1 Jun 2024 24 Jun 2024 0 Bay of Plenty NaN Hi my name is Jess, my younger brother Corey (28 years old) was diagnosed with a 9cm pituitary g... Medical expenses - to get an appointment with RestoreMe Clinic and subsequently CBD oil (prescri... Created by_x000D_\nJessica Kelly \n\n\n\n_x000D_\n Paying to a verified bank account of_x0... Page Moderated NaN NaN NaN Me and you against the world Help keep my bro alive ā¤ļø Hi my name is Jess, my younger brother Co... False False False True False False False 0.00000
2024-10-13 Flights needed NZ-London to help 83 year old mum through a mastectomy Raising funds to send a caring daughter to London to look after her 83 year old mum following a ... https://static.givealittle.co.nz/assets/hero/03a34b2c-1401-4460-8ca3-b20800b6f41e-320:False https://givealittle.co.nz/cause/flights-needed-nz-london-to-help-83-year-old-mum 0.0 3340.0 closed Read more https://givealittle.co.nz/cause/flights-needed-nz-london-to-help-83-year-old-mum 13 Oct 2024 16 Oct 2024 0 NaN NaN My mother has breast cancer and at 83 is having a mastectomy on 24th October. She lives alone an... Just the flights Created by, and paying to a verified bank account of,_x000D_\n _x000D_\n Sian Jones Page Moderated NaN NaN NaN Flights needed NZ-London to help 83 year old mum through a mastectomy Raising funds to send a ca... False True False False False False False 0.00000
2017-03-18 Filling removal to reverse multiple sclerosis Silver filling removal to cure m.s. caused by mercury poisoning https://static.givealittle.co.nz/assets/hero/97b5a6a5-6fb9-432b-9bb0-a73a0110af59-320:False https://givealittle.co.nz/cause/silveramalgalmscauseautoimmunedisorders 4.0 250000.0 closed Read more https://givealittle.co.nz/cause/silveramalgalmscauseautoimmunedisorders 18 Mar 2017 20 Jun 2017 0 Northland 3.0 Old filling removal is dangerous and requires a dentist that really knows how to remove them saf... Silver filling removal, 2 teeth now need to be ripped as as root canal will harbour bacteria and... Created by, and paying to a verified bank account of,_x000D_\n _x000D_\n Sandy Howell Page Moderated 1.0 28th april\n3 May 2017\nHad two teeth removed as they required root canals which are a death sen... NaN Filling removal to reverse multiple sclerosis Silver filling removal to cure m.s. caused by merc... False False False True False False False 0.00160
2023-05-19 Charlies life threatening lung complication. This page is set up to help support my family during this time of extreme hardship we are experi... https://static.givealittle.co.nz/assets/hero/bf6e7924-c106-4b1e-b4bf-b0070056a009-320:False https://givealittle.co.nz/cause/charlies-life-threatening-lung-complication 7.0 100000.0 closed Read more https://givealittle.co.nz/cause/charlies-life-threatening-lung-complication 19 May 2023 10 Oct 2023 0 Auckland 3.0 Please help our family as our lives have changed due to our sons right lung not functioning prop... A vehicle, accomadation in a warm home. 2 sons under 3 + new born twins, funds will support us u... Created by, and paying to a verified bank account of,_x000D_\nRobert Shane Williams Page Moderated NaN NaN NaN Charlies life threatening lung complication. This page is set up to help support my family durin... False False False False False False False 0.00700
2019-03-05 Help My Father My Father is diagnosed with Adult CHD. His position is really critical, please help me so that i... https://static.givealittle.co.nz/assets/hero/761d7080-ddd4-42e0-9dea-aa07014cb211-320:False https://givealittle.co.nz/cause/help-my-father 35.0 400000.0 closed Read more https://givealittle.co.nz/cause/help-my-father 5 Mar 2019 30 Apr 2019 0 Auckland 3.0 Hello everyone,\nMy name is Manisha i am a single mother from India currently living in New Zeal... For my father treatment Created by, and paying to a verified bank account of,_x000D_\nmanisha mittal on behalf of M... Page Moderated NaN NaN NaN Help My Father My Father is diagnosed with Adult CHD. His position is really critical, please he... False False False True False False False 0.00875
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
2017-01-20 Cancer (Langhan's Cell Histiocytosis) Raising money for treatment and recovery of being paralyzed and going through chemotherapy and h... https://static.givealittle.co.nz/assets/hero/7ca74a99-5881-48a7-a7e4-a6fe0052b1bb-320:False https://givealittle.co.nz/cause/shaunmurphy 1160.0 10.0 closed Read more https://givealittle.co.nz/cause/shaunmurphy 20 Jan 2017 8 Jul 2017 0 Auckland 27.0 Hi, I'm Shaun Murphy and I'm 25 years old.\nIf you don't already know my story, 2 years ago I st... Rehabilitation treatment and any other costs for chemotherapy and physio Created by, and paying to a verified bank account of,_x000D_\n _x000D_\n Shaun murphy Page Moderated NaN NaN NaN Cancer (Langhan's Cell Histiocytosis) Raising money for treatment and recovery of being paralyze... False True False False False False False 11600.00000
2017-03-19 We need to raise funds for Cibele's surgery Please help raise funds to pay for a tumour removal surgery. Any donation will help. Thank you. https://static.givealittle.co.nz/assets/hero/f2446f46-19a2-418b-b6fb-a73b014c6d84-320:False https://givealittle.co.nz/cause/help4cibele 2482.0 20.0 closed Read more https://givealittle.co.nz/cause/help4cibele 19 Mar 2017 1 May 2017 0 Auckland 36.0 Cibele has a tumour in her stomach and desperately needs $20.000 to pay for a surgery to remove ... To pay for a surgery to remove a tumour in her stomach. Created by_x000D_\n _x000D_\n Carmosina Braga Trancoso_x000D_\n \n\n\n\n\n\n\n_... Page Moderated NaN NaN NaN We need to raise funds for Cibele's surgery Please help raise funds to pay for a tumour removal ... False False False False False False False 12410.00000
2017-03-22 To raise money to fight for Justice for Baby Jai curtis Blake preventable Still BIrth Angela and Scott are seeking support with legal fees into the Still Birth of then unborn child t... https://static.givealittle.co.nz/assets/hero/14ca9772-ba50-4f2d-91b6-a73e01280edc-320:False https://givealittle.co.nz/cause/supportbabyjai 277.0 2.0 closed Read more https://givealittle.co.nz/cause/supportbabyjai 22 Mar 2017 30 Apr 2017 0 Canterbury 16.0 Angela lost her baby in utero at 37 weeks full term after a complicated pregnancy and lots of he... funds are to fight the justice system for other women preventing this happening to other expecta... Created by_x000D_\n _x000D_\n April Ritchie_x000D_\n \n\n\n\n\n\n\n_x000D_\n ... Page Moderated NaN NaN NaN To raise money to fight for Justice for Baby Jai curtis Blake preventable Still BIrth Angela and... False False False False False False False 13850.00000
2017-07-18 helping barry after a serious hit n run accident our friend was in a serious hit and run and will be in hospital and after care for some time and... https://static.givealittle.co.nz/assets/hero/2bfd0a24-b2ab-412f-b8f8-a7b400cce458-320:False https://givealittle.co.nz/cause/barrystollery 1450.0 10.0 closed Read more https://givealittle.co.nz/cause/barrystollery 18 Jul 2017 30 Sep 2017 0 Bay of Plenty 18.0 One of our local motorcyclists was severly injured in a hit and run this week in tauranga he is ... help barry to get on his feet and back to some kind of normality ideally he will need to save fo... Created by_x000D_\n _x000D_\n Briar Morreel_x000D_\n \n\n\n\n\n\n\n_x000D_\n ... Page Moderated NaN NaN NaN helping barry after a serious hit n run accident our friend was in a serious hit and run and wil... False False False False False False False 14500.00000
2022-02-24 Help the Mason family William's upcoming surgery/recovery https://static.givealittle.co.nz/assets/hero/10960d59-c892-40b4-8121-ae4a0142f5fa-320:False https://givealittle.co.nz/cause/help-the-mason-family 2200.0 5.0 closed Read more https://givealittle.co.nz/cause/help-the-mason-family 24 Feb 2022 25 Jun 2022 0 Upper Hutt, Wellington 38.0 Hi my name is William and I'm 38 years old and I had a massive Heart attack on the 2nd of Februa... Everything. Travel to appointments in lower hutt and Wellington hospital ,Food, rent, petrol, ki... Created by, and paying to a verified bank account of,_x000D_\n _x000D_\n William Mason Page Moderated 4.0 Thanx all\n12 March 2022\nThanx all your support so far , I can't thank you enough. Have got 2 m... NaN Help the Mason family William's upcoming surgery/recovery Hi my name is William and I'm 38 years... False False False True False False False 44000.00000

4505 rows Ɨ 30 columns

time: 39.8 ms (started: 2025-07-22 14:48:40 +12:00)
InĀ [12]:
df["Target_completion"].resample("1YS").median().plot.bar()
time: 49.2 ms (started: 2025-07-22 14:48:40 +12:00)
InĀ [13]:
# Take the last part of the location string (most coarse location)
df.location = df.location.str.split(", ").str[-1].replace({
  "Manawatu-Wanganui": "Manawatu / Whanganui",
  "Bay Of Plenty": "Bay of Plenty",
})
top_10 = df.location.value_counts().head(10)
top_10
Out[13]:
location
Auckland                1339
Canterbury               532
Wellington               450
Waikato                  364
Bay of Plenty            271
Nationwide               245
Manawatu / Whanganui     192
International            161
Otago                    159
Northland                149
Name: count, dtype: int64
time: 11.7 ms (started: 2025-07-22 14:48:40 +12:00)
InĀ [14]:
with pd.option_context("display.max_rows", None):
  display(df.location.value_counts())
location
Auckland                          1339
Canterbury                         532
Wellington                         450
Waikato                            364
Bay of Plenty                      271
Nationwide                         245
Manawatu / Whanganui               192
International                      161
Otago                              159
Northland                          149
Hawke's Bay                        124
Taranaki                            95
Nelson / Tasman                     67
Southland                           63
Marlborough                         35
Gisborne                            34
Christchurch                        25
Nelson                              24
West Coast                          23
Hamilton                            11
Tauranga                            10
Lower Hutt                          10
Tasman                              10
Dunedin                              6
Kapiti Coast District                6
Papamoa                              6
Lower Hutt City                      5
Palmerston North                     4
Porirua                              4
Invercargill                         3
Hastings District                    3
Unspecified                          3
Masterton District                   3
Blenheim                             2
Tauranga City                        2
Upper Hutt                           2
New Plymouth                         2
Wellington City                      2
Whanganui                            2
Waikato District                     2
Hastings                             2
Whakatane District                   2
Upper Hutt City                      2
Far North District                   2
Whangaparaoa                         2
Whangarei                            2
Cambridge                            1
Tasman District                      1
Porirua City                         1
Manawatū-Whanganui                   1
Kingston                             1
Manawatu District                    1
Waipa District                       1
Piha                                 1
Nelson City                          1
Timaru District                      1
Thames-Coromandel District           1
Rotorua                              1
Dunedin City                         1
New Plymouth District                1
Stratford District                   1
Matamata-Piako District              1
Buller District                      1
Waikanae                             1
Paraparaumu                          1
Horowhenua District                  1
Otorohanga District                  1
Napier City                          1
Western Bay of Plenty District       1
Name: count, dtype: int64
time: 6.4 ms (started: 2025-07-22 14:48:40 +12:00)
InĀ [15]:
df.sort_values("n_donors", ascending=False).head(10)
Out[15]:
title pitch hero uri amountRaised goal timeLeft action actionUri start end n_questions location n_donors description use_of_funds whos_involved moderated n_updates updates Q&A text covid cancer leukemia heart stroke kidney bowel Target_completion
start
2018-08-10 Hope for Hollie Helping Hollie and her family fight this fight that no child or family should ever have to go th... https://static.givealittle.co.nz/assets/hero/7822e73b-d195-41a1-b48f-ab0101246377-320:False https://givealittle.co.nz/cause/helping-hollie-fund 652196.69 850000.0 closed Read more https://givealittle.co.nz/cause/helping-hollie-fund 10 Aug 2018 12 May 2022 5 Auckland 8269.0 Beautiful 8-year-old Hollie Beattie is currently in the middle of the fight of her life.\nIn Jul... As a striving young Auckland family, Jo and John are both working full time but we know that ove... Created by_x000D_\nSalome Schlebusch \n\n\n\n\n\n_x000D_\n Paying to a verified bank accou... Page Moderated 19.0 Remembering Hollie\n6 May 2022\nIt is with much sadness that we update you all that on Tuesday M... on 16 Aug 2022\nSusan asks\nKia ora,\nI am a researcher at the University of Otago (https://www.... Hope for Hollie Helping Hollie and her family fight this fight that no child or family should ev... True True False True False False False 76.729022
2022-07-07 Mum and Dad both diagnosed with Stage 4 (terminal) lung cancer (non-smokers) Help provide treatment for Mum and Dad (non-smokers) diagnosed with Stage 4 lung cancer so their... https://static.givealittle.co.nz/assets/hero/13922d5d-8666-4cff-b904-aecb00c0ff08-320:False https://givealittle.co.nz/cause/brook-smith-family 335980.91 315000.0 closed Read more https://givealittle.co.nz/cause/brook-smith-family 7 Jul 2022 31 Jan 2023 8 Auckland 5440.0 Please help us provide the best cancer treatment available to both Graham and Mery so their two ... Any money collected will first go towards Mery's treatment (Pembrolizumab), then towards Graham'... Created by_x000D_\n _x000D_\n Candor3_x000D_\n (Business)_x000D_\n \n\... Page Moderated 5.0 Graham's presentation to a Parliamentary Cocktail function\n6 December 2022\nGraham was invited ... on 27 Mar 2023\nJeanne asks\nAfter reading Graham's story on Stuff News today, can people still ... Mum and Dad both diagnosed with Stage 4 (terminal) lung cancer (non-smokers) Help provide treatm... False True False False False False False 106.660606
2018-07-14 Ka'iulani's Cancer Treatment in Barcelona, Spain Fundraising for Ka'iulani's cancer treatment in Spain starting August 2018. https://static.givealittle.co.nz/assets/hero/4238f3ae-20a2-409b-855c-a91d00ac5207-320:False https://givealittle.co.nz/cause/kaiulanis-cancer-treatment-in-barcelona-spain 241236.00 65000.0 closed Read more https://givealittle.co.nz/cause/kaiulanis-cancer-treatment-in-barcelona-spain 14 Jul 2018 14 Jan 2019 1 Nationwide 4823.0 Ka'iulani has shown some positive signs to reducing the spread of the neuroblastoma cancer disea... Funds raised will be used for medical treatment, flights & accommodation Created by, and paying to a verified bank account of,_x000D_\nManihera Forbes on behalf of ... Page Moderated NaN NaN on 31 Aug 2018\nBranana asks\nDoes this givealittle page close on Jan 14th 2019, even though you... Ka'iulani's Cancer Treatment in Barcelona, Spain Fundraising for Ka'iulani's cancer treatment in... False True False False False False False 371.132308
2021-12-07 Brittany, NZ Health has let her down. After starting facial reconstruction they tell her there i... Fundraising for Brittany to get her surgery https://static.givealittle.co.nz/assets/hero/43590cbe-57c4-4454-842b-adf700a29656-320:False https://givealittle.co.nz/cause/help-brittany-get-surgery 282988.84 400000.0 closed Read more https://givealittle.co.nz/cause/help-brittany-get-surgery 7 Dec 2021 23 Nov 2022 5 Canterbury 4271.0 Brittany has a new page here: https://givealittle.co.nz/cause/brittany-lets-get-this-done\nAfter... Surgery - Fat grafting and a skull base prosthetic jaw. And any other costs associated with surg... Created by_x000D_\n _x000D_\n Anna Meyer_x000D_\n \n\n\n\n\n_x000D_\n Payi... Page Moderated 11.0 Family Very Grateful\n23 November 2022\nSo, as we come to the close of the Givealittle page, Bri... on 9 Nov 2023\nNovalea asks\nHi there, I have just read the article (today) in Stuff re Brittany... Brittany, NZ Health has let her down. After starting facial reconstruction they tell her there i... False True False False False False False 70.747210
2018-09-01 Save Kurt Kurt has one last treatment option. _x000D_\nSet to be the race to save his life... https://static.givealittle.co.nz/assets/hero/594bb8a7-d4d7-4084-b566-a94e010b506e-320:False https://givealittle.co.nz/cause/saving-kurt 206515.34 1500000.0 closed Read more https://givealittle.co.nz/cause/saving-kurt 1 Sep 2018 30 Sep 2018 1 Auckland 2612.0 WE NEED YOUR HELP IN THE RUSH TO SAVE KURTS LIFE!\nKurt is a 41 year old husband and father to b... Funds will be used for CAR-T Therapy for international patients will cost up to US$800,000. If f... Created by_x000D_\nEmma Mildon \n\n\n\n_x000D_\n Paying to a verified bank account of_x000... Page Moderated 2.0 Kurt accepted into a potentially life-saving cancer treatment trial after travelling to the Unit... on 4 Sep 2018\nRom asks\nHi there,\nHave you looked into phoenix tears, could be another option ... Save Kurt Kurt has one last treatment option. _x000D_\nSet to be the race to save his life... WE... False True False True False False False 13.767689
2016-07-13 Give The Gift Of Life To Maddie Maddie has a kidney disease that means she requires another kidney transplant. https://static.givealittle.co.nz/assets/hero/a6f0f5bd-5afc-4865-a585-a64200b7b466-320:False https://givealittle.co.nz/cause/givethegiftoflifetomaddie 149420.77 350000.0 closed Read more https://givealittle.co.nz/cause/givethegiftoflifetomaddie 13 Jul 2016 28 Feb 2018 4 Canterbury 2540.0 ***Update 23/2****************\nOn the 17th of January we received a call in the night that NZ h... NaN Created by Sarah and Madeline Collins, paying to a verified bank account of_x000D_\n _x000D... Page Moderated 4.0 Miracles Do Happen\n22 February 2018\nOn the 17th of January we received a call in the night tha... on 26 Aug 2017\nSandy asks\nWhat blood type is she? Why can't she have a kidney from nz? What ar... Give The Gift Of Life To Maddie Maddie has a kidney disease that means she requires another kidn... False False False False False True False 42.691649
2023-04-25 The MacPhersons fight cancer - help support them on the journey Helping the MacPhersons with medical and support services costs during Hamish's cancer journey. https://static.givealittle.co.nz/assets/hero/318518b2-b8d1-448e-b65b-afef015c7a90-320:False https://givealittle.co.nz/cause/support-the-macphersons 169191.56 210000.0 closed Read more https://givealittle.co.nz/cause/support-the-macphersons 25 Apr 2023 25 Apr 2024 0 Otago 2462.0 Update 9 Sept 2023:\nIt is with huge grief that I share the news with you that our beloved Hamis... Medication (Dabrafenib and Trametinib), medical support services, mortgage, bills Created by_x000D_\nHeidi Martin-Johnson \n\n\n\n_x000D_\n Paying to a verified bank accoun... Page Moderated 8.0 With Grief and Love\n9 September 2023\nIt is with huge grief that I share the news with you that... NaN The MacPhersons fight cancer - help support them on the journey Helping the MacPhersons with med... False True False False False False False 80.567410
2021-05-22 Help bring my brother Matty home We need help bringing my critically ill brother home to NZ, cover hospital bills from overseas a... https://static.givealittle.co.nz/assets/hero/65a30032-0067-4c5d-8554-ad9e00cf48c5-320:False https://givealittle.co.nz/cause/help-bring-my-brother-matty-home 118398.61 126000.0 closed Read more https://givealittle.co.nz/cause/help-bring-my-brother-matty-home 22 May 2021 20 Nov 2021 7 Auckland 2346.0 UPDATE: Matty is now home and completed his stay in MIQ at north shore hospital. He has a long r... Flights / expenses to come home.Update on June 20th 2021: Your donations are also helping to cov... Created by, and paying to a verified bank account of,_x000D_\nSara Tomlinson on behalf of M... Page Moderated 24.0 Looking more like Matty\n27 October 2021\nHi team. Just wanted to send through this pic of Matty... on 20 Jul 2021\nGarth asks\nDear Sara,\nMy name is Garth Sutherland and I am from The Insides Co... Help bring my brother Matty home We need help bringing my critically ill brother home to NZ, cov... False False False False False False True 93.967151
2023-09-18 Help Simon fight his Cancer for his Kids Please help Simon keep fighting to see his kids grow older, and for them to bank lots of memorie... https://static.givealittle.co.nz/assets/hero/72cb9dca-7417-42e8-b21b-b085009a97d7-320:False https://givealittle.co.nz/cause/helpsimonfight 176291.25 300000.0 closed Read more https://givealittle.co.nz/cause/helpsimonfight 18 Sep 2023 21 Jun 2024 0 Auckland 2303.0 Hi, we are the Clark Whanau, Simon, Libby and our four kids Ethan (15), Jacob and Liam (5) and E... We set up this page specifically to pay for two drugs - pomalidomide and daratumumab and as at A... Created by, and paying to a verified bank account of,_x000D_\nSimon and Libby Clark Page Moderated 28.0 Devastated\n17 June 2024\nI'm devastated to let you know that my darling Simon passed away earli... NaN Help Simon fight his Cancer for his Kids Please help Simon keep fighting to see his kids grow ol... False True False False False False False 58.763750
2023-07-12 Carson requires brain surgery in London - help us fund his treatment - not available in NZ Please help Carson get the brain surgery he requires https://static.givealittle.co.nz/assets/hero/ed3b835d-de53-4926-a0f6-b03d01482eda-320:False https://givealittle.co.nz/cause/carson-requires-brain-surgery-in-london-help-us 130057.01 150000.0 closed Read more https://givealittle.co.nz/cause/carson-requires-brain-surgery-in-london-help-us 12 Jul 2023 31 Jan 2024 1 Manawatu / Whanganui 1979.0 Hi, my name is Carson Harvey, I am 16 years old and I live in Palmerston North.\nI have recently... The money will help us fund the procedure required for Carson and associated costs, including tr... Created by_x000D_\nCarson Harvey \n\n\n\n_x000D_\n Paying to a verified bank account of_x0... Page Moderated 17.0 THANK YOU TO ALL THAT HELPED\n26 January 2024\nWe would like to say a very big thank you to ever... on 9 Sep 2023\nShane asks\nHi Carson\nAre you guys interested in raffling off a homekill lamb? I... Carson requires brain surgery in London - help us fund his treatment - not available in NZ Pleas... False False False False False False False 86.704673
time: 47.5 ms (started: 2025-07-22 14:48:40 +12:00)
InĀ [16]:
df[df.location.isin(top_10.index)].groupby("location")["Target_completion"].mean().sort_values(ascending=False).plot.bar(title="Mean target completion % by location")
time: 90.6 ms (started: 2025-07-22 14:48:40 +12:00)
InĀ [17]:
df[df.location.isin(top_10.index)].groupby("location")["Target_completion"].median().sort_values(ascending=False).plot.bar(title="Median target completion % by location")
time: 65.2 ms (started: 2025-07-22 14:48:40 +12:00)
InĀ [18]:
fig = px.box(df[df.location.isin(top_10.index)], x="location", y="Target_completion", title="Target completion % by location")
fig.update_yaxes(range=[0, 200])
fig.show()
time: 74.1 ms (started: 2025-07-22 14:48:40 +12:00)
InĀ [19]:
px.scatter(df, x="n_donors", y="Target_completion", trendline="ols")
time: 243 ms (started: 2025-07-22 14:48:40 +12:00)
InĀ [20]:
px.scatter(df[(df.n_donors <= 200) & (df["Target_completion"] <= 110)], x="n_donors", y="Target_completion", trendline="ols")
time: 75.7 ms (started: 2025-07-22 14:48:41 +12:00)
InĀ [21]:
df["duration"] = (pd.to_datetime(df.end) - pd.to_datetime(df.start, format="mixed")).dt.days
px.scatter(df, x="duration", y="Target_completion", trendline="ols")
time: 221 ms (started: 2025-07-22 14:48:41 +12:00)
InĀ [22]:
px.scatter(df[(df.duration <= 100) & (df["Target_completion"] < 200)], x="duration", y="Target_completion", trendline="ols")
time: 63.6 ms (started: 2025-07-22 14:48:41 +12:00)
InĀ [23]:
import statsmodels.formula.api as smf

nona = df.dropna(subset=["location", "n_donors", "duration"])
nona["Cancer"] = nona.text.str.contains("Cancer", case=False).astype(int)
nona["Surgery"] = nona.text.str.contains("Surgery", case=False).astype(int)
nona["Auckland"] = nona.location.str.contains("Auckland").astype(int)
nona["Wellington"] = nona.location.str.contains("Wellington").astype(int)
smf.ols(formula="Target_completion ~ Cancer + Surgery + Auckland + Wellington + n_donors + duration", data=nona).fit().summary()
Out[23]:
OLS Regression Results
Dep. Variable: Target_completion R-squared: 0.002
Model: OLS Adj. R-squared: 0.001
Method: Least Squares F-statistic: 1.436
Date: Tue, 22 Jul 2025 Prob (F-statistic): 0.197
Time: 14:48:41 Log-Likelihood: -36138.
No. Observations: 4484 AIC: 7.229e+04
Df Residuals: 4477 BIC: 7.233e+04
Df Model: 6
Covariance Type: nonrobust
coef std err t P>|t| [0.025 0.975]
Intercept 65.2029 20.979 3.108 0.002 24.074 106.332
Cancer -8.6531 24.939 -0.347 0.729 -57.546 40.240
Surgery 13.4782 24.481 0.551 0.582 -34.518 61.474
Auckland 2.2188 25.639 0.087 0.931 -48.046 52.484
Wellington 93.8392 38.990 2.407 0.016 17.399 170.279
n_donors 0.0396 0.049 0.814 0.416 -0.056 0.135
duration -0.1153 0.082 -1.407 0.159 -0.276 0.045
Omnibus: 13812.701 Durbin-Watson: 2.003
Prob(Omnibus): 0.000 Jarque-Bera (JB): 1147081371.035
Skew: 46.416 Prob(JB): 0.00
Kurtosis: 2479.081 Cond. No. 941.


Notes:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
time: 209 ms (started: 2025-07-22 14:48:41 +12:00)