aboutsummaryrefslogtreecommitdiff
path: root/initial_setup.py
diff options
context:
space:
mode:
authorPriyansh <[email protected]>2021-12-09 03:13:13 -0500
committerPriyansh <[email protected]>2021-12-09 03:13:13 -0500
commita5610941a1b17bdf0c99e904c9b187c34d10949a (patch)
tree8132612d765f509b025f9fdaca6a4ff4262295ed /initial_setup.py
parentdd7ce037b37464e6926566e86efb20faaf416655 (diff)
downloadtemp_pred_arima-a5610941a1b17bdf0c99e904c9b187c34d10949a.tar.xz
temp_pred_arima-a5610941a1b17bdf0c99e904c9b187c34d10949a.zip
initial setup added
Diffstat (limited to 'initial_setup.py')
-rw-r--r--initial_setup.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/initial_setup.py b/initial_setup.py
index 94f806c..e7ffa6c 100644
--- a/initial_setup.py
+++ b/initial_setup.py
@@ -1,6 +1,8 @@
import sys
import requests
import subprocess
+from os.path import exists
+from libs.decompressor import decompress_arima
subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", "requirements.txt"])
@@ -22,4 +24,23 @@ def download(url, filename):
sys.stdout.flush()
sys.stdout.write('\n')
-print('[*] Downloading test file of size 100 MB...') \ No newline at end of file
+if not exists('arima.pkl'):
+ if not exists('arima.compressed'):
+ print('[*] Downloading arima.compressed')
+ download("https://github.com/luciferreeves/Analyzing-Climate-Change-using-Earth-Surface-Temperature-Visualization/releases/download/large_files/arima.compressed", 'arima.compressed')
+ print('[*] Decompressing arima.compressed')
+ decompress_arima()
+
+if not exists('arima.pkl') and exists('arima.compressed'):
+ print('[*] Decompressing arima.compressed')
+ decompress_arima()
+
+if not exists('database.db'):
+ print('[*] Downloading database.db')
+ download("https://github.com/luciferreeves/Analyzing-Climate-Change-using-Earth-Surface-Temperature-Visualization/releases/download/large_files/database.db", 'database.db')
+
+if not exists('GlobalLandTemperaturesByCity.csv'):
+ print('[*] Downloading GlobalLandTemperaturesByCity.csv')
+ download("https://github.com/luciferreeves/Analyzing-Climate-Change-using-Earth-Surface-Temperature-Visualization/releases/download/large_files/GlobalLandTemperaturesByCity.csv", 'GlobalLandTemperaturesByCity.csv')
+
+print('[*] Done! Please run `python3 app.py` to start the application.') \ No newline at end of file