-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
70 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -341,8 +341,10 @@ <h2 id="whats-the-information-for-and-what-we-know">What’s the information for | |
</span><span class="n">gather</span><span class="p">(</span><span class="n">variable</span><span class="p">,</span><span class="w"> </span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="o">-</span><span class="n">label2</span><span class="p">,</span><span class="w"> </span><span class="o">-</span><span class="n">cat_type</span><span class="p">)</span><span class="w"> </span><span class="o">|></span><span class="w"> | ||
</span><span class="n">ggplot</span><span class="p">(</span><span class="n">aes</span><span class="p">(</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">label2</span><span class="p">,</span><span class="w"> </span><span class="n">colour</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">variable</span><span class="p">))</span><span class="w"> </span><span class="o">+</span><span class="w"> | ||
</span><span class="n">facet_wrap</span><span class="p">(</span><span class="o">~</span><span class="n">cat_type</span><span class="p">,</span><span class="w"> </span><span class="n">scales</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"free_y"</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> | ||
</span><span class="n">geom_segment</span><span class="p">(</span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">d3</span><span class="p">,</span><span class="w"> </span><span class="n">linewidth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1.1</span><span class="p">,</span><span class="w"> </span><span class="n">alpha</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0.5</span><span class="p">,</span><span class="w"> | ||
</span><span class="n">aes</span><span class="p">(</span><span class="n">yend</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">label2</span><span class="p">,</span><span class="w"> </span><span class="n">xend</span><span class="w"> </span><span class="o">=</span><span class="n">glb2</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">hs</span><span class="p">),</span><span class="w"> | ||
</span><span class="n">geom_segment</span><span class="p">(</span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">d3</span><span class="p">,</span><span class="w"> </span><span class="n">linewidth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1.1</span><span class="p">,</span><span class="w"> | ||
</span><span class="n">aes</span><span class="p">(</span><span class="n">yend</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">label2</span><span class="p">,</span><span class="w"> </span><span class="n">xend</span><span class="w"> </span><span class="o">=</span><span class="n">glb2</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">hs</span><span class="p">,</span><span class="w"> | ||
</span><span class="n">colour</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">stage</span><span class="p">(</span><span class="n">start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">variable</span><span class="p">,</span><span class="w"> | ||
</span><span class="n">after_scale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">prismatic</span><span class="o">::</span><span class="n">clr_lighten</span><span class="p">(</span><span class="n">colour</span><span class="p">,</span><span class="w"> </span><span class="n">space</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"combined"</span><span class="p">))),</span><span class="w"> | ||
</span><span class="n">arrow</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="p">(</span><span class="n">angle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">15</span><span class="p">,</span><span class="w"> </span><span class="n">length</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">unit</span><span class="p">(</span><span class="m">0.15</span><span class="p">,</span><span class="w"> </span><span class="s2">"inches"</span><span class="p">)))</span><span class="w"> </span><span class="o">+</span><span class="w"> | ||
</span><span class="n">geom_point</span><span class="p">(</span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">4</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> | ||
</span><span class="n">scale_x_continuous</span><span class="p">(</span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">percent</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> | ||
|
@@ -362,6 +364,13 @@ <h2 id="whats-the-information-for-and-what-we-know">What’s the information for | |
|
||
<p>That’s all for today. Do read (and follow, in your next survey questionnaire with questions on sex or gender) that standard on sex, gender, etc. - it’s good stuff.</p> | ||
|
||
<h3 id="late-edits--update">Late edits / update</h3> | ||
|
||
<ul> | ||
<li>thanks to @[email protected] who pointed out on Mastodon a better method of making the arrows appear light rather than the transparency hack I originally used. His method, using the ‘prismatic’ package, I have edited my code above and is now in use.</li> | ||
<li>immediately after I wrote all the above I discovered that while I was publishing the original post, the Government has now announced that the questions on sexual orientation, sex at birth, and gender now will all be included in the Census; but not the question on sexual characteristics. So this is a good outcome for those wanting to estimate gender issues and trans/cis status, although those with interest in sexual characteristics are still disappointed.</li> | ||
</ul> | ||
|
||
|
||
|
||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,8 +189,10 @@ | |
</span><span class="n">gather</span><span class="p">(</span><span class="n">variable</span><span class="p">,</span><span class="w"> </span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="o">-</span><span class="n">label2</span><span class="p">,</span><span class="w"> </span><span class="o">-</span><span class="n">cat_type</span><span class="p">)</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> | ||
</span><span class="n">ggplot</span><span class="p">(</span><span class="n">aes</span><span class="p">(</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">value</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">label2</span><span class="p">,</span><span class="w"> </span><span class="n">colour</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">variable</span><span class="p">))</span><span class="w"> </span><span class="o">+</span><span class="w"> | ||
</span><span class="n">facet_wrap</span><span class="p">(</span><span class="o">~</span><span class="n">cat_type</span><span class="p">,</span><span class="w"> </span><span class="n">scales</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"free_y"</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> | ||
</span><span class="n">geom_segment</span><span class="p">(</span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">d3</span><span class="p">,</span><span class="w"> </span><span class="n">linewidth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1.1</span><span class="p">,</span><span class="w"> </span><span class="n">alpha</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0.5</span><span class="p">,</span><span class="w"> | ||
</span><span class="n">aes</span><span class="p">(</span><span class="n">yend</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">label2</span><span class="p">,</span><span class="w"> </span><span class="n">xend</span><span class="w"> </span><span class="o">=</span><span class="n">glb2</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">hs</span><span class="p">),</span><span class="w"> | ||
</span><span class="n">geom_segment</span><span class="p">(</span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">d3</span><span class="p">,</span><span class="w"> </span><span class="n">linewidth</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1.1</span><span class="p">,</span><span class="w"> | ||
</span><span class="n">aes</span><span class="p">(</span><span class="n">yend</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">label2</span><span class="p">,</span><span class="w"> </span><span class="n">xend</span><span class="w"> </span><span class="o">=</span><span class="n">glb2</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">hs</span><span class="p">,</span><span class="w"> | ||
</span><span class="n">colour</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">stage</span><span class="p">(</span><span class="n">start</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">variable</span><span class="p">,</span><span class="w"> | ||
</span><span class="n">after_scale</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">prismatic</span><span class="o">::</span><span class="n">clr_lighten</span><span class="p">(</span><span class="n">colour</span><span class="p">,</span><span class="w"> </span><span class="n">space</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"combined"</span><span class="p">))),</span><span class="w"> | ||
</span><span class="n">arrow</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="p">(</span><span class="n">angle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">15</span><span class="p">,</span><span class="w"> </span><span class="n">length</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">unit</span><span class="p">(</span><span class="m">0.15</span><span class="p">,</span><span class="w"> </span><span class="s2">"inches"</span><span class="p">)))</span><span class="w"> </span><span class="o">+</span><span class="w"> | ||
</span><span class="n">geom_point</span><span class="p">(</span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">4</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> | ||
</span><span class="n">scale_x_continuous</span><span class="p">(</span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">percent</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> | ||
|
@@ -209,6 +211,13 @@ | |
<object type="image/svg+xml" data="https://freerangestats.info/img/0278-many-facets.svg" width="100%"><img src="https://freerangestats.info/img/0278-many-facets.png" width="100%" /></object> | ||
|
||
<p>That’s all for today. Do read (and follow, in your next survey questionnaire with questions on sex or gender) that standard on sex, gender, etc. - it’s good stuff.</p> | ||
|
||
<h3 id="late-edits--update">Late edits / update</h3> | ||
|
||
<ul> | ||
<li>thanks to @[email protected] who pointed out on Mastodon a better method of making the arrows appear light rather than the transparency hack I originally used. His method, using the ‘prismatic’ package, I have edited my code above and is now in use.</li> | ||
<li>immediately after I wrote all the above I discovered that while I was publishing the original post, the Government has now announced that the questions on sexual orientation, sex at birth, and gender now will all be included in the Census; but not the question on sexual characteristics. So this is a good outcome for those wanting to estimate gender issues and trans/cis status, although those with interest in sexual characteristics are still disappointed.</li> | ||
</ul> | ||
</description> | ||
<pubDate>Sun, 08 Sep 2024 00:00:00 +1100</pubDate> | ||
<link>https://freerangestats.info/blog/2024/09/08/sex-gender</link> | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.