# Values shown on map don't match the sensor time series when EPA conversion is applied

**URL:** <https://community.purpleair.com/t/values-shown-on-map-dont-match-the-sensor-time-series-when-epa-conversion-is-applied/2405>\
**Category:** Bug Reports\
**Created:** [October 16, 2022, 9:46pm UTC](https://community.purpleair.com/t/values-shown-on-map-dont-match-the-sensor-time-series-when-epa-conversion-is-applied/2405 "2022-10-16T21:46:31Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![dwhitemv](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/dwhitemv/32/1508_2.png) [@dwhitemv](https://community.purpleair.com/u/dwhitemv)\
**Post date:** [October 19, 2022, 3:11am UTC](https://community.purpleair.com/t/values-shown-on-map-dont-match-the-sensor-time-series-when-epa-conversion-is-applied/2405/3 "2022-10-19T03:11:35Z")

</div>

Found the bug, in the class definition for the US EPA conversion (in the Modern map code, file pa.map.2.0.11-SNAPSHOT.modern.js):

```auto
      getGraphValueFromData(t, e, i, r) {
        return 'inside' == e.location_type ? this.calculate_cf(t[this.getDataHeaderIndex('pm2.5_cf_1_' + i)], t[this.getDataHeaderIndex('humidity_a')]) : this.calculate_cf(t[this.getDataHeaderIndex('pm2.5_atm_' + i)], t[this.getDataHeaderIndex('humidity_a')])
      }

```

That second half of the conditional, used for outside sensors, should call calculate\_atm() and not calculate\_cf(). Thus the graph is using the adjustment for CF\_1 on CF\_ATM data. By comparison, `extractValue()` is using the correct conversion function, and that function is used for the popup.

As noted in another thread, be careful comparing PA map data to the EPA’s Fire & Smoke Map (FSM). FSM is using a value run through their NowCast algorithm (a weighted average over the last 11 hours in 10-minute chunks) vs. the PurpleAir map which is either an instantaneous real-time value or a rolling average over a set time period. NowCast is resistant to short-term spikes.

---

_[View the full topic](https://community.purpleair.com/t/values-shown-on-map-dont-match-the-sensor-time-series-when-epa-conversion-is-applied/2405)._
