Implement the PAQI metric #15

Closed
opened 2022-02-21 20:57:41 +01:00 by paul · 1 comment
Owner

This metric combines the pollen and AQI metric. Note that it needs to match the intervals!

How are they actually combined?

This metric combines the pollen and AQI metric. Note that it needs to match the intervals! How are they actually combined?
paul added the
enhancement
help wanted
labels 2022-02-21 20:57:41 +01:00
Collaborator

It's actually very simple: PAQI = max(AQI, float(pollen))

In rainpicker.py I experimented with several different methods. Eventually I settled for PAQI2:

def calculatePAQI2Value(AQI, pollen, boostWhenEqual):
  PAQI = max(AQI, float(pollen))

  if boostWhenEqual and int(AQI) == int(pollen):
    PAQI = PAQI + 1

  return PAQI

This function is called with boostWhenEqual == False, so PAQI is just the max of pollen and AQI.

It's actually very simple: `PAQI = max(AQI, float(pollen))` In `rainpicker.py` I experimented with several different methods. Eventually I settled for PAQI2: ``` def calculatePAQI2Value(AQI, pollen, boostWhenEqual): PAQI = max(AQI, float(pollen)) if boostWhenEqual and int(AQI) == int(pollen): PAQI = PAQI + 1 return PAQI ``` This function is called with `boostWhenEqual == False`, so PAQI is just the max of pollen and AQI.
paul closed this issue 2022-02-24 20:43:35 +01:00
paul added this to the version 0.1.0 milestone 2022-03-14 17:03:30 +01:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: paul/sinoptik#15
No description provided.