-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project - Mafalda González González #95
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for mucss-dataviz ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really good work! Some comments below.
### The original graph | ||
|
||
The original graph portrays the relationship between the share living in extreme poverty and the GDP per capita in 8 world regions and the global average between the years 1817 and 2017. | ||
|
||
::: {style="display: flex; align-items: flex-start; gap: 15px; overflow: hidden;"} | ||
```{=html} | ||
<img src="Growth-and-poverty-since-1820.png" | ||
style="width: 300px;"/> | ||
``` | ||
<p>The graphs strengths include its clear comparison between the world regions wealth and poverty trends, which highlight the significant variation between regions, and its historical perspective, which provides some context for the global and regional progress. Visually, the regional facets and colouring contribute to their acute distinction and provide clarity and readability.</p> | ||
::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this redundant with the above? I mean adding a subsection and showing the graph again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true. i have now moved it to the improvement as a segway to explain the changes
# dowload fonts | ||
sysfonts::font_add_google("Playfair Display", family = "playfair display") | ||
sysfonts::font_add_google("Lato", family = "lato") | ||
sysfonts::font_add(regular = "./Lato/Lato-Light.ttf", family = "lato_light") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to load the font again from Google Fonts with the appropriate weight. Remove please the folder with the font sources, and here you can do something like:
sysfonts::font_add_google("Lato", family = "lato_light", regular.wt=300)
Or less if you need it thinner.
--- | ||
|
||
```{r setup, include=FALSE} | ||
knitr::opts_chunk$set(echo = TRUE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add fig.showtext=TRUE
so that the resulting fonts have a reasonable size.
|
||
The original graph's x axis `limits` does not start at 0 or end at the 50000 break, but rather starts and ends a bit later. Thus, we set the scales within facet_wrap free and manually determine the limits within each scale. The x axis limits apparently start at 800 (which is the minimum value of the GDP values) and seem to end at somewhere around 57000 (trial and error considering the logarithmic scale). | ||
|
||
<aside>Explanation: even though we have set the scales free for all panels as a group in the `facet_wrap`, we have also pre-defined the scales for all panels individually in `scale_x_log10` and `scale_y_continuous`.</aside> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:))
|
||
The dimensions I have chosen are: | ||
|
||
`{r, layout="l-body-outset", fig.width = 8, fig.height = 5.8, fig.dpi = 300}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the fig.dpi
specification from all chunks. The default should be enough for our purposes. Otherwise, images are too big, and the post takes a lot of bandwidth.
initial commit (2nd try)