Joshua1808 commited on
Commit
9ffd42a
·
1 Parent(s): 485e4eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -120,7 +120,7 @@ def tweets_localidad(buscar_localidad):
120
  geolocator = Nominatim(user_agent="nombre_del_usuario")
121
  location = geolocator.geocode(buscar_localidad)
122
  radius = "15km"
123
- tweets = api.search_tweets(q="",lang="es",geocode=f"{location.latitude},{location.longitude},{radius}", count = 500, tweet_mode="extended")
124
  result = []
125
  for tweet in tweets:
126
  if (tweet.full_text.startswith('RT')):
@@ -149,8 +149,8 @@ def tweets_localidad(buscar_localidad):
149
  fig, ax = plt.subplots()
150
  fig.set_size_inches(1, 1)
151
  plt.pie(resultado,labels=resultado.index,autopct='%1.1f%%',colors=colores)
152
- ax.set_title("Porcentajes por Categorias", fontsize=8, fontweight="bold")
153
- plt.rcParams.update({'font.size':8, 'font.weight':'bold'})
154
  ax.legend()
155
  # Muestra el gráfico
156
  plt.show()
 
120
  geolocator = Nominatim(user_agent="nombre_del_usuario")
121
  location = geolocator.geocode(buscar_localidad)
122
  radius = "15km"
123
+ tweets = api.search_tweets(q="",lang="es",geocode=f"{location.latitude},{location.longitude},{radius}", count = 1000, tweet_mode="extended")
124
  result = []
125
  for tweet in tweets:
126
  if (tweet.full_text.startswith('RT')):
 
149
  fig, ax = plt.subplots()
150
  fig.set_size_inches(1, 1)
151
  plt.pie(resultado,labels=resultado.index,autopct='%1.1f%%',colors=colores)
152
+ ax.set_title("Porcentajes por Categorias", fontsize=1, fontweight="bold")
153
+ plt.rcParams.update({'font.size':1, 'font.weight':'bold'})
154
  ax.legend()
155
  # Muestra el gráfico
156
  plt.show()