ganeshkumar383 commited on
Commit
1cd1f86
·
verified ·
1 Parent(s): a45f5a0

Create trends_fetcher.py

Browse files
Files changed (1) hide show
  1. trends_fetcher.py +15 -0
trends_fetcher.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import random
2
+
3
+ # Simulate fetch trending topics
4
+
5
+ def fetch_world_trends():
6
+ countries = ["United States", "India", "United Kingdom", "Canada", "Australia"]
7
+ topics = [f"Trend_{random.randint(1, 100)}" for _ in range(10)]
8
+
9
+ data = []
10
+ for country in countries:
11
+ for topic in topics:
12
+ sentiment = random.uniform(-1, 1) # Simulate sentiment score
13
+ data.append({"country": country, "topic": topic, "sentiment": sentiment})
14
+
15
+ return data