cyberosa commited on
Commit
ee5e1cf
·
1 Parent(s): 3058723

updating daily data

Browse files
data/closed_markets_div.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5c4c745aac0b39f8819e642b9eb079dc944838719f55ba7bd5bbaa1c53e66fde
3
- size 59155
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:444276990e2d95ffbc3b30fadbe05cb884dad0c87b1d22b22c849e3ccb68d20c
3
+ size 67375
data/unknown_daily_traders.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1c264104712763aa1e6ca15ce4cd8a6b445f1b3db3626bf96ee1f7dd5b917ca0
3
- size 23862
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb7ccb7798037ab116928f78c0f3c3113d99db3eed8338ce93f6be6e29c1469e
3
+ size 182708
data/unknown_traders.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:facb6d44b0ca6896cd98108283bc9527aee15ca3ca99df7a7c364ad2fb53b172
3
- size 320009
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b11d6db3a813c3a7b98fc947d1275d16db706bf70439356fc58740703f7e497
3
+ size 362606
data/weekly_mech_calls.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:680848115c5adfed614890c96d457dd17876acd3d593b1ffce71fbcacb23d275
3
- size 54727
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39b4cf253e9fffc20d584d25410efb8428612413a9f002ba0314216dc56b0ca2
3
+ size 54927
notebooks/retention_metrics.ipynb CHANGED
@@ -2,7 +2,7 @@
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
- "execution_count": 10,
6
  "metadata": {},
7
  "outputs": [],
8
  "source": [
@@ -12,13 +12,6 @@
12
  "import gc"
13
  ]
14
  },
15
- {
16
- "cell_type": "code",
17
- "execution_count": null,
18
- "metadata": {},
19
- "outputs": [],
20
- "source": []
21
- },
22
  {
23
  "cell_type": "markdown",
24
  "metadata": {},
@@ -28,7 +21,7 @@
28
  },
29
  {
30
  "cell_type": "code",
31
- "execution_count": 40,
32
  "metadata": {},
33
  "outputs": [],
34
  "source": [
@@ -37,7 +30,7 @@
37
  },
38
  {
39
  "cell_type": "code",
40
- "execution_count": 41,
41
  "metadata": {},
42
  "outputs": [
43
  {
@@ -48,7 +41,7 @@
48
  " dtype='object')"
49
  ]
50
  },
51
- "execution_count": 41,
52
  "metadata": {},
53
  "output_type": "execute_result"
54
  }
@@ -90,7 +83,7 @@
90
  },
