//Metadata: //Programming language: Power Query M //Natural language: English //Output: dimension table //Source: https://github.com/lukes/ISO-3166-Countries-with-Regional-Codes/blob/master/all/all.csv //Explanation: //Generates static country region data //Note that these data may not be up to date //How to use: //Copy the code into an empty query let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("rV3dcuJIsn4Vwle9Ed0btjE/fe5AgMAgISMBY2b3ooBq0Bgkj0D22vfnWU7s/XmDebGt/ErGKN3bSFgRs1/PdNqZ9ZN/lZWl/f33i8aP1VoE/m4vgouvF40OwFR4o/7Xc4el8lW1+u36fzRl5wv1hxvG+7WMglLy3+qfq5trhWX6pSDebC7++fX3i7/+dyOCZam3oz929Ou/EQwaCq9v6ow/0dpxFD5K9S92GGkJh78hGZVLYEpIYzNXwxdgDGgq5LwHx7wPo//Iu/w9zXolI7BuzQA08KvrNG+QGj8ifyGOx334G5or+Kc4byWRg5IrtiHG7gIs+skqGzyRhguZzNIJNy+BPKw7Dbh6leIdLMMoAtMWgU14fcmYts5bkWAVbsB6SGAOsZOM9fB4Qdx4/s0VaxGJozWx/OVyI9//+xojxDLV3uTE/kZL6gFo6atVPgvQ9FqSfg3E3ldi9F+USPfUtEqGiPz5XEK/j//9iqZ2A7z+nojdi2ix14Nq3BF42HMu904vkf4Hq5P+I2Hmr2I9jKaI5vESXE1wJbzmWmoWPJtoJdUYAogdAUhCmSmwJuURC3V5+4m06EoieSsTm7Qgl7ByxeRa7w5lKnf7n/mTq5u02UTxHFynBE3CSrnM2E4LXsV4t4/ERs9mDCCDLHMrHaes9PBbkGjL59JMCnKD71ZbKaemRr+gf9WDEMIbrnfesdW+LdrPXGR62V5lNBf+H9rDw1/N2jQHviOz3DvSVKa9xTo3aVWaXcIb5hFAKnBLlNBI+AHkAUiDeTwBKe9kgtVGLOVuTVzJQzZNwgrbBpDyhUJyAGIZYqEoQDVHhBVmiiAVuVByI6IYQu8JBrRQVzyCgXZQorb471qVijOK+cqPt8S3DaAgW2FmAVJ+jVW8/Vf6geYM4yas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7v68tfATTcCjYg/P4Wq8sdw7s9bl+dsw+jagHSXmAwAqB7xNzhucKSHEF2HwqV0PXyqu8f51r4hbEy98kLo67fUBNN4a72j3cn6JxQtVIkfshgA4St5mDloenspF+kuhPZUXzoVeIA+ABeK3Fl7Bz3y8OPD1APFFSg8vRmo8s/dSZ4iMAcCLowd0hnsjcIY34S0Q3lHDblZvovjS14zfrNzCHsOpf2f5oHd0ZZLVyhV3XV8xhE9fh3pPXzwDAKvjzRZewadsL1ZBDCo8weJNIJRvyySfuo1XSe1ubALgq/j1wLiIxsLxA30PmBzJmISM0Zdd53cCoOU/DCTuF0GrvfWpaQjfskeNFpXaGm9fauR/15xI6avz2zLcUsgyIyn2JfoKpZqbLsG9WcL7IxqzCcB8P3yWo3lxVhqQDOXQF3WU/KC2O0bxoM5TqzFLqTNXnNLyLD8Io9Iw3m9e1Foc2QPexo4tOnNV6uwCbZy3NWscxcndFZ5VjnF3VecZwbj4u6vx61weUobxDED7VOeJzzj/64+JCGKxJzOejAHkvSv8Pd6EvSY+daKcyEC+xuqnSl/w+V9ce/OHGJM2AE+tePIzKf4ubuLLfcnGw2kczSe2PuYyO5yc+UnUia9OmMH7h06ST8FioiYAR3U+z4K/389HMf67+3cMoQeAzfM+7UnB/48IU7HZ+DpAdeJ9jBx6Skf86YCwzlOSac4Pb7x5R+30yV/hZIEbjNqHr/+k7jUy5gX3cosD030boAvIrBXkPr+/nr19SmNmAWDDvKQ3K+LThjN/OxfzZ/LYsykAMYdf4M4+fQn2z/8A", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [name = _t, #"alpha-2" = _t, #"alpha-3" = _t, #"country-code" = _t, #"iso_3166-2" = _t, region = _t, #"sub-region" = _t, #"intermediate-region" = _t, #"region-code" = _t, #"sub-region-code" = _t, #"intermediate-region-code" = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"name", type text}, {"alpha-2", type text}, {"alpha-3", type text}, {"country-code", Int64.Type}, {"iso_3166-2", type text}, {"region", type text}, {"sub-region", type text}, {"intermediate-region", type text}, {"region-code", Int64.Type}, {"sub-region-code", Int64.Type}, {"intermediate-region-code", Int64.Type}}) in #"Changed Type"