<jupyter_start><jupyter_text>--- Welcome to Project Better Help! ---BackgroundBetterHelp is a mobile app that I have always wondered if their way of (virtual therapy sessions and ability to reach out to your therapist instantly via messaging in crisis situations) delivering psychological therapy really works -- even after post-covid times? So, I took the liberty to analyse what their customers say. I start by scraping Better Help's most recent (starting in the beginning of 2022) Appstore and Google Play reviews and write them into a file.<jupyter_code>#download and import necessary modules
import sys
!{sys.executable} -m pip install google-play-scraper
!{sys.executable} -m pip install app_store_scraper

from app_store_scraper import AppStore
import pandas as pd
import numpy as np
import json
import datetime
#Appstore scraping
betterhelp_appstore = AppStore(country='us', app_name='betterhelp-therapy', app_id = '995252384')
betterhelp_appstore.review(after= datetime.datetime(2021, 12, 31)) #retrieve most recent reviews from beginning of 2022
display(betterhelp_appstore[:5])
betterhelp_appstore = pd.DataFrame(betterhelp_appstore.reviews)
betterhelp_appstore.columns
keep_col = ['rating','review','date']
betterhelp_appstore = betterhelp_appstore[keep_col]
betterhelp_appstore = betterhelp_appstore.sort_values(by = 'date')
display(betterhelp_appstore[:5])
#Google Play scraping
from google_play_scraper import Sort, reviews_all
betterhelp_googleplay = reviews_all('com.betterhelp', Sort.NEWEST)

betterhelp_googleplay = pd.DataFrame.from_dict(betterhelp_googleplay, orient='columns')
betterhelp_googleplay = betterhelp_googleplay[betterhelp_googleplay['at'] > '2021-12-31'] #retrieve comments starting from 2022
keep_col = ['score','content','at']
betterhelp_googleplay = betterhelp_googleplay[keep_col]
betterhelp_googleplay = betterhelp_googleplay.sort_values(by = 'at')
display(betterhelp_googleplay[:5])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08350409836065574, 'fraction_numerical': 0.020491803278688523, 'mean_word_length': 7.71875, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '511795', 'license': 'CC0-1.0', 'n_tokens_mistral': 607, 'n_tokens_neox': 554, 'n_words': 175, 'path': 'Project-BetterHelp.ipynb', 'repo_name': 'sehriruya/portfolio', 'size': '1952'}