cli arg control for selecting graph

This commit is contained in:
Muaz Ahmad 2024-04-02 11:42:23 +05:00
parent 94b623494e
commit 3c722d49da

View file

@ -2,15 +2,17 @@ import json
import matplotlib.pyplot as plt
import numpy, pandas
import requests
import sys
sst_urls = {
"world": "https://climatereanalyzer.org/clim/sst_daily/json/oisst2.1_world2_sst_day.json",
"natlan": "https://climatereanalyzer.org/clim/sst_daily/json/oisst2.1_natlan1_sst_day.json"
}
print(sys.argv[1])
start_range = 29
start_year = 1982
res = requests.get(sst_urls['world'])
res = requests.get(sst_urls[list(sst_urls)[int(sys.argv[1])]])
data = json.loads(res.text)
data = data[1:-3]