mtzeve commited on
Commit
ca2ab11
·
0 Parent(s):

first commit

Browse files
TSLA_news.csv ADDED
File without changes
TSLA_stock_price.csv ADDED
The diff for this file is too large to render. See raw diff
 
__pycache__/feature_engineering.cpython-311.pyc ADDED
Binary file (840 Bytes). View file
 
feature_engineering.ipynb ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {},
7
+ "outputs": [],
8
+ "source": [
9
+ "import requests\n",
10
+ "import pandas as pd\n",
11
+ "import json\n",
12
+ "import datetime\n",
13
+ "import numpy as np\n",
14
+ "from datetime import timedelta "
15
+ ]
16
+ },
17
+ {
18
+ "cell_type": "code",
19
+ "execution_count": 3,
20
+ "metadata": {},
21
+ "outputs": [],
22
+ "source": [
23
+ "def getNews(api_key,endpoint,ticker,from_date,to_date,num=1000):\n",
24
+ " # Set the parameters for the request\n",
25
+ " params = {\n",
26
+ " \"api_token\": api_key,\n",
27
+ " \"s\": ticker,\n",
28
+ " \"from\": from_date, \n",
29
+ " \"to\": to_date,\n",
30
+ " \"limit\": num,\n",
31
+ " }\n",
32
+ " \n",
33
+ " # Make the request to the API\n",
34
+ " response = requests.get(endpoint, params=params)\n",
35
+ " \n",
36
+ " # Print the response from the API\n",
37
+ " #print(response.json())\n",
38
+ "\n",
39
+ " #Return a Pandas dataframe from the response\n",
40
+ " return pd.DataFrame(response.json())"
41
+ ]
42
+ },
43
+ {
44
+ "cell_type": "code",
45
+ "execution_count": null,
46
+ "metadata": {},
47
+ "outputs": [],
48
+ "source": []
49
+ }
50
+ ],
51
+ "metadata": {
52
+ "kernelspec": {
53
+ "display_name": "base",
54
+ "language": "python",
55
+ "name": "python3"
56
+ },
57
+ "language_info": {
58
+ "codemirror_mode": {
59
+ "name": "ipython",
60
+ "version": 3
61
+ },
62
+ "file_extension": ".py",
63
+ "mimetype": "text/x-python",
64
+ "name": "python",
65
+ "nbconvert_exporter": "python",
66
+ "pygments_lexer": "ipython3",
67
+ "version": "3.11.4"
68
+ },
69
+ "orig_nbformat": 4
70
+ },
71
+ "nbformat": 4,
72
+ "nbformat_minor": 2
73
+ }
feature_engineering.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # %%
2
+ import requests
3
+ import pandas as pd
4
+ import json
5
+ import datetime
6
+ import numpy as np
7
+ from datetime import timedelta
8
+
9
+ # %%
10
+ def getNews(api_key,endpoint,ticker,from_date,to_date,num=1000):
11
+ # Set the parameters for the request
12
+ params = {
13
+ "api_token": api_key,
14
+ "s": ticker,
15
+ "from": from_date,
16
+ "to": to_date,
17
+ "limit": num,
18
+ }
19
+
20
+ # Make the request to the API
21
+ response = requests.get(endpoint, params=params)
22
+
23
+ # Print the response from the API
24
+ #print(response.json())
25
+
26
+ #Return a Pandas dataframe from the response
27
+ return pd.DataFrame(response.json())
28
+
29
+ # %%
30
+
31
+
32
+
feature_pipeline.ipynb ADDED
File without changes
feature_preprocessing.ipynb ADDED
File without changes
requirements.txt ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #faker==14.2.0
2
+ parsedatetime==2.6
3
+ #nbconvert==7.2.0
4
+ #plotly==5.9.0
5
+ #streamlit_folium==0.17.4
6
+ dataframe_image==0.2.3
7
+ hopsworks
8
+ hsml
9
+ joblib
10
+ matplotlib==3.6.3
11
+ pandas==1.5.1
12
+ #Pillow==10.2.0
13
+ scikit-learn==1.4.0
14
+ seaborn==0.13.2
training_pipeline.ipynb ADDED
File without changes