Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Breaking Change]: Remove save file func #159

Merged
merged 10 commits into from
May 25, 2022
Prev Previous commit
Next Next commit
Merge branch 'dev' of https://github.com/Milind220/Ozone into dev
  • Loading branch information
Milind220 committed May 25, 2022
commit b4fbb6dc9b96e4dbeaa61aad3942a7f89f20d3c3
15 changes: 3 additions & 12 deletions src/ozone/ozone.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import itertools
import json
import warnings
from pathlib import Path
from typing import Any, Dict, List, Tuple, Union

import numpy
Expand Down Expand Up @@ -51,6 +50,7 @@ class Ozone:
Attributes:
token (str): The private API token for the WAQI API service.
"""

_search_aqi_url: str = URLs.search_aqi_url
_find_stations_url: str = URLs.find_stations_url
_default_params: List[str] = [
Expand Down Expand Up @@ -127,9 +127,7 @@ def reset_token(self, token: str) -> None:
self.token = token
self._check_token_validity()

def _extract_live_data(
self, data_obj: Any, params: List[str] = [""]
) -> Dict[str, Union[str, float]]:
def _extract_live_data(self, data_obj: Any) -> Dict[str, Union[str, float]]:
"""Extract live AQI data from API response's 'data' part.

Args:
Expand Down Expand Up @@ -442,9 +440,7 @@ def get_range_coordinates_air(
locations = self._locate_all_coordinates(
lower_bound=lower_bound, upper_bound=upper_bound
)
return self.get_multiple_coordinate_air(
locations, df=df, params=params
)
return self.get_multiple_coordinate_air(locations, df=df)

def get_multiple_city_air(
self,
Expand All @@ -455,11 +451,6 @@ def get_multiple_city_air(

Args:
cities (list): A list of cities to get data for.
params (List[str], optional): A list of parameters to get data for.
Choose from the following values:
["aqi", "pm2.5", "pm10", "o3", "co", "no2", "so2", "dew", "h",
"p", "t", "w", "wg"]
Gets all parameters by default.
df (pandas.DataFrame, optional): An existing dataframe to
append the data to.

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.