Commit 45a79675 authored by Chris Jewell's avatar Chris Jewell
Browse files

Merge branch 'master' of fhm-chicas-code.lancs.ac.uk:jewell/covid19uk

parents 7a9ce79b d9c52e4e
...@@ -53,7 +53,7 @@ class CasesData: ...@@ -53,7 +53,7 @@ class CasesData:
print("Attempting to download...", end="", flush=True) print("Attempting to download...", end="", flush=True)
response = requests.get(url) response = requests.get(url)
content = json.loads(response.content) content = json.loads(response.content)
df = pd.read_json(json.dumps(content["body"])) df = pd.DataFrame.from_dict(content["body"])
print("Success", flush=True) print("Success", flush=True)
return df return df
except (requests.ConnectionError, requests.RequestException) as e: except (requests.ConnectionError, requests.RequestException) as e:
......
...@@ -355,9 +355,7 @@ if __name__ == "__main__": ...@@ -355,9 +355,7 @@ if __name__ == "__main__":
parser.add_argument( parser.add_argument(
"-o", "--output", type=str, help="Output file", required=True "-o", "--output", type=str, help="Output file", required=True
) )
parser.add_argument( parser.add_argument("data_file", type=str, help="Data NetCDF file")
"data_file", type=str, help="Data pickle file", required=True
)
args = parser.parse_args() args = parser.parse_args()
with open(args.config, "r") as f: with open(args.config, "r") as f:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment