GuglielmoTor commited on
Commit
8e299ad
·
verified ·
1 Parent(s): dd06b11

Update analytics_fetch_and_rendering.py

Browse files
Files changed (1) hide show
  1. analytics_fetch_and_rendering.py +5 -1
analytics_fetch_and_rendering.py CHANGED
@@ -11,6 +11,10 @@ from error_handling import display_error
11
 
12
  from Data_Fetching_and_Rendering import fetch_posts_and_stats
13
 
 
 
 
 
14
  API_V2_BASE = 'https://api.linkedin.com/v2'
15
  API_REST_BASE = 'https://api.linkedin.com/rest'
16
 
@@ -220,7 +224,7 @@ def compute_post_interaction_metrics(posts):
220
  "clicks_per_post": round(stats["clicks"] / posts_count, 2),
221
  "comment_share_of_engagement": round((stats["comments"] / total_engagement) * 100 if total_engagement else 0, 2)
222
  })
223
-
224
  return results
225
 
226
  def plot_interaction_metrics(data):
 
11
 
12
  from Data_Fetching_and_Rendering import fetch_posts_and_stats
13
 
14
+ import logging
15
+
16
+ logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
17
+
18
  API_V2_BASE = 'https://api.linkedin.com/v2'
19
  API_REST_BASE = 'https://api.linkedin.com/rest'
20
 
 
224
  "clicks_per_post": round(stats["clicks"] / posts_count, 2),
225
  "comment_share_of_engagement": round((stats["comments"] / total_engagement) * 100 if total_engagement else 0, 2)
226
  })
227
+ logging.info(f"this are the inter<ction results {results")
228
  return results
229
 
230
  def plot_interaction_metrics(data):