I would need some help in creating bar charts that look like this:
Array
This is what my dataset looks like:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str50 Economy str3 ISO3 str50 Region str19 IncomeGroup str17 DevelopingGroup byte F double Adultswithanaccount2021 float account_pc "Afghanistan" "AFG" "South Asia" "Low income" "Developing" 10 .09653821587562561 9.653822 "Albania" "ALB" "Europe & Central Asia (excluding high income)" "Upper middle income" "Developing" 10 .4417417347431183 44.17418 "Algeria" "DZA" "Middle East & North Africa (excluding high income)" "Lower middle income" "Developing" 10 .4409702122211456 44.09702 "Argentina" "ARG" "Latin America & Caribbean (excluding high income)" "Upper middle income" "Developing" 10 .7162708640098572 71.62708 "Armenia" "ARM" "Europe & Central Asia (excluding high income)" "Upper middle income" "Developing" 10 .5534773468971252 55.34774 "Australia" "AUS" "High income" "High income" "High Income: OECD" 10 .993231475353241 99.32315 "Austria" "AUT" "High income" "High income" "High Income: OECD" 10 .9995071887969971 99.95072 "Bangladesh" "BGD" "South Asia" "Lower middle income" "Developing" 10 .5280606746673584 52.80607 "Belgium" "BEL" "High income" "High income" "High Income: OECD" 10 .9900569915771484 99.0057 "Benin" "BEN" "Sub-Saharan Africa (excluding high income)" "Lower middle income" "Developing" 10 .486055314540863 48.60553 "Bolivia" "BOL" "Latin America & Caribbean (excluding high income)" "Lower middle income" "Developing" 10 .688854455947876 68.885445 "Bosnia and Herzegovina" "BIH" "Europe & Central Asia (excluding high income)" "Upper middle income" "Developing" 10 .7933789491653442 79.3379 "Brazil" "BRA" "Latin America & Caribbean (excluding high income)" "Upper middle income" "Developing" 10 .8403574824333191 84.03575 "Bulgaria" "BGR" "Europe & Central Asia (excluding high income)" "Upper middle income" "Developing" 10 .8396652340888977 83.96652 "Burkina Faso" "BFA" "Sub-Saharan Africa (excluding high income)" "Low income" "Developing" 10 .3610853552818298 36.108536 "Cambodia" "KHM" "East Asia & Pacific (excluding high income)" "Lower middle income" "Developing" 10 .3339499235153198 33.394993 "Cameroon" "CMR" "Sub-Saharan Africa (excluding high income)" "Lower middle income" "Developing" 10 .5165481567382813 51.65482 "Canada" "CAN" "High income" "High income" "High Income: OECD" 10 .9963461756706238 99.63462 "Chile" "CHL" "High income" "High income" "High Income: OECD" 10 .8706206679344177 87.06207 "China" "CHN" "East Asia & Pacific (excluding high income)" "Upper middle income" "Developing" 10 .8870902061462402 88.70902 "Colombia" "COL" "Latin America & Caribbean (excluding high income)" "Upper middle income" "Developing" 10 .5971590876579285 59.71591 "Congo, Rep." "COG" "Sub-Saharan Africa (excluding high income)" "Lower middle income" "Developing" 10 .4714215695858002 47.14216 "Costa Rica" "CRI" "Latin America & Caribbean (excluding high income)" "Upper middle income" "Developing" 10 .6848968863487244 68.489685 "Cote d'Ivoire" "CIV" "Sub-Saharan Africa (excluding high income)" "Lower middle income" "Developing" 10 .5076228976249695 50.76229 "Croatia" "HRV" "High income" "High income" "" 10 .9180419445037842 91.80419 "Cyprus" "CYP" "High income" "High income" "" 10 .9312990307807922 93.12991 "Czech Republic" "CZE" "High income" "High income" "High Income: OECD" 10 .9493670463562012 94.93671 "Denmark" "DNK" "High income" "High income" "High Income: OECD" 10 1 100 "Dominican Republic" "DOM" "Latin America & Caribbean (excluding high income)" "Upper middle income" "Developing" 10 .5129801034927368 51.29801 "Ecuador" "ECU" "Latin America & Caribbean (excluding high income)" "Upper middle income" "Developing" 10 .641767144203186 64.17671 "Egypt, Arab Rep." "EGY" "Middle East & North Africa (excluding high income)" "Lower middle income" "Developing" 10 .2744400501251221 27.444006 "El Salvador" "SLV" "Latin America & Caribbean (excluding high income)" "Lower middle income" "Developing" 10 .3584535419940949 35.845356 "Estonia" "EST" "High income" "High income" "High Income: OECD" 10 .993765652179718 99.37656 "Finland" "FIN" "High income" "High income" "High Income: OECD" 10 .9953019022941589 99.53019 "France" "FRA" "High income" "High income" "High Income: OECD" 10 .9924429655075073 99.24429 "Gabon" "GAB" "Sub-Saharan Africa (excluding high income)" "Upper middle income" "Developing" 10 .6608996987342834 66.08997 "Georgia" "GEO" "Europe & Central Asia (excluding high income)" "Upper middle income" "Developing" 10 .7049868702888489 70.49869 "Germany" "DEU" "High income" "High income" "High Income: OECD" 10 .999765932559967 99.97659 "Ghana" "GHA" "Sub-Saharan Africa (excluding high income)" "Lower middle income" "Developing" 10 .6823039650917053 68.2304 "Greece" "GRC" "High income" "High income" "High Income: OECD" 10 .9488410353660583 94.8841 "Guinea" "GIN" "Sub-Saharan Africa (excluding high income)" "Low income" "Developing" 10 .3044033646583557 30.440336 "Honduras" "HND" "Latin America & Caribbean (excluding high income)" "Lower middle income" "Developing" 10 .3784970343112946 37.849705 "Hong Kong SAR, China" "HKG" "High income" "High income" "" 10 .9780124425888062 97.80125 "Hungary" "HUN" "High income" "High income" "High Income: OECD" 10 .8821879029273987 88.21879 "Iceland" "ISL" "High income" "High income" "High Income: OECD" 10 1 100 "India" "IND" "South Asia" "Lower middle income" "Developing" 10 .775291383266449 77.52914 "Indonesia" "IDN" "East Asia & Pacific (excluding high income)" "Lower middle income" "Developing" 10 .5175532698631287 51.75533 "Iran, Islamic Rep." "IRN" "Middle East & North Africa (excluding high income)" "Lower middle income" "Developing" 10 .8998467326164246 89.98467 "Iraq" "IRQ" "Middle East & North Africa (excluding high income)" "Upper middle income" "Developing" 10 .1856528222560883 18.565283 "Ireland" "IRL" "High income" "High income" "High Income: OECD" 10 .9966340065002441 99.6634 end
Code:
graph bar (mean) account_pc, over(Economy)
Array
Any idea how to create charts only for selected observations? Thanks!
0 Response to Help needed in creating bar charts of selected countries
Post a Comment