Life as Clay

Dict elements for working with US Census Bureau via Cocoa

leave a comment »


I’m querying from a part of the US Census Bureau’s website that doesn’t have a public API and I needed the value codes they are using in their countries popup. I create an NSDictionary with them and then bind an NSPopUpButton to them via an NSDictionaryController. Here are the objects and keys that I use to display the values:

@"AF",	@"Afghanistan", 
@"AL",	@"Albania",                         
@"AG",	@"Algeria",                         
@"AQ",	@"American Samoa",                  
@"AN",	@"Andorra",                         
@"AO",	@"Angola",                          
@"AV",	@"Anguilla",                        
@"AC",	@"Antigua and Barbuda",             
@"AR",	@"Argentina",                       
@"AM",	@"Armenia",                         
@"AA",	@"Aruba",                           
@"AS",	@"Australia",                       
@"AU",	@"Austria",                         
@"AJ",	@"Azerbaijan",                      
@"BF",	@"Bahamas, The",                    
@"BA",	@"Bahrain",                         
@"BG",	@"Bangladesh",                      
@"BB",	@"Barbados",                        
@"BO",	@"Belarus",                         
@"BE",	@"Belgium",                         
@"BH",	@"Belize",                          
@"BN",	@"Benin",                           
@"BD",	@"Bermuda",                         
@"BT",	@"Bhutan",                          
@"BL",	@"Bolivia",                         
@"BK",	@"Bosnia and Herzegovina",          
@"BC",	@"Botswana",                        
@"BR",	@"Brazil",                          
@"BX",	@"Brunei",                          
@"BU",	@"Bulgaria",                        
@"UV",	@"Burkina Faso",                    
@"BM",	@"Burma",                           
@"BY",	@"Burundi",                         
@"CB",	@"Cambodia",                        
@"CM",	@"Cameroon",                        
@"CA",	@"Canada",                          
@"CV",	@"Cape Verde",                      
@"CJ",	@"Cayman Islands",                  
@"CT",	@"Central African Republic",        
@"CD",	@"Chad",                            
@"CI",	@"Chile",                           
@"CH",	@"China",                           
@"CO",	@"Colombia",                        
@"CN",	@"Comoros",                         
@"CF",	@"Congo (Brazzaville)",             
@"CG",	@"Congo (Kinshasa)",                
@"CW",	@"Cook Islands",                    
@"CS",	@"Costa Rica",                      
@"IV",	@"Cote d'Ivoire",                   
@"HR",	@"Croatia",                         
@"CU",	@"Cuba",                            
@"UC",	@"Curacao",                         
@"CY",	@"Cyprus",                          
@"EZ",	@"Czech Republic",                  
@"DA",	@"Denmark",                         
@"DJ",	@"Djibouti",                        
@"DO",	@"Dominica",                        
@"DR",	@"Dominican Republic",              
@"EC",	@"Ecuador",                         
@"EG",	@"Egypt",                           
@"ES",	@"El Salvador",                     
@"EK",	@"Equatorial Guinea",               
@"ER",	@"Eritrea",                         
@"EN",	@"Estonia",                         
@"ET",	@"Ethiopia",                        
@"FO",	@"Faroe Islands",                   
@"FJ",	@"Fiji",                            
@"FI",	@"Finland",                         
@"FR",	@"France",                          
@"FP",	@"French Polynesia",                
@"GB",	@"Gabon",                           
@"GA",	@"Gambia, The",                     
@"GZ",	@"Gaza Strip",                      
@"GG",	@"Georgia",                         
@"GM",	@"Germany",                         
@"GH",	@"Ghana",                           
@"GI",	@"Gibraltar",                       
@"GR",	@"Greece",                          
@"GL",	@"Greenland",                       
@"GJ",	@"Grenada",                         
@"GQ",	@"Guam",                            
@"GT",	@"Guatemala",                       
@"GK",	@"Guernsey",                        
@"GV",	@"Guinea",                          
@"PU",	@"Guinea-Bissau",                   
@"GY",	@"Guyana",                          
@"HA",	@"Haiti",                           
@"HO",	@"Honduras",                        
@"HK",	@"Hong Kong",                       
@"HU",	@"Hungary",                         
@"IC",	@"Iceland",                         
@"IN",	@"India",                           
@"ID",	@"Indonesia",                       
@"IR",	@"Iran",                            
@"IZ",	@"Iraq",                            
@"EI",	@"Ireland",                         
@"IM",	@"Isle of Man",                     
@"IS",	@"Israel",                          
@"IT",	@"Italy",                           
@"JM",	@"Jamaica",                         
@"JA",	@"Japan",                           
@"JE",	@"Jersey",                          
@"JO",	@"Jordan",                          
@"KZ",	@"Kazakhstan",                      
@"KE",	@"Kenya",                           
@"KR",	@"Kiribati",                        
@"KN",	@"Korea, North",                    
@"KS",	@"Korea, South",                    
@"KV",	@"Kosovo",                          
@"KU",	@"Kuwait",                          
@"KG",	@"Kyrgyzstan",                      
@"LA",	@"Laos",                            
@"LG",	@"Latvia",                          
@"LE",	@"Lebanon",                         
@"LT",	@"Lesotho",                         
@"LI",	@"Liberia",                         
@"LY",	@"Libya",                           
@"LS",	@"Liechtenstein",                   
@"LH",	@"Lithuania",                       
@"LU",	@"Luxembourg",                      
@"MC",	@"Macau",                           
@"MK",	@"Macedonia",                       
@"MA",	@"Madagascar",                      
@"MI",	@"Malawi",                          
@"MY",	@"Malaysia",                        
@"MV",	@"Maldives",                        
@"ML",	@"Mali",                            
@"MT",	@"Malta",                           
@"RM",	@"Marshall Islands",                
@"MR",	@"Mauritania",                      
@"MP",	@"Mauritius",                       
@"MX",	@"Mexico",                          
@"FM",	@"Micronesia, Federated States of", 
@"MD",	@"Moldova",                         
@"MN",	@"Monaco",                          
@"MG",	@"Mongolia",                        
@"MJ",	@"Montenegro",                      
@"MH",	@"Montserrat",                      
@"MO",	@"Morocco",                         
@"MZ",	@"Mozambique",                      
@"WA",	@"Namibia",                         
@"NR",	@"Nauru",                           
@"NP",	@"Nepal",                           
@"NL",	@"Netherlands",                     
@"NC",	@"New Caledonia",                   
@"NZ",	@"New Zealand",                     
@"NU",	@"Nicaragua",                       
@"NG",	@"Niger",                           
@"NI",	@"Nigeria",                         
@"CQ",	@"Northern Mariana Islands",        
@"NO",	@"Norway",                          
@"MU",	@"Oman",                            
@"PK",	@"Pakistan",                        
@"PS",	@"Palau",                           
@"PM",	@"Panama",                          
@"PP",	@"Papua New Guinea",                
@"PA",	@"Paraguay",                        
@"PE",	@"Peru",                            
@"RP",	@"Philippines",                     
@"PL",	@"Poland",                          
@"PO",	@"Portugal",                        
@"RQ",	@"Puerto Rico",                     
@"QA",	@"Qatar",                           
@"RO",	@"Romania",                         
@"RS",	@"Russia",                          
@"RW",	@"Rwanda",                          
@"TB",	@"Saint Barthelemy",                
@"SH",	@"Saint Helena",                    
@"SC",	@"Saint Kitts and Nevis",           
@"ST",	@"Saint Lucia",                     
@"RN",	@"Saint Martin",                    
@"SB",	@"Saint Pierre and Miquelon",       
@"VC",	@"Saint Vincent and the Grenadines",
@"WS",	@"Samoa",                           
@"SM",	@"San Marino",                      
@"TP",	@"Sao Tome and Principe",           
@"SA",	@"Saudi Arabia",                    
@"SG",	@"Senegal",                         
@"RI",	@"Serbia",                          
@"SE",	@"Seychelles",                      
@"SL",	@"Sierra Leone",                    
@"SN",	@"Singapore",                       
@"NN",	@"Sint Maarten",                    
@"LO",	@"Slovakia",                        
@"SI",	@"Slovenia",                        
@"BP",	@"Solomon Islands",                 
@"SO",	@"Somalia",                         
@"SF",	@"South Africa",                    
@"OD",	@"South Sudan",                     
@"SP",	@"Spain",                           
@"CE",	@"Sri Lanka",                       
@"SU",	@"Sudan",                           
@"NS",	@"Suriname",                        
@"WZ",	@"Swaziland",                       
@"SW",	@"Sweden",                          
@"SZ",	@"Switzerland",                     
@"SY",	@"Syria",                           
@"TW",	@"Taiwan",                          
@"TI",	@"Tajikistan",                      
@"TZ",	@"Tanzania",                        
@"TH",	@"Thailand",                        
@"TT",	@"Timor-Leste",                     
@"TO",	@"Togo",                            
@"TN",	@"Tonga",                           
@"TD",	@"Trinidad and Tobago",             
@"TS",	@"Tunisia",                         
@"TU",	@"Turkey",                          
@"TX",	@"Turkmenistan",                    
@"TK",	@"Turks and Caicos Islands",        
@"TV",	@"Tuvalu",                          
@"UG",	@"Uganda",                          
@"UP",	@"Ukraine",                         
@"AE",	@"United Arab Emirates",            
@"UK",	@"United Kingdom",                  
@"US",	@"United States",                   
@"UY",	@"Uruguay",                         
@"UZ",	@"Uzbekistan",                      
@"NH",	@"Vanuatu",                         
@"VE",	@"Venezuela",                       
@"VM",	@"Vietnam",                         
@"VI",	@"Virgin Islands, British",         
@"VQ",	@"Virgin Islands, U.S.",            
@"WF",	@"Wallis and Futuna",               
@"WE",	@"West Bank",                       
@"WI",	@"Western Sahara",                  
@"YM",	@"Yemen",                           
@"ZA",	@"Zambia",                          
@"ZI",	@"Zimbabwe", 
Advertisements

Written by Clay

November 30, 2012 at 13:50

Posted in Cocoa, Objective-C, Resource

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: