jsulz HF staff commited on
Commit
71743f9
1 Parent(s): f039c3d

fixing some plotly stuff

Browse files
Files changed (2) hide show
  1. README.md +0 -2
  2. app.py +1 -16
README.md CHANGED
@@ -41,8 +41,6 @@ All of this needs context needs to live in the app in some form alongside the co
41
 
42
  All of the labels and words that do exist need cleanup. Not worried about that for the moment.
43
 
44
- The charts filter out all non-running spaces, which is suboptimal. Unfortunately Plotly starts to squak when you have too many data points. The only alternative here is to move to Matplotlib, which I can do, but I'm being lazy.
45
-
46
  # Spaces Overview
47
 
48
  Charts exist for the following (commentary for each in sub-bullets):
 
41
 
42
  All of the labels and words that do exist need cleanup. Not worried about that for the moment.
43
 
 
 
44
  # Spaces Overview
45
 
46
  Charts exist for the following (commentary for each in sub-bullets):
app.py CHANGED
@@ -198,23 +198,8 @@ def flatten_column(_df, column):
198
 
199
  with gr.Blocks(fill_width=True) as demo:
200
  df = load_transform_data()
201
- df = df[df["stage"] == "RUNNING"]
202
- with gr.Tab(label="Spaces Overview"):
203
-
204
- # The Pandas dataframe has a datetime column. Plot the growth of spaces (row entries) over time.
205
- # The x-axis should be the date and the y-axis should be the cumulative number of spaces created up to that date .
206
- df = df.sort_values("created_at")
207
- df["cumulative_spaces"] = df["created_at"].rank(method="first").astype(int)
208
- fig1 = px.line(
209
- df,
210
- x="created_at",
211
- y="cumulative_spaces",
212
- title="Growth of Spaces Over Time",
213
- labels={"created_at": "Date", "cumulative_spaces": "Number of Spaces"},
214
- template="plotly_dark",
215
- )
216
- gr.Plot(fig1)
217
 
 
218
  with gr.Row():
219
  # Create a pie charge showing the distribution of spaces by SDK
220
  fig2 = px.pie(
 
198
 
199
  with gr.Blocks(fill_width=True) as demo:
200
  df = load_transform_data()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
 
202
+ with gr.Tab(label="Spaces Overview"):
203
  with gr.Row():
204
  # Create a pie charge showing the distribution of spaces by SDK
205
  fig2 = px.pie(