PyMetOffice
0.4
Pythonic access to UK Met Office DataPoint API
|
This is the analogue of the ForecastModel class At present, the DataPoint API appears not to support the 'nearestlatlon' form of location specifier. More...
Public Member Functions | |
def | getObservationsPlace |
For now, this method is not supported by the DataPoint API (apparently). | |
def | getObservationsId |
This, on the other hand, works fine given a valid location Id. | |
Public Member Functions inherited from pymetoffice.base.baseModel | |
def | __init__ |
Constructor. | |
Private Member Functions | |
def | _getRawJsonObsData |
Get the raw data (Json format). | |
def | _getRawXMLObsData |
Get XML data as a minidom object. | |
def | _makeDecoder |
Construct a dictionary for decoding abbreviations into user-friendly forms. | |
Additional Inherited Members | |
Properties inherited from pymetoffice.base.baseModel | |
Cached property(_getCached) | |
ObservationSitelist property(_getObList) | |
This provides the list of observation sites. | |
ForecastSitelist property(_getFcList) | |
This provides the list of forecast sites. | |
This is the analogue of the ForecastModel class At present, the DataPoint API appears not to support the 'nearestlatlon' form of location specifier.
This is inconvenient, to say the least!
Definition at line 13 of file observation.py.
|
private |
Get the raw data (Json format).
Use as you please but the library increasingly uses the XML methods.
period | Currently this must be 'hourly'. May change in the future. |
site | Most likely to be a site Id, eg '3772' gets you the data for Heathrow Airport. |
extra | Usually {}. |
Definition at line 23 of file observation.py.
|
private |
Get XML data as a minidom object.
period | Currently this must be 'hourly'. May change in the future. |
site | Most likely to be a site Id, eg '3772' gets you the data for Heathrow Airport. |
extra | Usually {}. |
Definition at line 42 of file observation.py.
|
private |
Construct a dictionary for decoding abbreviations into user-friendly forms.
Deals with a couple of current special cases.
doc | An XML document as returned from getRawXmlObsData. |
Definition at line 59 of file observation.py.
def pymetoffice.observation.ObservationModel.getObservationsId | ( | self, | |
id | |||
) |
This, on the other hand, works fine given a valid location Id.
I have chosen not to provide a mechanism for specifying a specific time (which would have to be in the last 24 hours). It is simpler to get all the data (24 observations) and extract the one that you want.
Definition at line 95 of file observation.py.
def pymetoffice.observation.ObservationModel.getObservationsPlace | ( | self, | |
location | |||
) |
For now, this method is not supported by the DataPoint API (apparently).
It always returns an empty list of Observation objects. However, it does not throw an exception because the API returns just the parameter decoding information. One day we may be able to use it.
Definition at line 81 of file observation.py.