Excel to CsPro producing wrong IDs

Discussions about tools to complement CSPro data processing
Post Reply
AriSilva
Posts: 615
Joined: July 22nd, 2016, 3:55 pm

Excel to CsPro producing wrong IDs

Post by AriSilva »

Sometime ago I had posted an issue that my ID (sector) had 15 positions, and when creating the csdb the ID, someties, was changed to a number "close" to the original.
The answer was that the value was being handled by a floating point routine.
Because of that I split my ID in five parts, UF, MUNIC, DISTRICT, SUBDISTRICT and SECTOR, believing that this would solve my problem.
But it did not, it still change the IDs, and maybe because of that, it generates less cases than the original file.
See the enclosed files. The second case 110002305000045 is generated as 110002305000044, the 14th 110012205000081 is generated as 110012205000080, etc, and the final file has 1492 cases instead of the original 1500.
Best
Ari
Attachments
Xls2Cspro.rar
(392.38 KiB) Downloaded 315 times
Best
Ari
aaronw
Posts: 570
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Excel to CsPro producing wrong IDs

Post by aaronw »

Your Excel to CSPro spec doesn't match the files given. Can you update the spec and make the associations?
AriSilva
Posts: 615
Joined: July 22nd, 2016, 3:55 pm

Re: Excel to CsPro producing wrong IDs

Post by AriSilva »

I'm really sorry, I messed up copying the files to a temp directory.
Here it goes again.
By the way, I think the error is produced by the excel formulas in the "sector_so" column (second column), although the excel does it wright in the spreadsheet.
Best
Ari
Attachments
Xls2CsPro.rar
(392.54 KiB) Downloaded 338 times
Best
Ari
Gregory Martin
Posts: 1845
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Excel to CsPro producing wrong IDs

Post by Gregory Martin »

The issue here is that Excel to CSPro doesn't round numbers, so, as an example, a value in your data like 44.98 is getting treated as 44 instead of 45. We'll change the behavior for CSPro 7.2.1, to be released later this week, so that numbers are rounded before the conversion.
Post Reply