Skip to content

Instantly share code, notes, and snippets.

@m-kus
Created July 10, 2019 21:29
Show Gist options
  • Save m-kus/c69201777690491d012090ff82c7c32c to your computer and use it in GitHub Desktop.
Save m-kus/c69201777690491d012090ff82c7c32c to your computer and use it in GitHub Desktop.
Smart contract originations by source language
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
" <script type=\"text/javascript\">\n",
" window.PlotlyConfig = {MathJaxConfig: 'local'};\n",
" if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}\n",
" if (typeof require !== 'undefined') {\n",
" require.undef(\"plotly\");\n",
" requirejs.config({\n",
" paths: {\n",
" 'plotly': ['https://cdn.plot.ly/plotly-latest.min']\n",
" }\n",
" });\n",
" require(['plotly'], function(Plotly) {\n",
" window._Plotly = Plotly;\n",
" });\n",
" }\n",
" </script>\n",
" "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from conseil import conseil\n",
"import pandas as pd\n",
"import cufflinks as cf\n",
"import numpy as np\n",
"import requests\n",
"import dateutil"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
" <script type=\"text/javascript\">\n",
" window.PlotlyConfig = {MathJaxConfig: 'local'};\n",
" if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}\n",
" if (typeof require !== 'undefined') {\n",
" require.undef(\"plotly\");\n",
" requirejs.config({\n",
" paths: {\n",
" 'plotly': ['https://cdn.plot.ly/plotly-latest.min']\n",
" }\n",
" });\n",
" require(['plotly'], function(Plotly) {\n",
" window._Plotly = Plotly;\n",
" });\n",
" }\n",
" </script>\n",
" "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"cf.set_config_file(offline=True, world_readable=True, theme='pearl')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"Operation = conseil.tezos.alphanet.operations"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"non_liq_ts = Operation.query(Operation.timestamp.max().label('ts')) \\\n",
" .filter(Operation.kind == Operation.kind.origination,\n",
" Operation.script.notlike('_slash_'),\n",
" Operation.script.notlike('_prim_'),\n",
" Operation.script.notlike('_sharp_'),\n",
" Operation.script.notlike('_Liq_')) \\\n",
" .group_by(Operation.script) \\\n",
" .order_by(Operation.timestamp.max()) \\\n",
" .all()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"all_ts = Operation.query(Operation.timestamp.max().label('ts')) \\\n",
" .filter(Operation.kind == Operation.kind.origination) \\\n",
" .group_by(Operation.script) \\\n",
" .order_by(Operation.timestamp.max()) \\\n",
" .all()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"df_oth = pd.DataFrame(non_liq_ts)\n",
"df_oth.index = df_oth['ts'].astype('M8[ms]')\n",
"df_oth['non_liquidity'] = 1\n",
"\n",
"df_all = pd.DataFrame(all_ts)\n",
"df_all.index = df_all['ts'].astype('M8[ms]')\n",
"df_all['all'] = 1"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"df = pd.merge(df_oth, df_all, left_index=True, right_index=True, how='outer').fillna(0)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"df['liquidity'] = df['all'] - df['non_liquidity']"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"df_liq = df[df['liquidity'] > 0][['liquidity']].copy()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"df = pd.merge_asof(df_oth.cumsum(), df_liq.cumsum(), left_index=True, right_index=True)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": true
},
"data": [
{
"line": {
"color": "rgba(255, 153, 51, 1.0)",
"dash": "solid",
"shape": "linear",
"width": 1.3
},
"mode": "lines",
"name": "liquidity",
"text": "",
"type": "scatter",
"uid": "30c207f7-f803-4fcc-a438-1c72ac21571a",
"x": [
"2018-12-06 09:29:18",
"2018-12-06 13:55:38",
"2018-12-06 13:56:08",
"2018-12-06 16:42:48",
"2018-12-06 16:47:48",
"2018-12-06 16:57:38",
"2018-12-06 19:58:18",
"2018-12-06 19:58:48",
"2018-12-06 19:59:18",
"2018-12-10 08:54:28",
"2018-12-10 09:29:48",
"2018-12-10 09:57:58",
"2018-12-10 10:15:48",
"2018-12-10 10:24:58",
"2018-12-10 10:29:28",
"2018-12-10 10:36:18",
"2018-12-10 10:40:38",
"2018-12-14 08:46:58",
"2018-12-14 09:24:48",
"2018-12-14 09:25:18",
"2018-12-14 09:25:48",
"2018-12-14 09:26:48",
"2018-12-14 15:19:38",
"2019-01-02 16:04:28",
"2019-01-23 04:10:08",
"2019-02-19 17:52:08",
"2019-02-21 02:03:28",
"2019-02-21 04:50:38",
"2019-02-21 04:55:38",
"2019-02-21 04:58:48",
"2019-02-21 15:09:08",
"2019-02-22 10:51:58",
"2019-02-22 11:07:48",
"2019-02-23 12:16:58",
"2019-02-23 12:16:58",
"2019-02-23 12:17:28",
"2019-02-23 12:21:08",
"2019-02-24 01:44:58",
"2019-03-01 01:22:48",
"2019-03-10 01:20:28",
"2019-03-10 09:24:48",
"2019-03-10 10:34:38",
"2019-03-11 03:05:58",
"2019-03-11 11:30:28",
"2019-03-15 01:33:28",
"2019-03-15 02:07:48",
"2019-03-15 02:42:18",
"2019-03-15 02:51:28",
"2019-03-15 23:49:08",
"2019-03-15 23:55:48",
"2019-03-16 18:03:08",
"2019-03-16 18:11:38",
"2019-03-16 18:13:48",
"2019-03-16 18:27:18",
"2019-03-16 18:29:58",
"2019-03-16 20:59:28",
"2019-03-16 22:15:48",
"2019-03-21 14:18:18",
"2019-03-23 15:34:18",
"2019-04-05 10:05:28",
"2019-04-08 23:02:28",
"2019-04-09 00:54:48",
"2019-04-11 09:35:38",
"2019-04-17 08:18:58",
"2019-04-17 08:19:28",
"2019-04-17 08:19:58",
"2019-04-17 10:23:48",
"2019-04-17 10:24:18",
"2019-04-17 10:24:48",
"2019-04-18 04:01:38",
"2019-04-18 04:02:38",
"2019-04-18 06:00:58",
"2019-04-18 07:41:38",
"2019-04-18 07:42:48",
"2019-04-18 07:43:48",
"2019-04-18 08:46:58",
"2019-04-18 09:07:38",
"2019-04-24 08:00:58",
"2019-04-24 08:01:28",
"2019-04-24 08:02:38",
"2019-04-24 08:03:08",
"2019-04-24 08:04:08",
"2019-05-01 05:38:08",
"2019-05-04 12:59:08",
"2019-05-04 13:23:48",
"2019-05-04 13:43:18",
"2019-05-04 16:25:58",
"2019-05-05 15:16:18",
"2019-05-08 02:38:58",
"2019-05-10 14:48:18",
"2019-05-11 08:16:08",
"2019-05-11 08:47:08",
"2019-05-11 08:54:38",
"2019-05-13 02:45:18",
"2019-05-14 20:28:58",
"2019-05-14 20:49:08",
"2019-05-14 22:02:38",
"2019-05-14 22:21:58",
"2019-05-14 22:44:28",
"2019-05-14 22:45:28",
"2019-05-17 20:54:28",
"2019-05-23 20:08:38",
"2019-05-23 20:10:18",
"2019-05-24 21:58:08",
"2019-05-30 19:30:38",
"2019-06-02 07:06:48",
"2019-06-07 16:27:18",
"2019-06-10 20:47:48",
"2019-06-15 07:23:08",
"2019-06-18 16:08:28",
"2019-06-21 10:36:08",
"2019-06-21 12:31:08",
"2019-06-21 22:39:38",
"2019-06-21 22:57:28",
"2019-06-21 23:03:58",
"2019-06-21 23:14:58",
"2019-06-25 20:20:22",
"2019-06-25 20:28:16",
"2019-06-25 20:30:51",
"2019-06-25 21:39:05",
"2019-06-25 21:42:05",
"2019-06-26 13:05:53",
"2019-06-26 22:50:09",
"2019-06-26 23:08:18",
"2019-06-26 23:11:28",
"2019-06-28 09:03:48",
"2019-06-28 13:00:48",
"2019-06-28 14:58:38",
"2019-06-28 21:42:18",
"2019-06-28 21:49:48",
"2019-07-01 01:54:28",
"2019-07-01 12:21:28",
"2019-07-01 15:18:48",
"2019-07-01 18:01:58",
"2019-07-01 18:18:18",
"2019-07-01 19:05:38",
"2019-07-01 22:09:28",
"2019-07-02 11:30:08",
"2019-07-02 12:54:48",
"2019-07-02 13:48:48",
"2019-07-02 13:52:18",
"2019-07-02 14:02:58",
"2019-07-02 14:05:28",
"2019-07-02 14:19:38",
"2019-07-02 14:37:38",
"2019-07-02 15:07:28",
"2019-07-02 15:18:48",
"2019-07-02 15:31:58",
"2019-07-02 16:04:08",
"2019-07-02 16:06:08",
"2019-07-02 16:13:08",
"2019-07-02 17:17:28",
"2019-07-02 17:50:58",
"2019-07-02 18:23:52",
"2019-07-02 18:33:58",
"2019-07-02 18:45:08",
"2019-07-02 21:05:32",
"2019-07-04 07:53:34",
"2019-07-04 09:07:00",
"2019-07-04 19:39:11",
"2019-07-04 22:36:39",
"2019-07-05 13:13:04",
"2019-07-05 14:35:46",
"2019-07-08 09:21:04",
"2019-07-08 12:57:27",
"2019-07-09 00:49:18",
"2019-07-09 04:12:26",
"2019-07-10 21:12:16"
],
"y": [
6,
7,
7,
8,
8,
8,
9,
9,
9,
11,
11,
11,
11,
11,
11,
11,
11,
29,
30,
30,
30,
30,
33,
65,
94,
170,
170,
170,
170,
170,
170,
177,
177,
177,
177,
177,
177,
180,
202,
278,
278,
278,
283,
292,
306,
306,
306,
306,
307,
307,
307,
307,
307,
307,
307,
307,
307,
381,
397,
484,
498,
498,
500,
520,
520,
520,
520,
520,
520,
525,
525,
526,
526,
526,
526,
526,
526,
548,
548,
548,
548,
548,
579,
582,
582,
582,
583,
600,
603,
613,
614,
614,
614,
620,
622,
622,
622,
622,
622,
622,
624,
629,
629,
632,
636,
636,
664,
666,
668,
668,
673,
674,
674,
674,
674,
674,
676,
676,
676,
676,
677,
677,
677,
677,
677,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
693,
694,
694,
698,
698,
701,
701,
702,
702,
705,
706,
725
]
},
{
"line": {
"color": "rgba(55, 128, 191, 1.0)",
"dash": "solid",
"shape": "linear",
"width": 1.3
},
"mode": "lines",
"name": "non_liquidity",
"text": "",
"type": "scatter",
"uid": "4262e963-ce30-44fd-91f8-3ae220c193d3",
"x": [
"2018-12-06 09:29:18",
"2018-12-06 13:55:38",
"2018-12-06 13:56:08",
"2018-12-06 16:42:48",
"2018-12-06 16:47:48",
"2018-12-06 16:57:38",
"2018-12-06 19:58:18",
"2018-12-06 19:58:48",
"2018-12-06 19:59:18",
"2018-12-10 08:54:28",
"2018-12-10 09:29:48",
"2018-12-10 09:57:58",
"2018-12-10 10:15:48",
"2018-12-10 10:24:58",
"2018-12-10 10:29:28",
"2018-12-10 10:36:18",
"2018-12-10 10:40:38",
"2018-12-14 08:46:58",
"2018-12-14 09:24:48",
"2018-12-14 09:25:18",
"2018-12-14 09:25:48",
"2018-12-14 09:26:48",
"2018-12-14 15:19:38",
"2019-01-02 16:04:28",
"2019-01-23 04:10:08",
"2019-02-19 17:52:08",
"2019-02-21 02:03:28",
"2019-02-21 04:50:38",
"2019-02-21 04:55:38",
"2019-02-21 04:58:48",
"2019-02-21 15:09:08",
"2019-02-22 10:51:58",
"2019-02-22 11:07:48",
"2019-02-23 12:16:58",
"2019-02-23 12:16:58",
"2019-02-23 12:17:28",
"2019-02-23 12:21:08",
"2019-02-24 01:44:58",
"2019-03-01 01:22:48",
"2019-03-10 01:20:28",
"2019-03-10 09:24:48",
"2019-03-10 10:34:38",
"2019-03-11 03:05:58",
"2019-03-11 11:30:28",
"2019-03-15 01:33:28",
"2019-03-15 02:07:48",
"2019-03-15 02:42:18",
"2019-03-15 02:51:28",
"2019-03-15 23:49:08",
"2019-03-15 23:55:48",
"2019-03-16 18:03:08",
"2019-03-16 18:11:38",
"2019-03-16 18:13:48",
"2019-03-16 18:27:18",
"2019-03-16 18:29:58",
"2019-03-16 20:59:28",
"2019-03-16 22:15:48",
"2019-03-21 14:18:18",
"2019-03-23 15:34:18",
"2019-04-05 10:05:28",
"2019-04-08 23:02:28",
"2019-04-09 00:54:48",
"2019-04-11 09:35:38",
"2019-04-17 08:18:58",
"2019-04-17 08:19:28",
"2019-04-17 08:19:58",
"2019-04-17 10:23:48",
"2019-04-17 10:24:18",
"2019-04-17 10:24:48",
"2019-04-18 04:01:38",
"2019-04-18 04:02:38",
"2019-04-18 06:00:58",
"2019-04-18 07:41:38",
"2019-04-18 07:42:48",
"2019-04-18 07:43:48",
"2019-04-18 08:46:58",
"2019-04-18 09:07:38",
"2019-04-24 08:00:58",
"2019-04-24 08:01:28",
"2019-04-24 08:02:38",
"2019-04-24 08:03:08",
"2019-04-24 08:04:08",
"2019-05-01 05:38:08",
"2019-05-04 12:59:08",
"2019-05-04 13:23:48",
"2019-05-04 13:43:18",
"2019-05-04 16:25:58",
"2019-05-05 15:16:18",
"2019-05-08 02:38:58",
"2019-05-10 14:48:18",
"2019-05-11 08:16:08",
"2019-05-11 08:47:08",
"2019-05-11 08:54:38",
"2019-05-13 02:45:18",
"2019-05-14 20:28:58",
"2019-05-14 20:49:08",
"2019-05-14 22:02:38",
"2019-05-14 22:21:58",
"2019-05-14 22:44:28",
"2019-05-14 22:45:28",
"2019-05-17 20:54:28",
"2019-05-23 20:08:38",
"2019-05-23 20:10:18",
"2019-05-24 21:58:08",
"2019-05-30 19:30:38",
"2019-06-02 07:06:48",
"2019-06-07 16:27:18",
"2019-06-10 20:47:48",
"2019-06-15 07:23:08",
"2019-06-18 16:08:28",
"2019-06-21 10:36:08",
"2019-06-21 12:31:08",
"2019-06-21 22:39:38",
"2019-06-21 22:57:28",
"2019-06-21 23:03:58",
"2019-06-21 23:14:58",
"2019-06-25 20:20:22",
"2019-06-25 20:28:16",
"2019-06-25 20:30:51",
"2019-06-25 21:39:05",
"2019-06-25 21:42:05",
"2019-06-26 13:05:53",
"2019-06-26 22:50:09",
"2019-06-26 23:08:18",
"2019-06-26 23:11:28",
"2019-06-28 09:03:48",
"2019-06-28 13:00:48",
"2019-06-28 14:58:38",
"2019-06-28 21:42:18",
"2019-06-28 21:49:48",
"2019-07-01 01:54:28",
"2019-07-01 12:21:28",
"2019-07-01 15:18:48",
"2019-07-01 18:01:58",
"2019-07-01 18:18:18",
"2019-07-01 19:05:38",
"2019-07-01 22:09:28",
"2019-07-02 11:30:08",
"2019-07-02 12:54:48",
"2019-07-02 13:48:48",
"2019-07-02 13:52:18",
"2019-07-02 14:02:58",
"2019-07-02 14:05:28",
"2019-07-02 14:19:38",
"2019-07-02 14:37:38",
"2019-07-02 15:07:28",
"2019-07-02 15:18:48",
"2019-07-02 15:31:58",
"2019-07-02 16:04:08",
"2019-07-02 16:06:08",
"2019-07-02 16:13:08",
"2019-07-02 17:17:28",
"2019-07-02 17:50:58",
"2019-07-02 18:23:52",
"2019-07-02 18:33:58",
"2019-07-02 18:45:08",
"2019-07-02 21:05:32",
"2019-07-04 07:53:34",
"2019-07-04 09:07:00",
"2019-07-04 19:39:11",
"2019-07-04 22:36:39",
"2019-07-05 13:13:04",
"2019-07-05 14:35:46",
"2019-07-08 09:21:04",
"2019-07-08 12:57:27",
"2019-07-09 00:49:18",
"2019-07-09 04:12:26",
"2019-07-10 21:12:16"
],
"y": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120,
121,
122,
123,
124,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
147,
148,
149,
150,
151,
152,
153,
154,
155,
156,
157,
158,
159,
160,
161,
162,
163,
164,
165,
166,
167,
168
]
}
],
"layout": {
"legend": {
"bgcolor": "#F5F6F9",
"font": {
"color": "#4D5663"
}
},
"paper_bgcolor": "#F5F6F9",
"plot_bgcolor": "#F5F6F9",
"title": {
"font": {
"color": "#4D5663"
},
"text": "Cumulative number of originations"
},
"xaxis": {
"gridcolor": "#E1E5ED",
"showgrid": true,
"tickfont": {
"color": "#4D5663"
},
"title": {
"font": {
"color": "#4D5663"
},
"text": ""
},
"zerolinecolor": "#E1E5ED"
},
"yaxis": {
"gridcolor": "#E1E5ED",
"showgrid": true,
"tickfont": {
"color": "#4D5663"
},
"title": {
"font": {
"color": "#4D5663"
},
"text": ""
},
"zerolinecolor": "#E1E5ED"
}
}
},
"text/html": [
"<div>\n",
" \n",
" \n",
" <div id=\"fcafed9a-b898-40f9-9beb-2b714af5d4ce\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>\n",
" <script type=\"text/javascript\">\n",
" require([\"plotly\"], function(Plotly) {\n",
" window.PLOTLYENV=window.PLOTLYENV || {};\n",
" window.PLOTLYENV.BASE_URL='https://plot.ly';\n",
" \n",
" if (document.getElementById(\"fcafed9a-b898-40f9-9beb-2b714af5d4ce\")) {\n",
" Plotly.newPlot(\n",
" 'fcafed9a-b898-40f9-9beb-2b714af5d4ce',\n",
" [{\"line\": {\"color\": \"rgba(255, 153, 51, 1.0)\", \"dash\": \"solid\", \"shape\": \"linear\", \"width\": 1.3}, \"mode\": \"lines\", \"name\": \"liquidity\", \"text\": \"\", \"type\": \"scatter\", \"uid\": \"30c207f7-f803-4fcc-a438-1c72ac21571a\", \"x\": [\"2018-12-06 09:29:18\", \"2018-12-06 13:55:38\", \"2018-12-06 13:56:08\", \"2018-12-06 16:42:48\", \"2018-12-06 16:47:48\", \"2018-12-06 16:57:38\", \"2018-12-06 19:58:18\", \"2018-12-06 19:58:48\", \"2018-12-06 19:59:18\", \"2018-12-10 08:54:28\", \"2018-12-10 09:29:48\", \"2018-12-10 09:57:58\", \"2018-12-10 10:15:48\", \"2018-12-10 10:24:58\", \"2018-12-10 10:29:28\", \"2018-12-10 10:36:18\", \"2018-12-10 10:40:38\", \"2018-12-14 08:46:58\", \"2018-12-14 09:24:48\", \"2018-12-14 09:25:18\", \"2018-12-14 09:25:48\", \"2018-12-14 09:26:48\", \"2018-12-14 15:19:38\", \"2019-01-02 16:04:28\", \"2019-01-23 04:10:08\", \"2019-02-19 17:52:08\", \"2019-02-21 02:03:28\", \"2019-02-21 04:50:38\", \"2019-02-21 04:55:38\", \"2019-02-21 04:58:48\", \"2019-02-21 15:09:08\", \"2019-02-22 10:51:58\", \"2019-02-22 11:07:48\", \"2019-02-23 12:16:58\", \"2019-02-23 12:16:58\", \"2019-02-23 12:17:28\", \"2019-02-23 12:21:08\", \"2019-02-24 01:44:58\", \"2019-03-01 01:22:48\", \"2019-03-10 01:20:28\", \"2019-03-10 09:24:48\", \"2019-03-10 10:34:38\", \"2019-03-11 03:05:58\", \"2019-03-11 11:30:28\", \"2019-03-15 01:33:28\", \"2019-03-15 02:07:48\", \"2019-03-15 02:42:18\", \"2019-03-15 02:51:28\", \"2019-03-15 23:49:08\", \"2019-03-15 23:55:48\", \"2019-03-16 18:03:08\", \"2019-03-16 18:11:38\", \"2019-03-16 18:13:48\", \"2019-03-16 18:27:18\", \"2019-03-16 18:29:58\", \"2019-03-16 20:59:28\", \"2019-03-16 22:15:48\", \"2019-03-21 14:18:18\", \"2019-03-23 15:34:18\", \"2019-04-05 10:05:28\", \"2019-04-08 23:02:28\", \"2019-04-09 00:54:48\", \"2019-04-11 09:35:38\", \"2019-04-17 08:18:58\", \"2019-04-17 08:19:28\", \"2019-04-17 08:19:58\", \"2019-04-17 10:23:48\", \"2019-04-17 10:24:18\", \"2019-04-17 10:24:48\", \"2019-04-18 04:01:38\", \"2019-04-18 04:02:38\", \"2019-04-18 06:00:58\", \"2019-04-18 07:41:38\", \"2019-04-18 07:42:48\", \"2019-04-18 07:43:48\", \"2019-04-18 08:46:58\", \"2019-04-18 09:07:38\", \"2019-04-24 08:00:58\", \"2019-04-24 08:01:28\", \"2019-04-24 08:02:38\", \"2019-04-24 08:03:08\", \"2019-04-24 08:04:08\", \"2019-05-01 05:38:08\", \"2019-05-04 12:59:08\", \"2019-05-04 13:23:48\", \"2019-05-04 13:43:18\", \"2019-05-04 16:25:58\", \"2019-05-05 15:16:18\", \"2019-05-08 02:38:58\", \"2019-05-10 14:48:18\", \"2019-05-11 08:16:08\", \"2019-05-11 08:47:08\", \"2019-05-11 08:54:38\", \"2019-05-13 02:45:18\", \"2019-05-14 20:28:58\", \"2019-05-14 20:49:08\", \"2019-05-14 22:02:38\", \"2019-05-14 22:21:58\", \"2019-05-14 22:44:28\", \"2019-05-14 22:45:28\", \"2019-05-17 20:54:28\", \"2019-05-23 20:08:38\", \"2019-05-23 20:10:18\", \"2019-05-24 21:58:08\", \"2019-05-30 19:30:38\", \"2019-06-02 07:06:48\", \"2019-06-07 16:27:18\", \"2019-06-10 20:47:48\", \"2019-06-15 07:23:08\", \"2019-06-18 16:08:28\", \"2019-06-21 10:36:08\", \"2019-06-21 12:31:08\", \"2019-06-21 22:39:38\", \"2019-06-21 22:57:28\", \"2019-06-21 23:03:58\", \"2019-06-21 23:14:58\", \"2019-06-25 20:20:22\", \"2019-06-25 20:28:16\", \"2019-06-25 20:30:51\", \"2019-06-25 21:39:05\", \"2019-06-25 21:42:05\", \"2019-06-26 13:05:53\", \"2019-06-26 22:50:09\", \"2019-06-26 23:08:18\", \"2019-06-26 23:11:28\", \"2019-06-28 09:03:48\", \"2019-06-28 13:00:48\", \"2019-06-28 14:58:38\", \"2019-06-28 21:42:18\", \"2019-06-28 21:49:48\", \"2019-07-01 01:54:28\", \"2019-07-01 12:21:28\", \"2019-07-01 15:18:48\", \"2019-07-01 18:01:58\", \"2019-07-01 18:18:18\", \"2019-07-01 19:05:38\", \"2019-07-01 22:09:28\", \"2019-07-02 11:30:08\", \"2019-07-02 12:54:48\", \"2019-07-02 13:48:48\", \"2019-07-02 13:52:18\", \"2019-07-02 14:02:58\", \"2019-07-02 14:05:28\", \"2019-07-02 14:19:38\", \"2019-07-02 14:37:38\", \"2019-07-02 15:07:28\", \"2019-07-02 15:18:48\", \"2019-07-02 15:31:58\", \"2019-07-02 16:04:08\", \"2019-07-02 16:06:08\", \"2019-07-02 16:13:08\", \"2019-07-02 17:17:28\", \"2019-07-02 17:50:58\", \"2019-07-02 18:23:52\", \"2019-07-02 18:33:58\", \"2019-07-02 18:45:08\", \"2019-07-02 21:05:32\", \"2019-07-04 07:53:34\", \"2019-07-04 09:07:00\", \"2019-07-04 19:39:11\", \"2019-07-04 22:36:39\", \"2019-07-05 13:13:04\", \"2019-07-05 14:35:46\", \"2019-07-08 09:21:04\", \"2019-07-08 12:57:27\", \"2019-07-09 00:49:18\", \"2019-07-09 04:12:26\", \"2019-07-10 21:12:16\"], \"y\": [6.0, 7.0, 7.0, 8.0, 8.0, 8.0, 9.0, 9.0, 9.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 29.0, 30.0, 30.0, 30.0, 30.0, 33.0, 65.0, 94.0, 170.0, 170.0, 170.0, 170.0, 170.0, 170.0, 177.0, 177.0, 177.0, 177.0, 177.0, 177.0, 180.0, 202.0, 278.0, 278.0, 278.0, 283.0, 292.0, 306.0, 306.0, 306.0, 306.0, 307.0, 307.0, 307.0, 307.0, 307.0, 307.0, 307.0, 307.0, 307.0, 381.0, 397.0, 484.0, 498.0, 498.0, 500.0, 520.0, 520.0, 520.0, 520.0, 520.0, 520.0, 525.0, 525.0, 526.0, 526.0, 526.0, 526.0, 526.0, 526.0, 548.0, 548.0, 548.0, 548.0, 548.0, 579.0, 582.0, 582.0, 582.0, 583.0, 600.0, 603.0, 613.0, 614.0, 614.0, 614.0, 620.0, 622.0, 622.0, 622.0, 622.0, 622.0, 622.0, 624.0, 629.0, 629.0, 632.0, 636.0, 636.0, 664.0, 666.0, 668.0, 668.0, 673.0, 674.0, 674.0, 674.0, 674.0, 674.0, 676.0, 676.0, 676.0, 676.0, 677.0, 677.0, 677.0, 677.0, 677.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 693.0, 694.0, 694.0, 698.0, 698.0, 701.0, 701.0, 702.0, 702.0, 705.0, 706.0, 725.0]}, {\"line\": {\"color\": \"rgba(55, 128, 191, 1.0)\", \"dash\": \"solid\", \"shape\": \"linear\", \"width\": 1.3}, \"mode\": \"lines\", \"name\": \"non_liquidity\", \"text\": \"\", \"type\": \"scatter\", \"uid\": \"4262e963-ce30-44fd-91f8-3ae220c193d3\", \"x\": [\"2018-12-06 09:29:18\", \"2018-12-06 13:55:38\", \"2018-12-06 13:56:08\", \"2018-12-06 16:42:48\", \"2018-12-06 16:47:48\", \"2018-12-06 16:57:38\", \"2018-12-06 19:58:18\", \"2018-12-06 19:58:48\", \"2018-12-06 19:59:18\", \"2018-12-10 08:54:28\", \"2018-12-10 09:29:48\", \"2018-12-10 09:57:58\", \"2018-12-10 10:15:48\", \"2018-12-10 10:24:58\", \"2018-12-10 10:29:28\", \"2018-12-10 10:36:18\", \"2018-12-10 10:40:38\", \"2018-12-14 08:46:58\", \"2018-12-14 09:24:48\", \"2018-12-14 09:25:18\", \"2018-12-14 09:25:48\", \"2018-12-14 09:26:48\", \"2018-12-14 15:19:38\", \"2019-01-02 16:04:28\", \"2019-01-23 04:10:08\", \"2019-02-19 17:52:08\", \"2019-02-21 02:03:28\", \"2019-02-21 04:50:38\", \"2019-02-21 04:55:38\", \"2019-02-21 04:58:48\", \"2019-02-21 15:09:08\", \"2019-02-22 10:51:58\", \"2019-02-22 11:07:48\", \"2019-02-23 12:16:58\", \"2019-02-23 12:16:58\", \"2019-02-23 12:17:28\", \"2019-02-23 12:21:08\", \"2019-02-24 01:44:58\", \"2019-03-01 01:22:48\", \"2019-03-10 01:20:28\", \"2019-03-10 09:24:48\", \"2019-03-10 10:34:38\", \"2019-03-11 03:05:58\", \"2019-03-11 11:30:28\", \"2019-03-15 01:33:28\", \"2019-03-15 02:07:48\", \"2019-03-15 02:42:18\", \"2019-03-15 02:51:28\", \"2019-03-15 23:49:08\", \"2019-03-15 23:55:48\", \"2019-03-16 18:03:08\", \"2019-03-16 18:11:38\", \"2019-03-16 18:13:48\", \"2019-03-16 18:27:18\", \"2019-03-16 18:29:58\", \"2019-03-16 20:59:28\", \"2019-03-16 22:15:48\", \"2019-03-21 14:18:18\", \"2019-03-23 15:34:18\", \"2019-04-05 10:05:28\", \"2019-04-08 23:02:28\", \"2019-04-09 00:54:48\", \"2019-04-11 09:35:38\", \"2019-04-17 08:18:58\", \"2019-04-17 08:19:28\", \"2019-04-17 08:19:58\", \"2019-04-17 10:23:48\", \"2019-04-17 10:24:18\", \"2019-04-17 10:24:48\", \"2019-04-18 04:01:38\", \"2019-04-18 04:02:38\", \"2019-04-18 06:00:58\", \"2019-04-18 07:41:38\", \"2019-04-18 07:42:48\", \"2019-04-18 07:43:48\", \"2019-04-18 08:46:58\", \"2019-04-18 09:07:38\", \"2019-04-24 08:00:58\", \"2019-04-24 08:01:28\", \"2019-04-24 08:02:38\", \"2019-04-24 08:03:08\", \"2019-04-24 08:04:08\", \"2019-05-01 05:38:08\", \"2019-05-04 12:59:08\", \"2019-05-04 13:23:48\", \"2019-05-04 13:43:18\", \"2019-05-04 16:25:58\", \"2019-05-05 15:16:18\", \"2019-05-08 02:38:58\", \"2019-05-10 14:48:18\", \"2019-05-11 08:16:08\", \"2019-05-11 08:47:08\", \"2019-05-11 08:54:38\", \"2019-05-13 02:45:18\", \"2019-05-14 20:28:58\", \"2019-05-14 20:49:08\", \"2019-05-14 22:02:38\", \"2019-05-14 22:21:58\", \"2019-05-14 22:44:28\", \"2019-05-14 22:45:28\", \"2019-05-17 20:54:28\", \"2019-05-23 20:08:38\", \"2019-05-23 20:10:18\", \"2019-05-24 21:58:08\", \"2019-05-30 19:30:38\", \"2019-06-02 07:06:48\", \"2019-06-07 16:27:18\", \"2019-06-10 20:47:48\", \"2019-06-15 07:23:08\", \"2019-06-18 16:08:28\", \"2019-06-21 10:36:08\", \"2019-06-21 12:31:08\", \"2019-06-21 22:39:38\", \"2019-06-21 22:57:28\", \"2019-06-21 23:03:58\", \"2019-06-21 23:14:58\", \"2019-06-25 20:20:22\", \"2019-06-25 20:28:16\", \"2019-06-25 20:30:51\", \"2019-06-25 21:39:05\", \"2019-06-25 21:42:05\", \"2019-06-26 13:05:53\", \"2019-06-26 22:50:09\", \"2019-06-26 23:08:18\", \"2019-06-26 23:11:28\", \"2019-06-28 09:03:48\", \"2019-06-28 13:00:48\", \"2019-06-28 14:58:38\", \"2019-06-28 21:42:18\", \"2019-06-28 21:49:48\", \"2019-07-01 01:54:28\", \"2019-07-01 12:21:28\", \"2019-07-01 15:18:48\", \"2019-07-01 18:01:58\", \"2019-07-01 18:18:18\", \"2019-07-01 19:05:38\", \"2019-07-01 22:09:28\", \"2019-07-02 11:30:08\", \"2019-07-02 12:54:48\", \"2019-07-02 13:48:48\", \"2019-07-02 13:52:18\", \"2019-07-02 14:02:58\", \"2019-07-02 14:05:28\", \"2019-07-02 14:19:38\", \"2019-07-02 14:37:38\", \"2019-07-02 15:07:28\", \"2019-07-02 15:18:48\", \"2019-07-02 15:31:58\", \"2019-07-02 16:04:08\", \"2019-07-02 16:06:08\", \"2019-07-02 16:13:08\", \"2019-07-02 17:17:28\", \"2019-07-02 17:50:58\", \"2019-07-02 18:23:52\", \"2019-07-02 18:33:58\", \"2019-07-02 18:45:08\", \"2019-07-02 21:05:32\", \"2019-07-04 07:53:34\", \"2019-07-04 09:07:00\", \"2019-07-04 19:39:11\", \"2019-07-04 22:36:39\", \"2019-07-05 13:13:04\", \"2019-07-05 14:35:46\", \"2019-07-08 09:21:04\", \"2019-07-08 12:57:27\", \"2019-07-09 00:49:18\", \"2019-07-09 04:12:26\", \"2019-07-10 21:12:16\"], \"y\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168]}],\n",
" {\"legend\": {\"bgcolor\": \"#F5F6F9\", \"font\": {\"color\": \"#4D5663\"}}, \"paper_bgcolor\": \"#F5F6F9\", \"plot_bgcolor\": \"#F5F6F9\", \"title\": {\"font\": {\"color\": \"#4D5663\"}, \"text\": \"Cumulative number of originations\"}, \"xaxis\": {\"gridcolor\": \"#E1E5ED\", \"showgrid\": true, \"tickfont\": {\"color\": \"#4D5663\"}, \"title\": {\"font\": {\"color\": \"#4D5663\"}, \"text\": \"\"}, \"zerolinecolor\": \"#E1E5ED\"}, \"yaxis\": {\"gridcolor\": \"#E1E5ED\", \"showgrid\": true, \"tickfont\": {\"color\": \"#4D5663\"}, \"title\": {\"font\": {\"color\": \"#4D5663\"}, \"text\": \"\"}, \"zerolinecolor\": \"#E1E5ED\"}},\n",
" {\"showLink\": true, \"linkText\": \"Export to plot.ly\", \"plotlyServerURL\": \"https://plot.ly\", \"responsive\": true}\n",
" ).then(function(){\n",
" \n",
"var gd = document.getElementById('fcafed9a-b898-40f9-9beb-2b714af5d4ce');\n",
"var x = new MutationObserver(function (mutations, observer) {{\n",
" var display = window.getComputedStyle(gd).display;\n",
" if (!display || display === 'none') {{\n",
" console.log([gd, 'removed!']);\n",
" Plotly.purge(gd);\n",
" observer.disconnect();\n",
" }}\n",
"}});\n",
"\n",
"// Listen for the removal of the full notebook cells\n",
"var notebookContainer = gd.closest('#notebook-container');\n",
"if (notebookContainer) {{\n",
" x.observe(notebookContainer, {childList: true});\n",
"}}\n",
"\n",
"// Listen for the clearing of the current output cell\n",
"var outputEl = gd.closest('.output');\n",
"if (outputEl) {{\n",
" x.observe(outputEl, {childList: true});\n",
"}}\n",
"\n",
" })\n",
" };\n",
" });\n",
" </script>\n",
" </div>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df[['liquidity', 'non_liquidity']].iplot(title='Cumulative number of originations')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment