Count with a two level dictionary

Discussions about editing and cleaning data
Post Reply
AriSilva
Posts: 614
Joined: July 22nd, 2016, 3:55 pm

Count with a two level dictionary

Post by AriSilva »

Hi folks,
I´m having a problem using the count (or totocc) functions with a two level dictionary.
The dictionary (attached) has a first level fot the dwellng (vivienda) ahd the second level for the household (hogar) and person (persona).
The count seems not to work well, since it is counting persons where the dwelling (vivienda) is unnocupied: there are no person´s records in there.
Attachments
censo_24.zip
(14.95 KiB) Downloaded 102 times
Best
Ari
AriSilva
Posts: 614
Joined: July 22nd, 2016, 3:55 pm

Re: Count with a two level dictionary

Post by AriSilva »

Just in case, attached is a file with 2 dwellings. the second one has no persons, and the count is wrong.
Attachments
short.zip
(472 Bytes) Downloaded 108 times
Best
Ari
justinlakier
Posts: 215
Joined: November 21st, 2022, 4:41 pm

Re: Count with a two level dictionary

Post by justinlakier »

Hello,

Please see the answer to your previous question on the forums on the same topic, viewtopic.php?t=4040. We still recommend against using two-level applications. It is not certain from just the dictionary and data file provided, but it is likely that Greg's advice from 4 years ago is applicable. If this does not help, please attach your full application (or send it to cspro@lists.census.gov) so that we can check and test the code.

Hope this helps,
Justin
Post Reply