f12
f12
# 1. Analyze the relationship between the type of cuisine and the restaurant's
rating
# First, we need to create a dataframe with cuisine-level data
cuisine_data = []
cuisine_df = pd.DataFrame(cuisine_data)
# 2. Identify the most popular cuisines among customers based on the number of
votes
cuisine_popularity = cuisine_ratings.sort_values('Votes', ascending=False)
# 3. Determine if there are any specific cuisines that tend to receive higher
ratings
# Calculate the percentage of high-rated restaurants (4.0+ stars) for each cuisine
high_rating_threshold = 4.0
# Create a scatter plot to visualize the relationship between popularity and rating
plt.figure(figsize=(14, 10))
sns.scatterplot(
x='Votes',
y='Rating',
size='Count',
sizes=(50, 500),
alpha=0.7,
data=cuisine_ratings[cuisine_ratings['Count'] >= 10]
)