diff --git a/README.md b/README.md index 4a9eadc..284a205 100644 --- a/README.md +++ b/README.md @@ -63,34 +63,6 @@ Or simply fetch the images directly: 'LC8_L1T_TOA/LC81270592014035LGN00' ``` -### Earth Temperature Anomalies - -Determine how much warmer or cooler a location is by using the [temperature anomalies API](https://api.nasa.gov/api.html#earth-temperature-anomalies). - -Get data by address: -```python ->>> from nasa import temperature ->>> temps = temperature.address('1600 Pennsylvania Ave, Washington, DC', begin=2010) ->>> [(t.year, t.anomaly) for t in temps] -[(2010, 0.966000021), - (2011, 1.236700058), - (2012, 1.936300039), - (2013, 0.373100013), - (2014, -0.219600007)] -``` - -Or by coordinates: -```python ->>> from nasa import temperature ->>> temps = temperature.coordinates(lat=1.6, lon=100.3, begin=2010) ->>> [(t.year, t.anomaly) for t in temps] -[(2010, 0.987699986), - (2011, 0.572600007), - (2012, 0.661599994), - (2013, 0.8046), - (2014, 0.861299992)] -``` - ### Patents See what cool patents are held in the NASA patent portfolio using the [Patents API](https://api.nasa.gov/api.html#patents). diff --git a/nasa/temperature.py b/nasa/temperature.py deleted file mode 100644 index a93e3cb..0000000 --- a/nasa/temperature.py +++ /dev/null @@ -1,51 +0,0 @@ -from nasa import api, validations -from nasa.base import NasaApiObject - - -''' Retrieves local temperature anomalies for an address - -Query Parameters -text string Address string -begin int Beginning year for date range, inclusive -end int End year for date range, inclusive -''' -def address(address, begin=None, end=None): - payload = { - 'text': address, - 'begin': validations.optional_int(begin), - 'end': validations.optional_int(end), - } - response = api.api_get( - 'https://api.data.gov/nasa/planetary/earth/temperature/address', - payload, - ) - return [Temperature.from_response(r) for r in response['results']] - -''' Retrieves local temperature anomalies for coordinates - -Query Parameters: -lat float Latitude -lon float Longitude -begin int Beginning year for date range, inclusive -end int End year for date range, inclusive -''' -def coordinates(lat, lon, begin=None, end=None): - payload = { - 'lat': validations.nasa_float(lat), - 'lon': validations.nasa_float(lon), - 'begin': validations.optional_int(begin), - 'end': validations.optional_int(end), - } - response = api.api_get( - 'https://api.data.gov/nasa/planetary/earth/temperature/coords', - payload, - ) - return [Temperature.from_response(r) for r in response['results']] - -class Temperature(NasaApiObject): - """NASA temperature anomalies""" - class Meta(object): - properties = ['year', 'anomaly'] - - def __init__(self, **kwargs): - super(Temperature, self).__init__(**kwargs)