The venerable courtroom show takes a look at real-life couples. The soon-to-be exes tell their stories to the judge, who gives the ruling and settles all the usual -- and unusual -- divorce issues by the end of the episode. This is the third incarnation of the show titled "Divorce Court," with the first having premiered in 1957.
Different from other court shows, "Lauren Lake's Paternity Court" acts only on family issues. There are no battles over rent money or damages caused by a car accident. These emotional cases can have life-changing consequences for participants and sometimes new beginnings for individuals.
With her no-nonsense attitude, Judy Sheindlin, a former judge from New York, presides over some real-life small claims cases, where the damages awarded cannot be above $5,000.
Judge Greg Mathis is unlike most adjudicators you'd see in a courtroom. The former Detroit-area district court judge infuses his court sessions with a generous dose of humor as he listens to diverse litigants plead their small-claims
Dana and Keith Cutler have been practicing law together for almost 30 years. They are legal experts and trial attorneys and are the first married couple to preside over a television courtroom. Dana and Keith are graduates of the University of Missouri-Kansas City School of La
# lets import libraries
from googleapiclient.discovery import build
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
# Function to get Divorce Court Youtube channel statistics
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
Divorce_Court_channel_id = ['UCdCj47cPTxr7GxeaBNkRmCA' # Divorce Court
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, Divorce_Court_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(Divorce_Court_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube,Divorce_Court_channel_id)
[{'Channel_name': 'Divorce Court', 'Subscribers': '955000', 'Views': '594166254', 'Total_videos': '5226'}]
channel_statistics = get_channel_stats(youtube,Divorce_Court_channel_id )
Divorce_Court_channel_data =pd.DataFrame(channel_statistics)
Divorce_Court_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | Divorce Court | 955000 | 594166254 | 5226 |
# Function to get Paternity Court Youtube channel statistics
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
Paternity_Court_channel_id = ['UC5w5rFxcZ4UL_IJSOFWo9OQ' # Paternity Court
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, Paternity_Court_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(Paternity_Court_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube,Paternity_Court_channel_id)
[{'Channel_name': 'Paternity Court', 'Subscribers': '3390000', 'Views': '1625906846', 'Total_videos': '1843'}]
channel_statistics = get_channel_stats(youtube,Paternity_Court_channel_id)
Paternity_Court_channel_data =pd.DataFrame(channel_statistics)
Paternity_Court_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | Paternity Court | 3390000 | 1625906846 | 1843 |
# Function to get Judge Judy Youtube channel statistics
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
Judge_Judy_channel_id = ['UCzMPPxbQG6iZttQhq3ukXSg' # Judge Judy
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, Judge_Judy_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(Judge_Judy_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube,Judge_Judy_channel_id )
[{'Channel_name': 'Judge Judy', 'Subscribers': '730000', 'Views': '814015576', 'Total_videos': '2384'}]
channel_statistics = get_channel_stats(youtube,Judge_Judy_channel_id )
Judge_Judy_channel_data =pd.DataFrame(channel_statistics)
Judge_Judy_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | Judge Judy | 730000 | 814015576 | 2384 |
# Function to get Judge Marthis Youtube channel statistics
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
Judge_Marthis_channel_id = ['UCd_RIVeXkpOSrUfyMR8ktfA' # Judge Marthis
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, Judge_Marthis_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(Judge_Marthis_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube,Judge_Marthis_channel_id)
[{'Channel_name': 'Judge Mathis', 'Subscribers': '612000', 'Views': '678619290', 'Total_videos': '6248'}]
channel_statistics = get_channel_stats(youtube,Judge_Marthis_channel_id )
Judge_Marthis_channel_data =pd.DataFrame(channel_statistics)
Judge_Marthis_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | Judge Mathis | 612000 | 678619290 | 6248 |
# Function to get Couples Court Youtube channel statistics
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
Couples_Court_channel_id = ['UCis8-aFFycLZgNI4bqNcE5g' # Couples Court
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube,Couples_Court_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(Couples_Court_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube,Couples_Court_channel_id)
[{'Channel_name': 'Couples Court', 'Subscribers': '395000', 'Views': '169032462', 'Total_videos': '669'}]
channel_statistics = get_channel_stats(youtube,Couples_Court_channel_id )
Couples_Court_channel_data =pd.DataFrame(channel_statistics)
Couples_Court_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | Couples Court | 395000 | 169032462 | 669 |
# Combine DataFrames using concat
combined_court_channels_df = pd.concat([
Divorce_Court_channel_data ,
Paternity_Court_channel_data,
Judge_Judy_channel_data,
Judge_Marthis_channel_data ,
Couples_Court_channel_data,
], ignore_index=True)
# Display the result
print(combined_court_channels_df)
Channel_name Subscribers Views Total_videos 0 Divorce Court 955000 594166254 5226 1 Paternity Court 3390000 1625906846 1843 2 Judge Judy 730000 814015576 2384 3 Judge Mathis 612000 678619290 6248 4 Couples Court 395000 169032462 669
# lets change the datatypes to perform visualisations
combined_court_channels_df['Subscribers'] = pd.to_numeric(combined_court_channels_df['Subscribers'])
combined_court_channels_df['Views'] = pd.to_numeric(combined_court_channels_df['Views'])
combined_court_channels_df['Total_videos'] = pd.to_numeric(combined_court_channels_df['Total_videos'])
# letsconirm if the datatypes has changed
combined_court_channels_df.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 5 entries, 0 to 4 Data columns (total 4 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 Channel_name 5 non-null object 1 Subscribers 5 non-null int64 2 Views 5 non-null int64 3 Total_videos 5 non-null int64 dtypes: int64(3), object(1) memory usage: 292.0+ bytes
import matplotlib.pyplot as plt
# Sort the DataFrame by 'Subscribers' in descending order
combined_court_channels_df_subscribers_sorted = combined_court_channels_df.sort_values(by='Subscribers', ascending=False)
# Plotting Subscribers in descending order
fig, axes = plt.subplots(nrows=3, ncols=1, figsize=(10, 15))
axes[0].bar(combined_court_channels_df_subscribers_sorted['Channel_name'],combined_court_channels_df_subscribers_sorted['Subscribers'], color='blue')
axes[0].set_title('Subscribers')
# Sort the DataFrame by 'Views' in descendcombined_real_estate_channels_dfing order
combined_court_channels_df_views_sorted = combined_court_channels_df.sort_values(by='Views', ascending=False)
# Plotting Views in descending order
axes[1].bar(combined_court_channels_df_views_sorted['Channel_name'],combined_court_channels_df_views_sorted['Views'], color='green')
axes[1].set_title('Views')
# Sort the DataFrame by 'Total_videos' in descending order
combined_court_channels_df_total_videos_sorted = combined_court_channels_df.sort_values(by='Total_videos', ascending=False)
# Plotting Total Videos in descending order
axes[2].bar(combined_court_channels_df_total_videos_sorted['Channel_name'], combined_court_channels_df_total_videos_sorted['Total_videos'], color='orange')
axes[2].set_title('Total Videos')
# Adjust layout for better visibility
plt.tight_layout()
# Show the plot
plt.show()