ds4owd-001 / md-02-assignments-adnanwijayarso

0 stars 0 forks source link

Completed module 2 assignments #1

Closed adnanwijayarso closed 10 months ago

adnanwijayarso commented 10 months ago

Dear @larnsce @mianzg @sskorik01, I have completed my assignments for module 2!

I need your guidance on Task 11 (creating lineplot)... Running scale_color_manual(values = country_colors) results in error message below: Error inpalette(): ! Insufficient values in manual scale. 142 needed but only 1 provided

I think adding a question mark when we run that line means assigning each observation in the data set a specific color value. But why does it say we only provided 1 value?

sskorik01 commented 10 months ago

Congratulations on completing your second assignment!

However, you haven't committed your code (your code in md-02a-data-visualization.qmd has not been updated on GitHub). You have to commit and push from Posit.cloud to confirm you have finished your assignment.

Running country_colors in your console should give you the following:

country_colors Nigeria Egypt Ethiopia Congo, Dem. Rep. South Africa "#7F3B08" "#833D07" "#873F07" "#8B4107" "#8F4407" Sudan Tanzania Kenya Morocco Algeria "#934607" "#974807" "#9B4A06" "#9F4D06" "#A34F06" Uganda Ghana Mozambique Madagascar Cote d'Ivoire "#A75106" "#AB5406" "#AF5606" "#B35806" "#B75C07" Cameroon Burkina Faso Malawi Niger Angola "#BA5F08" "#BE6209" "#C2650A" "#C5690B" "#C96C0C" Zimbabwe Senegal Mali Zambia Tunisia "#CC6F0D" "#D0730F" "#D37610" "#D77911" "#DA7D12" Chad Guinea Somalia Rwanda Burundi "#DE8013" "#E18417" "#E3881D" "#E58C23" "#E79029" Benin Sierra Leone Libya Togo Eritrea "#EA952F" "#EC9936" "#EE9D3C" "#F1A142" "#F3A548" Central African Republic Congo, Rep. Mauritania Liberia Namibia "#F5AA4E" "#F7AE55" "#FAB25B" "#FCB661" "#FDBA67" Lesotho Gambia Botswana Guinea-Bissau Gabon "#FDBD6E" "#FDC074" "#FDC37B" "#FDC681" "#FDCA88" Mauritius Swaziland Reunion Comoros Equatorial Guinea "#FDCD8E" "#FDD095" "#FDD39B" "#FDD6A2" "#FDD9A8" Djibouti Sao Tome and Principe United States Brazil Mexico "#FDDCAF" "#FEE0B6" "#A50026" "#AD0826" "#B51026" Colombia Argentina Canada Peru Venezuela "#BE1826" "#C62026" "#CE2726" "#D73027" "#DB3A2B" Chile Ecuador Guatemala Cuba Dominican Republic "#E04430" "#E54E35" "#EA5839" "#EF623E" "#F46D43" Bolivia Haiti Honduras El Salvador Paraguay "#F57748" "#F7824D" "#F88D51" "#FA9856" "#FBA35B" Nicaragua Costa Rica Puerto Rico Uruguay Panama "#FDAE61" "#FDB668" "#FDBE70" "#FDC778" "#FDCF80" Jamaica Trinidad and Tobago China India Indonesia "#FDD788" "#FEE090" "#40004B" "#460552" "#4D0A59" Pakistan Bangladesh Japan Philippines Vietnam "#540F60" "#5B1567" "#611A6D" "#681F75" "#6F247B" Iran Thailand Korea, Rep. Myanmar Afghanistan "#762A83" "#7A3288" "#7E3B8C" "#834492" "#874D96" Nepal Saudi Arabia Iraq Malaysia Korea, Dem. Rep. "#8B559B" "#905EA1" "#9467A5" "#9970AB" "#9E76AF" Taiwan Yemen, Rep. Sri Lanka Syria Cambodia "#A37DB3" "#A883B8" "#AD8ABD" "#B291C1" "#B797C6" Hong Kong, China Israel Jordan Singapore West Bank and Gaza "#BC9ECA" "#C2A5CF" "#C6AAD2" "#CBB0D5" "#CFB6D8" Lebanon Oman Mongolia Kuwait Bahrain "#D4BCDB" "#D9C2DE" "#DDC8E1" "#E2CEE4" "#E7D4E8" Germany Turkey France United Kingdom Italy "#276419" "#2C6A1A" "#31701B" "#36771C" "#3B7D1D" Spain Poland Romania Netherlands Greece "#41831E" "#468A1F" "#4B9020" "#529624" "#599C28" Hungary Portugal Belgium Serbia Czech Republic "#5FA12D" "#66A731" "#6DAD35" "#74B33A" "#7BB93E" Sweden Bulgaria Austria Switzerland Denmark "#82BE45" "#8AC34F" "#92C858" "#9ACD62" "#A2D26B" Slovak Republic Finland Norway Bosnia and Herzegovina Croatia "#AAD875" "#B2DD7E" "#B9E188" "#BFE492" "#C6E79C" Ireland Albania Slovenia Montenegro Iceland "#CCE9A7" "#D2ECB1" "#D9EFBB" "#DFF2C5" "#E6F5D0" Australia New Zealand "#313695" "#4575B4"

It is a list of colors that is used to specify the color of each country in the line plot, each code (for example "#4575B4") corresponds to a certain color. Running ?country_colors will open the documentation about this variable in the "Help" tab.

Image

Concerning the error in the code, once you commit & push it, I can have a better look at the whole code chunk to see where the error appears. Hope this helps!

adnanwijayarso commented 10 months ago

Hi, thank you for your input! I tried running my code again and there was no more error message. However, I'm having a trouble committing the qmd file as it doesn't show up on the Git pane, any idea how to fix it? adnanwijayarso_assignment2

Or can I just export my work from positcloud, and then upload it manually to github?

larnsce commented 10 months ago

Thank you, @adnanwijayarso. You have already done the commit, so all that is left is to "push" your work to GitHub. Then:

Button:

283097248-e5ee285d-7b9b-47e3-bf12-c80292d1893c

adnanwijayarso commented 10 months ago

Oh, I think I got it! I committed the change, but I forgot to push it to github... sorry image

larnsce commented 10 months ago

Well done, I will close this issue now.