91
  {
92
  "cell_type": "code",
93
- "execution_count": 43,
94
  "metadata": {},
95
  "outputs": [],
96
  "source": [
@@ -101,7 +94,7 @@
101
  },
102
  {
103
  "cell_type": "code",
104
- "execution_count": 44,
105
  "metadata": {},
106
  "outputs": [],
107
  "source": [
@@ -501,6 +494,31 @@
501
  "retention_df.head()"
502
  ]
503
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
  {
505
  "cell_type": "code",
506
  "execution_count": 14,
@@ -535,12 +553,21 @@
535
  },
536
  {
537
  "cell_type": "code",
538
- "execution_count": 50,
539
  "metadata": {},
540
  "outputs": [],
541
  "source": [
542
  "# read trades dataset\n",
543
- "traders_df = pd.read_parquet(\"../data/all_trades_profitability.parquet\")\n",
 
 
 
 
 
 
 
 
 
544
  "unknown_df = pd.read_parquet(\"../data/unknown_traders.parquet\")\n"
545
  ]
546
  },
@@ -2381,16 +2408,28 @@
2381
  },
2382
  {
2383
  "cell_type": "code",
2384
- "execution_count": 82,
2385
  "metadata": {},
2386
- "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
2387
  "source": [
2388
  "olas_data.rename(columns={\"request_time\": \"creation_timestamp\"}, inplace=True)"
2389
  ]
2390
  },
2391
  {
2392
  "cell_type": "code",
2393
- "execution_count": 83,
2394
  "metadata": {},
2395
  "outputs": [
2396
  {
@@ -2418,7 +2457,7 @@
2418
  },
2419
  {
2420
  "cell_type": "code",
2421
- "execution_count": 84,
2422
  "metadata": {},
2423
  "outputs": [],
2424
  "source": [
@@ -2574,7 +2613,7 @@
2574
  },
2575
  {
2576
  "cell_type": "code",
2577
- "execution_count": 85,
2578
  "metadata": {},
2579
  "outputs": [
2580
  {
@@ -2585,7 +2624,7 @@
2585
  " 'Jan-12-2025', 'Jan-19-2025'], dtype=object)"
2586
  ]
2587
  },
2588
- "execution_count": 85,
2589
  "metadata": {},
2590
  "output_type": "execute_result"
2591
  }
@@ -2597,7 +2636,7 @@
2597
  },
2598
  {
2599
  "cell_type": "code",
2600
- "execution_count": 86,
2601
  "metadata": {},
2602
  "outputs": [],
2603
  "source": [
@@ -2609,7 +2648,7 @@
2609
  },
2610
  {
2611
  "cell_type": "code",
2612
- "execution_count": 70,
2613
  "metadata": {},
2614
  "outputs": [
2615
  {
@@ -2620,7 +2659,7 @@
2620
  " 'Jan-12-2025', 'Jan-19-2025'], dtype=object)"
2621
  ]
2622
  },
2623
- "execution_count": 70,
2624
  "metadata": {},
2625
  "output_type": "execute_result"
2626
  }
@@ -2631,7 +2670,7 @@
2631
  },
2632
  {
2633
  "cell_type": "code",
2634
- "execution_count": 87,
2635
  "metadata": {},
2636
  "outputs": [],
2637
  "source": [
@@ -2653,6 +2692,35 @@
2653
  ")"
2654
  ]
2655
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2656
  {
2657
  "cell_type": "code",
2658
  "execution_count": 88,
 
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
+ "execution_count": 89,
6
  "metadata": {},
7
  "outputs": [],
8
  "source": [
 
12
  "import gc"
13
  ]
14
  },
 
 
 
 
 
 
 
15
  {
16
  "cell_type": "markdown",
17
  "metadata": {},
 
21
  },
22
  {
23
  "cell_type": "code",
24
+ "execution_count": 90,
25
  "metadata": {},
26
  "outputs": [],
27
  "source": [
 
30
  },
31
  {
32
  "cell_type": "code",
33
+ "execution_count": 91,
34
  "metadata": {},
35
  "outputs": [
36
  {
 
41
  " dtype='object')"
42
  ]
43
  },
44
+ "execution_count": 91,
45
  "metadata": {},
46
  "output_type": "execute_result"
47
  }
 
83
  },
84
  {
85
  "cell_type": "code",
86
+ "execution_count": 92,
87
  "metadata": {},
88
  "outputs": [],
89
  "source": [
 
94
  },
95
  {
96
  "cell_type": "code",
97
+ "execution_count": 93,
98
  "metadata": {},
99
  "outputs": [],
100
  "source": [
 
494
  "retention_df.head()"
495
  ]
496
  },
497
+ {
498
+ "cell_type": "code",
499
+ "execution_count": 105,
500
+ "metadata": {},
501
+ "outputs": [
502
+ {
503
+ "data": {
504
+ "text/plain": [
505
+ "staking\n",
506
+ "non_Olas 738323\n",
507
+ "non_staking 199043\n",
508
+ "pearl 44001\n",
509
+ "quickstart 39276\n",
510
+ "Name: count, dtype: int64"
511
+ ]
512
+ },
513
+ "execution_count": 105,
514
+ "metadata": {},
515
+ "output_type": "execute_result"
516
+ }
517
+ ],
518
+ "source": [
519
+ "retention_df.staking.value_counts()"
520
+ ]
521
+ },
522
  {
523
  "cell_type": "code",
524
  "execution_count": 14,
 
553
  },
554
  {
555
  "cell_type": "code",
556
+ "execution_count": null,
557
  "metadata": {},
558
  "outputs": [],
559
  "source": [
560
  "# read trades dataset\n",
561
+ "traders_df = pd.read_parquet(\"../data/all_trades_profitability.parquet\")"
562
+ ]
563
+ },
564
+ {
565
+ "cell_type": "code",
566
+ "execution_count": 94,
567
+ "metadata": {},
568
+ "outputs": [],
569
+ "source": [
570
+ "\n",
571
  "unknown_df = pd.read_parquet(\"../data/unknown_traders.parquet\")\n"
572
  ]
573
  },
 
2408
  },
2409
  {
2410
  "cell_type": "code",
2411
+ "execution_count": 96,
2412
  "metadata": {},
2413
+ "outputs": [
2414
+ {
2415
+ "name": "stderr",
2416
+ "output_type": "stream",
2417
+ "text": [
2418
+ "/var/folders/gp/02mb1d514ng739czlxw1lhh00000gn/T/ipykernel_51242/3309953326.py:1: SettingWithCopyWarning: \n",
2419
+ "A value is trying to be set on a copy of a slice from a DataFrame\n",
2420
+ "\n",
2421
+ "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
2422
+ " olas_data.rename(columns={\"request_time\": \"creation_timestamp\"}, inplace=True)\n"
2423
+ ]
2424
+ }
2425
+ ],
2426
  "source": [
2427
  "olas_data.rename(columns={\"request_time\": \"creation_timestamp\"}, inplace=True)"
2428
  ]
2429
  },
2430
  {
2431
  "cell_type": "code",
2432
+ "execution_count": 97,
2433
  "metadata": {},
2434
  "outputs": [
2435
  {
 
2457
  },
2458
  {
2459
  "cell_type": "code",
2460
+ "execution_count": 98,
2461
  "metadata": {},
2462
  "outputs": [],
2463
  "source": [
 
2613
  },
2614
  {
2615
  "cell_type": "code",
2616
+ "execution_count": 99,
2617
  "metadata": {},
2618
  "outputs": [
2619
  {
 
2624
  " 'Jan-12-2025', 'Jan-19-2025'], dtype=object)"
2625
  ]
2626
  },
2627
+ "execution_count": 99,
2628
  "metadata": {},
2629
  "output_type": "execute_result"
2630
  }
 
2636
  },
2637
  {
2638
  "cell_type": "code",
2639
+ "execution_count": 101,
2640
  "metadata": {},
2641
  "outputs": [],
2642
  "source": [
 
2648
  },
2649
  {
2650
  "cell_type": "code",
2651
+ "execution_count": 102,
2652
  "metadata": {},
2653
  "outputs": [
2654
  {
 
2659
  " 'Jan-12-2025', 'Jan-19-2025'], dtype=object)"
2660
  ]
2661
  },
2662
+ "execution_count": 102,
2663
  "metadata": {},
2664
  "output_type": "execute_result"
2665
  }
 
2670
  },
2671
  {
2672
  "cell_type": "code",
2673
+ "execution_count": 103,
2674
  "metadata": {},
2675
  "outputs": [],
2676
  "source": [
 
2692
  ")"
2693
  ]
2694
  },
2695
+ {
2696
+ "cell_type": "code",
2697
+ "execution_count": 104,
2698
+ "metadata": {},
2699
+ "outputs": [
2700
+ {
2701
+ "name": "stdout",
2702
+ "output_type": "stream",
2703
+ "text": [
2704
+ "cohort_week\n",
2705
+ "Dec-01-2024 12\n",
2706
+ "Dec-08-2024 12\n",
2707
+ "Dec-15-2024 10\n",
2708
+ "Dec-22-2024 2\n",
2709
+ "Dec-29-2024 1\n",
2710
+ "Jan-05-2025 1\n",
2711
+ "Jan-19-2025 1\n",
2712
+ "Nov-17-2024 202\n",
2713
+ "Nov-24-2024 30\n",
2714
+ "Name: trader_address, dtype: int64\n"
2715
+ ]
2716
+ }
2717
+ ],
2718
+ "source": [
2719
+ "cohort_sizes = cohort_data.groupby(\"cohort_week\")[\"trader_address\"].nunique()\n",
2720
+ "\n",
2721
+ "print(cohort_sizes)"
2722
+ ]
2723
+ },
2724
  {
2725
  "cell_type": "code",
2726
  "execution_count": 88,