[Location] FIPS is outdated

[Location] FIPS is outdated

  
Forge Component
(5)
Published on 2015-11-18 by OutSystems Labs
5 votes
Published on 2015-11-18 by OutSystems Labs
This supports the FIPS codes, which look like they are being phased out. Apparently the standard was withdrawn a few years ago and stopped being updated in 2014 (Wikipedia).

J.Ja
Hey there, Justin,

Are you talking about this FIPS standard? If so, not sure all of the countries match, since Portugal would be 'PO' and our component reads 'PT'.

But in case there is a discrepancy, what do you think would suit best? ISO-3166-2?

Best regards,

Carlos Simões
Carlos Simões wrote:
Hey there, Justin,

Are you talking about this FIPS standard? If so, not sure all of the countries match, since Portugal would be 'PO' and our component reads 'PT'.

But in case there is a discrepancy, what do you think would suit best? ISO-3166-2?

Best regards,

Carlos Simões
 Carlos -

Yes, that's the one I meant... seems like ISO-2166-2 would be the right replacement, though I'm not sure if that will cause a problem because CountryStates uses it too... I feel like using these codes as lookup keys was a bad choice. :( I know that a good rule is always "never use data outside your control for PK values"...

J.Ja
 
Justin James wrote:
Carlos Simões wrote:
Hey there, Justin,

Are you talking about this FIPS standard? If so, not sure all of the countries match, since Portugal would be 'PO' and our component reads 'PT'.

But in case there is a discrepancy, what do you think would suit best? ISO-3166-2?

Best regards,

Carlos Simões
 Carlos -

Yes, that's the one I meant... seems like ISO-2166-2 would be the right replacement, though I'm not sure if that will cause a problem because CountryStates uses it too... I feel like using these codes as lookup keys was a bad choice. :( I know that a good rule is always "never use data outside your control for PK values"...

J.Ja
 
Are you sure we're using FIPS? I could've sworn we are using ISO3166-1 alpha-2 (a "perfect implementation" of ISO-2166-2), since the United Kingdom matches the "GB" code (not "UK", used by FIPS); the same happens with Burundi, Zimbabwe and Aruba, among others.

About the second remark: we kind of control the data, since we generate the data for the whole model (it's all on the same Excel file we bootstrap), but it does feel a bit weird that we make joins on a non-identifier attribute. We'll consider it the next time we have changes to publish.
Carlos Simões wrote:
Justin James wrote:
Carlos Simões wrote:
Hey there, Justin,

Are you talking about this FIPS standard? If so, not sure all of the countries match, since Portugal would be 'PO' and our component reads 'PT'.

But in case there is a discrepancy, what do you think would suit best? ISO-3166-2?

Best regards,

Carlos Simões
 Carlos -

Yes, that's the one I meant... seems like ISO-2166-2 would be the right replacement, though I'm not sure if that will cause a problem because CountryStates uses it too... I feel like using these codes as lookup keys was a bad choice. :( I know that a good rule is always "never use data outside your control for PK values"...

J.Ja
 
Are you sure we're using FIPS? I could've sworn we are using ISO3166-1 alpha-2 (a "perfect implementation" of ISO-2166-2), since the United Kingdom matches the "GB" code (not "UK", used by FIPS); the same happens with Burundi, Zimbabwe and Aruba, among others.

About the second remark: we kind of control the data, since we generate the data for the whole model (it's all on the same Excel file we bootstrap), but it does feel a bit weird that we make joins on a non-identifier attribute. We'll consider it the next time we have changes to publish.
 Carlos -

Not sure at all... but the description on CountryState.Code says it is FIPS 10-4. It *may* be out of date. And it is numeric. I found this out when my adcdress formatting routine said "36" instead of "NY"... so I kind of need a fix ASAP or I'm going to have to add a separate lookup table for the states. :( :D

J.Ja
 
Oh, you're right: the state code uses it, not the countries.

Well, like I mentioned in the other thread, I don't have a suggested standard that covers all 4250 states the component bootstraps. But since we're talking about 50 states and you need them urgently, I'd create the lookup table and match it with the Id field of the CountryState entity. We don't plan on changing them anytime soon, so I figure you would be safe doing it.

Would this do?
Carlos Simões wrote:
Oh, you're right: the state code uses it, not the countries.

Well, like I mentioned in the other thread, I don't have a suggested standard that covers all 4250 states the component bootstraps. But since we're talking about 50 states and you need them urgently, I'd create the lookup table and match it with the Id field of the CountryState entity. We don't plan on changing them anytime soon, so I figure you would be safe doing it.

Would this do?
 
 Yup, that's exactly what I did, I did it in my espace so if Locations changes it won't mess me up.

J.Ja
Justin James wrote:
Yup, that's exactly what I did, I did it in my espace so if Locations changes it won't mess me up.

J.Ja
 Great! Thanks for the feedback, James!