each row in pi_mortality data is duplicated.
pimn <- cdcfluview::pi_mortality(coverage_area = 'national')
nrow(pimn) / sum(base::duplicated(pimn))
pimr <- cdcfluview::pi_mortality(coverage_area = 'region')
nrow(pimr) / sum(base::duplicated(pimr))
(pims <- cdcfluview::pi_mortality(coverage_area = 'state'))
nrow(pims) / sum(base::duplicated(pims))
returns 2 for each dataset.
The problem originates in CDC's data: https://gis.cdc.gov/grasp/flu7/GetPhase07InitApp?appVersion=Public
which has 2 entries for each of nchs_mapcode 1 and 2.
And the warnings from left_join are hidden, so the user is not alerted to the issue.
each row in pi_mortality data is duplicated.
returns 2 for each dataset.
The problem originates in CDC's data: https://gis.cdc.gov/grasp/flu7/GetPhase07InitApp?appVersion=Public
which has 2 entries for each of
nchs_mapcode1 and 2.And the warnings from
left_joinare hidden, so the user is not alerted to the issue.