diff --git a/404.html b/404.html index 8ce173ca9..d14e95ead 100644 --- a/404.html +++ b/404.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • @@ -146,7 +146,7 @@

    This page doesn't exist.

    Try one of these instead:

    diff --git a/about/acknowledgements.html b/about/acknowledgements.html index 853474372..b349661d7 100644 --- a/about/acknowledgements.html +++ b/about/acknowledgements.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/about/index.html b/about/index.html index cd58e1469..726340186 100644 --- a/about/index.html +++ b/about/index.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/07/26/hello-world.html b/blog/2015/07/26/hello-world.html index 186a3eede..9b7a6eab5 100644 --- a/blog/2015/07/26/hello-world.html +++ b/blog/2015/07/26/hello-world.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/08/01/new-zealand-data-on-github.html b/blog/2015/08/01/new-zealand-data-on-github.html index c235275d4..3e8d4c76a 100644 --- a/blog/2015/08/01/new-zealand-data-on-github.html +++ b/blog/2015/08/01/new-zealand-data-on-github.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/08/07/fibs-elo-ratings-basics.html b/blog/2015/08/07/fibs-elo-ratings-basics.html index 34ef86587..f3054ffde 100644 --- a/blog/2015/08/07/fibs-elo-ratings-basics.html +++ b/blog/2015/08/07/fibs-elo-ratings-basics.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/08/15/importing-nzis-surf.html b/blog/2015/08/15/importing-nzis-surf.html index 4c8caf0f1..e7ef94d43 100644 --- a/blog/2015/08/15/importing-nzis-surf.html +++ b/blog/2015/08/15/importing-nzis-surf.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/08/21/visualising-distributions.html b/blog/2015/08/21/visualising-distributions.html index cbfd1788e..59dbd9c92 100644 --- a/blog/2015/08/21/visualising-distributions.html +++ b/blog/2015/08/21/visualising-distributions.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/08/30/starting-in-datascience.html b/blog/2015/08/30/starting-in-datascience.html index 22b5da635..a1054ef52 100644 --- a/blog/2015/08/30/starting-in-datascience.html +++ b/blog/2015/08/30/starting-in-datascience.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/09/05/creating-a-scale-transformation.html b/blog/2015/09/05/creating-a-scale-transformation.html index a3cf55f15..4cbf9edb2 100644 --- a/blog/2015/09/05/creating-a-scale-transformation.html +++ b/blog/2015/09/05/creating-a-scale-transformation.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/09/07/transforming-breaks-in-a-scale.html b/blog/2015/09/07/transforming-breaks-in-a-scale.html index e1e531175..ac79fcd6d 100644 --- a/blog/2015/09/07/transforming-breaks-in-a-scale.html +++ b/blog/2015/09/07/transforming-breaks-in-a-scale.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/09/12/inequality-stats-distributions.html b/blog/2015/09/12/inequality-stats-distributions.html index 576a24293..421f45749 100644 --- a/blog/2015/09/12/inequality-stats-distributions.html +++ b/blog/2015/09/12/inequality-stats-distributions.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/09/19/timeseries-same-acf.html b/blog/2015/09/19/timeseries-same-acf.html index 04ddca713..3cf06644a 100644 --- a/blog/2015/09/19/timeseries-same-acf.html +++ b/blog/2015/09/19/timeseries-same-acf.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/09/20/timeseries-differences.html b/blog/2015/09/20/timeseries-differences.html index a98773e00..f50bead2d 100644 --- a/blog/2015/09/20/timeseries-differences.html +++ b/blog/2015/09/20/timeseries-differences.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/09/30/autoarima-success-rates.html b/blog/2015/09/30/autoarima-success-rates.html index b090a84fd..e7eaa2b74 100644 --- a/blog/2015/09/30/autoarima-success-rates.html +++ b/blog/2015/09/30/autoarima-success-rates.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/10/04/recruiting.html b/blog/2015/10/04/recruiting.html index ceea383e0..046ae617b 100644 --- a/blog/2015/10/04/recruiting.html +++ b/blog/2015/10/04/recruiting.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/10/10/X13ARIMA-SEATS.html b/blog/2015/10/10/X13ARIMA-SEATS.html index 2722f4f57..ea45bc3ba 100644 --- a/blog/2015/10/10/X13ARIMA-SEATS.html +++ b/blog/2015/10/10/X13ARIMA-SEATS.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/10/25/silver.html b/blog/2015/10/25/silver.html index fa4b60193..b21f17861 100644 --- a/blog/2015/10/25/silver.html +++ b/blog/2015/10/25/silver.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/10/30/MTAGDP.html b/blog/2015/10/30/MTAGDP.html index ba605c22b..bd87498d7 100644 --- a/blog/2015/10/30/MTAGDP.html +++ b/blog/2015/10/30/MTAGDP.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/11/15/linear-model-timeseries.html b/blog/2015/11/15/linear-model-timeseries.html index 8c519380c..b658a7f3f 100644 --- a/blog/2015/11/15/linear-model-timeseries.html +++ b/blog/2015/11/15/linear-model-timeseries.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/11/21/arima-sims.html b/blog/2015/11/21/arima-sims.html index 056584dcc..130e4b32b 100644 --- a/blog/2015/11/21/arima-sims.html +++ b/blog/2015/11/21/arima-sims.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/11/26/violent-deaths.html b/blog/2015/11/26/violent-deaths.html index ea4f5f93e..26fcb3834 100644 --- a/blog/2015/11/26/violent-deaths.html +++ b/blog/2015/11/26/violent-deaths.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/12/05/wdi-inequality.html b/blog/2015/12/05/wdi-inequality.html index e19c0d5ff..211cf6f0b 100644 --- a/blog/2015/12/05/wdi-inequality.html +++ b/blog/2015/12/05/wdi-inequality.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/12/12/exports-gdp.html b/blog/2015/12/12/exports-gdp.html index 69e465cc0..b963ec44a 100644 --- a/blog/2015/12/12/exports-gdp.html +++ b/blog/2015/12/12/exports-gdp.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/12/21/m3-and-x13.html b/blog/2015/12/21/m3-and-x13.html index 8b33011bc..795139216 100644 --- a/blog/2015/12/21/m3-and-x13.html +++ b/blog/2015/12/21/m3-and-x13.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/12/26/commuting-network.html b/blog/2015/12/26/commuting-network.html index 39c591e77..7918a6901 100644 --- a/blog/2015/12/26/commuting-network.html +++ b/blog/2015/12/26/commuting-network.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2015/12/29/Rrobot-born.html b/blog/2015/12/29/Rrobot-born.html index 71f64e090..6890bfbf6 100644 --- a/blog/2015/12/29/Rrobot-born.html +++ b/blog/2015/12/29/Rrobot-born.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/01/23/nzis-estimates.html b/blog/2016/01/23/nzis-estimates.html index 9d69bef5e..3f4328595 100644 --- a/blog/2016/01/23/nzis-estimates.html +++ b/blog/2016/01/23/nzis-estimates.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/01/30/hybrid-forecasts.html b/blog/2016/01/30/hybrid-forecasts.html index 0956d7e22..6cb30a9e3 100644 --- a/blog/2016/01/30/hybrid-forecasts.html +++ b/blog/2016/01/30/hybrid-forecasts.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/02/06/world-health-organization.html b/blog/2016/02/06/world-health-organization.html index 5481488ac..14bbbe919 100644 --- a/blog/2016/02/06/world-health-organization.html +++ b/blog/2016/02/06/world-health-organization.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/02/08/ggseas.html b/blog/2016/02/08/ggseas.html index e51d85fb6..52c084525 100644 --- a/blog/2016/02/08/ggseas.html +++ b/blog/2016/02/08/ggseas.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/02/20/DSGE.html b/blog/2016/02/20/DSGE.html index d8cb008ef..bc34623c1 100644 --- a/blog/2016/02/20/DSGE.html +++ b/blog/2016/02/20/DSGE.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/02/24/tourism-dashboard.html b/blog/2016/02/24/tourism-dashboard.html index b739c5e96..f8c7862d6 100644 --- a/blog/2016/02/24/tourism-dashboard.html +++ b/blog/2016/02/24/tourism-dashboard.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/03/06/control-charts.html b/blog/2016/03/06/control-charts.html index 44ba18fd1..e1a278cb8 100644 --- a/blog/2016/03/06/control-charts.html +++ b/blog/2016/03/06/control-charts.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/03/19/elo-pr-luck.html b/blog/2016/03/19/elo-pr-luck.html index a5ad58139..b7d85e7cd 100644 --- a/blog/2016/03/19/elo-pr-luck.html +++ b/blog/2016/03/19/elo-pr-luck.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/03/28/ggseas-update.html b/blog/2016/03/28/ggseas-update.html index 5b8436462..c7c206e0d 100644 --- a/blog/2016/03/28/ggseas-update.html +++ b/blog/2016/03/28/ggseas-update.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/04/03/nzelect1.html b/blog/2016/04/03/nzelect1.html index c2f420f32..b2dba7d6c 100644 --- a/blog/2016/04/03/nzelect1.html +++ b/blog/2016/04/03/nzelect1.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/04/04/nzelect2.html b/blog/2016/04/04/nzelect2.html index a05498767..c4d595bfd 100644 --- a/blog/2016/04/04/nzelect2.html +++ b/blog/2016/04/04/nzelect2.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/04/09/nzelect3.html b/blog/2016/04/09/nzelect3.html index bd02c49fd..dcce4cbd9 100644 --- a/blog/2016/04/09/nzelect3.html +++ b/blog/2016/04/09/nzelect3.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/04/16/nzelect4.html b/blog/2016/04/16/nzelect4.html index f6ba3d60e..b1d059e6b 100644 --- a/blog/2016/04/16/nzelect4.html +++ b/blog/2016/04/16/nzelect4.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/05/07/forecastHybrid.html b/blog/2016/05/07/forecastHybrid.html index dc8f5cac9..536d5bb1e 100644 --- a/blog/2016/05/07/forecastHybrid.html +++ b/blog/2016/05/07/forecastHybrid.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/05/14/scots-female-ratio.html b/blog/2016/05/14/scots-female-ratio.html index e76d3f80b..17d777100 100644 --- a/blog/2016/05/14/scots-female-ratio.html +++ b/blog/2016/05/14/scots-female-ratio.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/05/22/robust-regression.html b/blog/2016/05/22/robust-regression.html index 21adbb7ca..9b6e05f91 100644 --- a/blog/2016/05/22/robust-regression.html +++ b/blog/2016/05/22/robust-regression.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/05/29/standard-deviation-confidence-intervals.html b/blog/2016/05/29/standard-deviation-confidence-intervals.html index 55b941985..045fe8b35 100644 --- a/blog/2016/05/29/standard-deviation-confidence-intervals.html +++ b/blog/2016/05/29/standard-deviation-confidence-intervals.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/06/05/bootstrap-cv-strategies.html b/blog/2016/06/05/bootstrap-cv-strategies.html index 27347cda1..718307138 100644 --- a/blog/2016/06/05/bootstrap-cv-strategies.html +++ b/blog/2016/06/05/bootstrap-cv-strategies.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/06/14/graphics-presentation.html b/blog/2016/06/14/graphics-presentation.html index 4bba4ac0f..9768590e1 100644 --- a/blog/2016/06/14/graphics-presentation.html +++ b/blog/2016/06/14/graphics-presentation.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/06/16/mrtes.html b/blog/2016/06/16/mrtes.html index eaf122840..d544b8edb 100644 --- a/blog/2016/06/16/mrtes.html +++ b/blog/2016/06/16/mrtes.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/06/30/ehii.html b/blog/2016/06/30/ehii.html index 7a9359bdc..bb460b3ad 100644 --- a/blog/2016/06/30/ehii.html +++ b/blog/2016/06/30/ehii.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/07/02/ehii-map.html b/blog/2016/07/02/ehii-map.html index 5170c62a8..87f117226 100644 --- a/blog/2016/07/02/ehii-map.html +++ b/blog/2016/07/02/ehii-map.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/07/14/nzelect-cran.html b/blog/2016/07/14/nzelect-cran.html index 832b32f68..bcec3de70 100644 --- a/blog/2016/07/14/nzelect-cran.html +++ b/blog/2016/07/14/nzelect-cran.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/08/04/nzcensus-gam-elastic-lm.html b/blog/2016/08/04/nzcensus-gam-elastic-lm.html index 22918d7e0..4dc244ee8 100644 --- a/blog/2016/08/04/nzcensus-gam-elastic-lm.html +++ b/blog/2016/08/04/nzcensus-gam-elastic-lm.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/08/13/fitbit-lasso.html b/blog/2016/08/13/fitbit-lasso.html index 69722b3a3..81c219d9f 100644 --- a/blog/2016/08/13/fitbit-lasso.html +++ b/blog/2016/08/13/fitbit-lasso.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/08/18/dualaxes.html b/blog/2016/08/18/dualaxes.html index d6e34c798..71d328d96 100644 --- a/blog/2016/08/18/dualaxes.html +++ b/blog/2016/08/18/dualaxes.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/08/28/dualaxes2.html b/blog/2016/08/28/dualaxes2.html index 11ac8a4ec..a01b62a9f 100644 --- a/blog/2016/08/28/dualaxes2.html +++ b/blog/2016/08/28/dualaxes2.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/09/13/mtagdp.html b/blog/2016/09/13/mtagdp.html index 8e3e059cd..3112a5ad6 100644 --- a/blog/2016/09/13/mtagdp.html +++ b/blog/2016/09/13/mtagdp.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/09/16/version-control.html b/blog/2016/09/16/version-control.html index f6f59ac68..3f52a2a5f 100644 --- a/blog/2016/09/16/version-control.html +++ b/blog/2016/09/16/version-control.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/09/18/nzes1.html b/blog/2016/09/18/nzes1.html index 7f5dec8e7..349a5502f 100644 --- a/blog/2016/09/18/nzes1.html +++ b/blog/2016/09/18/nzes1.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/10/12/ggsdc-rents.html b/blog/2016/10/12/ggsdc-rents.html index 56cc65dae..e6b102051 100644 --- a/blog/2016/10/12/ggsdc-rents.html +++ b/blog/2016/10/12/ggsdc-rents.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/10/15/snz-api.html b/blog/2016/10/15/snz-api.html index 2c8c5cbee..9eeb86c99 100644 --- a/blog/2016/10/15/snz-api.html +++ b/blog/2016/10/15/snz-api.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/10/19/Tcomp.html b/blog/2016/10/19/Tcomp.html index 9d15cdadd..a5cf2247f 100644 --- a/blog/2016/10/19/Tcomp.html +++ b/blog/2016/10/19/Tcomp.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/10/29/538-pollsters.html b/blog/2016/10/29/538-pollsters.html index 3640afc12..ca5e77a85 100644 --- a/blog/2016/10/29/538-pollsters.html +++ b/blog/2016/10/29/538-pollsters.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/11/06/forecastxgb.html b/blog/2016/11/06/forecastxgb.html index 124a249ac..900473c6b 100644 --- a/blog/2016/11/06/forecastxgb.html +++ b/blog/2016/11/06/forecastxgb.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/11/15/piecharts.html b/blog/2016/11/15/piecharts.html index b39d3c34c..c021c5e84 100644 --- a/blog/2016/11/15/piecharts.html +++ b/blog/2016/11/15/piecharts.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/11/19/earthquakes.html b/blog/2016/11/19/earthquakes.html index d505283c9..7e04786c0 100644 --- a/blog/2016/11/19/earthquakes.html +++ b/blog/2016/11/19/earthquakes.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/11/24/seaice.html b/blog/2016/11/24/seaice.html index 77cd014ff..9d463487c 100644 --- a/blog/2016/11/24/seaice.html +++ b/blog/2016/11/24/seaice.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/11/27/ets-friends.html b/blog/2016/11/27/ets-friends.html index 649d0d8a8..e98eb4574 100644 --- a/blog/2016/11/27/ets-friends.html +++ b/blog/2016/11/27/ets-friends.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/12/07/arima-prediction-intervals.html b/blog/2016/12/07/arima-prediction-intervals.html index 85d40ad4c..5b3c81688 100644 --- a/blog/2016/12/07/arima-prediction-intervals.html +++ b/blog/2016/12/07/arima-prediction-intervals.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/12/10/extrapolation.html b/blog/2016/12/10/extrapolation.html index 6489224de..0b855c872 100644 --- a/blog/2016/12/10/extrapolation.html +++ b/blog/2016/12/10/extrapolation.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/12/18/air-quality-india.html b/blog/2016/12/18/air-quality-india.html index dbd7ad96d..e66510726 100644 --- a/blog/2016/12/18/air-quality-india.html +++ b/blog/2016/12/18/air-quality-india.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/12/24/forecastHybrid-0.3.html b/blog/2016/12/24/forecastHybrid-0.3.html index 40195b901..f30853548 100644 --- a/blog/2016/12/24/forecastHybrid-0.3.html +++ b/blog/2016/12/24/forecastHybrid-0.3.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/12/26/shadow-economy.html b/blog/2016/12/26/shadow-economy.html index b8200bf38..9c979c32e 100644 --- a/blog/2016/12/26/shadow-economy.html +++ b/blog/2016/12/26/shadow-economy.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2016/12/31/sparse-bags.html b/blog/2016/12/31/sparse-bags.html index 73d98a7fa..df4677eca 100644 --- a/blog/2016/12/31/sparse-bags.html +++ b/blog/2016/12/31/sparse-bags.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/01/05/topic-model-cv.html b/blog/2017/01/05/topic-model-cv.html index 8c337e088..91040cf71 100644 --- a/blog/2017/01/05/topic-model-cv.html +++ b/blog/2017/01/05/topic-model-cv.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/01/14/books.html b/blog/2017/01/14/books.html index 6501730eb..2eb55cb82 100644 --- a/blog/2017/01/14/books.html +++ b/blog/2017/01/14/books.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/01/22/forecast-seasadj-lambda.html b/blog/2017/01/22/forecast-seasadj-lambda.html index 33473ba64..b0f3d6328 100644 --- a/blog/2017/01/22/forecast-seasadj-lambda.html +++ b/blog/2017/01/22/forecast-seasadj-lambda.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/01/23/inaugural-speeches.html b/blog/2017/01/23/inaugural-speeches.html index 4f4a9e02b..76451963c 100644 --- a/blog/2017/01/23/inaugural-speeches.html +++ b/blog/2017/01/23/inaugural-speeches.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/02/18/svmlite.html b/blog/2017/02/18/svmlite.html index 2f7e7eb1f..420bf5dde 100644 --- a/blog/2017/02/18/svmlite.html +++ b/blog/2017/02/18/svmlite.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/02/26/appeal-circuits.html b/blog/2017/02/26/appeal-circuits.html index 59fdd87af..a22ce4357 100644 --- a/blog/2017/02/26/appeal-circuits.html +++ b/blog/2017/02/26/appeal-circuits.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/03/04/childrens-books.html b/blog/2017/03/04/childrens-books.html index bf246d1e6..a061790a5 100644 --- a/blog/2017/03/04/childrens-books.html +++ b/blog/2017/03/04/childrens-books.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/03/11/nzelect-0.3.0.html b/blog/2017/03/11/nzelect-0.3.0.html index e3053c47c..3d97d3e6d 100644 --- a/blog/2017/03/11/nzelect-0.3.0.html +++ b/blog/2017/03/11/nzelect-0.3.0.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/03/12/stepwise-timeseries.html b/blog/2017/03/12/stepwise-timeseries.html index eed791e29..d05458ff9 100644 --- a/blog/2017/03/12/stepwise-timeseries.html +++ b/blog/2017/03/12/stepwise-timeseries.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/03/21/house-effects.html b/blog/2017/03/21/house-effects.html index 71fecaf01..e7c0e8b14 100644 --- a/blog/2017/03/21/house-effects.html +++ b/blog/2017/03/21/house-effects.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/03/26/election-forecasts.html b/blog/2017/03/26/election-forecasts.html index f430e3f48..1fe3c07ad 100644 --- a/blog/2017/03/26/election-forecasts.html +++ b/blog/2017/03/26/election-forecasts.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/04/09/propensity-v-regression.html b/blog/2017/04/09/propensity-v-regression.html index 563a5cd49..cfb42d6e8 100644 --- a/blog/2017/04/09/propensity-v-regression.html +++ b/blog/2017/04/09/propensity-v-regression.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/04/15/propensity-simulations.html b/blog/2017/04/15/propensity-simulations.html index 2de442c55..a916cca8a 100644 --- a/blog/2017/04/15/propensity-simulations.html +++ b/blog/2017/04/15/propensity-simulations.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/04/23/cartograms.html b/blog/2017/04/23/cartograms.html index 89dabfe0a..c7d3ce679 100644 --- a/blog/2017/04/23/cartograms.html +++ b/blog/2017/04/23/cartograms.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/04/25/more-cartograms.html b/blog/2017/04/25/more-cartograms.html index 851c816de..a5458c0bc 100644 --- a/blog/2017/04/25/more-cartograms.html +++ b/blog/2017/04/25/more-cartograms.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/04/30/micromaps.html b/blog/2017/04/30/micromaps.html index f7316d197..43fd4aab2 100644 --- a/blog/2017/04/30/micromaps.html +++ b/blog/2017/04/30/micromaps.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/05/06/nz-first.html b/blog/2017/05/06/nz-first.html index 23822e97f..2057634c2 100644 --- a/blog/2017/05/06/nz-first.html +++ b/blog/2017/05/06/nz-first.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/05/14/nzes-app.html b/blog/2017/05/14/nzes-app.html index 2d9ad6ef4..0ba235065 100644 --- a/blog/2017/05/14/nzes-app.html +++ b/blog/2017/05/14/nzes-app.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/05/21/nzes-sankey.html b/blog/2017/05/21/nzes-sankey.html index ccf12c1b9..aa4554ebf 100644 --- a/blog/2017/05/21/nzes-sankey.html +++ b/blog/2017/05/21/nzes-sankey.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/06/04/military-gdp.html b/blog/2017/06/04/military-gdp.html index ea67fcd4f..4a35ff7cf 100644 --- a/blog/2017/06/04/military-gdp.html +++ b/blog/2017/06/04/military-gdp.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/06/17/microdata-access.html b/blog/2017/06/17/microdata-access.html index 37e23ceb1..24b361461 100644 --- a/blog/2017/06/17/microdata-access.html +++ b/blog/2017/06/17/microdata-access.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/06/24/oz-polls-statespace.html b/blog/2017/06/24/oz-polls-statespace.html index aa8b0e8a0..f3b032bda 100644 --- a/blog/2017/06/24/oz-polls-statespace.html +++ b/blog/2017/06/24/oz-polls-statespace.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/07/02/family-violence.html b/blog/2017/07/02/family-violence.html index 929767ecd..3f888e06d 100644 --- a/blog/2017/07/02/family-violence.html +++ b/blog/2017/07/02/family-violence.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/07/09/oz-polls-revisited.html b/blog/2017/07/09/oz-polls-revisited.html index cf56ec73f..48bf4eefa 100644 --- a/blog/2017/07/09/oz-polls-revisited.html +++ b/blog/2017/07/09/oz-polls-revisited.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/07/13/voter-turnout.html b/blog/2017/07/13/voter-turnout.html index a25a197a6..b5af35621 100644 --- a/blog/2017/07/13/voter-turnout.html +++ b/blog/2017/07/13/voter-turnout.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/07/22/inter-country-inequality.html b/blog/2017/07/22/inter-country-inequality.html index 7ce9ee1a3..1cca6b137 100644 --- a/blog/2017/07/22/inter-country-inequality.html +++ b/blog/2017/07/22/inter-country-inequality.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/08/05/weighted-gini.html b/blog/2017/08/05/weighted-gini.html index 4b73ad95c..cadb8e97f 100644 --- a/blog/2017/08/05/weighted-gini.html +++ b/blog/2017/08/05/weighted-gini.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/08/19/quantiles-gini.html b/blog/2017/08/19/quantiles-gini.html index 13c366788..2151c8af7 100644 --- a/blog/2017/08/19/quantiles-gini.html +++ b/blog/2017/08/19/quantiles-gini.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/08/20/nzes-so-far.html b/blog/2017/08/20/nzes-so-far.html index 3056d2a2b..883b4a56c 100644 --- a/blog/2017/08/20/nzes-so-far.html +++ b/blog/2017/08/20/nzes-so-far.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/09/09/nzpolls-again.html b/blog/2017/09/09/nzpolls-again.html index 1d8b68db4..d9e9672de 100644 --- a/blog/2017/09/09/nzpolls-again.html +++ b/blog/2017/09/09/nzpolls-again.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/09/09/rmarkdown.html b/blog/2017/09/09/rmarkdown.html index 4db39c11b..754aaa5ef 100644 --- a/blog/2017/09/09/rmarkdown.html +++ b/blog/2017/09/09/rmarkdown.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/09/16/time-varying-house-effects.html b/blog/2017/09/16/time-varying-house-effects.html index b59d9074e..fb183f831 100644 --- a/blog/2017/09/16/time-varying-house-effects.html +++ b/blog/2017/09/16/time-varying-house-effects.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/10/05/nzelect-0-4-0.html b/blog/2017/10/05/nzelect-0-4-0.html index 5b8b16e63..d358ca120 100644 --- a/blog/2017/10/05/nzelect-0-4-0.html +++ b/blog/2017/10/05/nzelect-0-4-0.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/10/07/election-results.html b/blog/2017/10/07/election-results.html index 1306bf5f7..c3df1d0bb 100644 --- a/blog/2017/10/07/election-results.html +++ b/blog/2017/10/07/election-results.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/10/15/traffic-crashes.html b/blog/2017/10/15/traffic-crashes.html index b959855c3..f3ef3342c 100644 --- a/blog/2017/10/15/traffic-crashes.html +++ b/blog/2017/10/15/traffic-crashes.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/11/19/plague-seasonality.html b/blog/2017/11/19/plague-seasonality.html index 308eac0fb..f716bf403 100644 --- a/blog/2017/11/19/plague-seasonality.html +++ b/blog/2017/11/19/plague-seasonality.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2017/12/09/sql-and-r.html b/blog/2017/12/09/sql-and-r.html index 4352f669b..0653bbf05 100644 --- a/blog/2017/12/09/sql-and-r.html +++ b/blog/2017/12/09/sql-and-r.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/01/23/recruiting.html b/blog/2018/01/23/recruiting.html index abfcb2c24..6b3e78772 100644 --- a/blog/2018/01/23/recruiting.html +++ b/blog/2018/01/23/recruiting.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/02/03/ivs.html b/blog/2018/02/03/ivs.html index d8b2e30bc..8a222ffbb 100644 --- a/blog/2018/02/03/ivs.html +++ b/blog/2018/02/03/ivs.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/02/10/ethnicity.html b/blog/2018/02/10/ethnicity.html index cadc42b27..920b390e6 100644 --- a/blog/2018/02/10/ethnicity.html +++ b/blog/2018/02/10/ethnicity.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/02/17/books-2017.html b/blog/2018/02/17/books-2017.html index 0b3872d64..52d45fa9c 100644 --- a/blog/2018/02/17/books-2017.html +++ b/blog/2018/02/17/books-2017.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/02/24/following-followers.html b/blog/2018/02/24/following-followers.html index 0619b48e9..6aeccf6ed 100644 --- a/blog/2018/02/24/following-followers.html +++ b/blog/2018/02/24/following-followers.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/03/20/truncated-poisson.html b/blog/2018/03/20/truncated-poisson.html index e0a7faa14..c324b4bf9 100644 --- a/blog/2018/03/20/truncated-poisson.html +++ b/blog/2018/03/20/truncated-poisson.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/04/01/truncated-negbin-gun-violence.html b/blog/2018/04/01/truncated-negbin-gun-violence.html index 361994d05..580f9d077 100644 --- a/blog/2018/04/01/truncated-negbin-gun-violence.html +++ b/blog/2018/04/01/truncated-negbin-gun-violence.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/04/11/weighted-survey-data-with-power-bi.html b/blog/2018/04/11/weighted-survey-data-with-power-bi.html index f35a19ef3..e9a4e172e 100644 --- a/blog/2018/04/11/weighted-survey-data-with-power-bi.html +++ b/blog/2018/04/11/weighted-survey-data-with-power-bi.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/05/05/survey-books-and-courses.html b/blog/2018/05/05/survey-books-and-courses.html index 6abe7e89e..065d76ed3 100644 --- a/blog/2018/05/05/survey-books-and-courses.html +++ b/blog/2018/05/05/survey-books-and-courses.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/05/13/nz-govt-shinyapps.html b/blog/2018/05/13/nz-govt-shinyapps.html index 29274657b..61742a3a4 100644 --- a/blog/2018/05/13/nz-govt-shinyapps.html +++ b/blog/2018/05/13/nz-govt-shinyapps.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/05/31/life-expectancy.html b/blog/2018/05/31/life-expectancy.html index a8935012d..3cfa1baaf 100644 --- a/blog/2018/05/31/life-expectancy.html +++ b/blog/2018/05/31/life-expectancy.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/06/15/ggseas-and-tcomp-update.html b/blog/2018/06/15/ggseas-and-tcomp-update.html index 43835890f..15d69cc7f 100644 --- a/blog/2018/06/15/ggseas-and-tcomp-update.html +++ b/blog/2018/06/15/ggseas-and-tcomp-update.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/06/26/fertility-rate.html b/blog/2018/06/26/fertility-rate.html index 7e2034669..8ba4a7d53 100644 --- a/blog/2018/06/26/fertility-rate.html +++ b/blog/2018/06/26/fertility-rate.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/07/01/petrol-spend.html b/blog/2018/07/01/petrol-spend.html index 95de8941a..bfa95a71f 100644 --- a/blog/2018/07/01/petrol-spend.html +++ b/blog/2018/07/01/petrol-spend.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/07/07/twitter-monitor.html b/blog/2018/07/07/twitter-monitor.html index 2ce7b1dd6..3631d8a09 100644 --- a/blog/2018/07/07/twitter-monitor.html +++ b/blog/2018/07/07/twitter-monitor.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/08/01/business-expectations.html b/blog/2018/08/01/business-expectations.html index 265155cb9..afe987781 100644 --- a/blog/2018/08/01/business-expectations.html +++ b/blog/2018/08/01/business-expectations.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/08/10/leading-indicators.html b/blog/2018/08/10/leading-indicators.html index 5b99133db..4e2359233 100644 --- a/blog/2018/08/10/leading-indicators.html +++ b/blog/2018/08/10/leading-indicators.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/08/14/fuel-prices.html b/blog/2018/08/14/fuel-prices.html index dced636c0..3b9ee4cce 100644 --- a/blog/2018/08/14/fuel-prices.html +++ b/blog/2018/08/14/fuel-prices.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/08/17/risk-ratios.html b/blog/2018/08/17/risk-ratios.html index 4d7e09447..4f17d6fb7 100644 --- a/blog/2018/08/17/risk-ratios.html +++ b/blog/2018/08/17/risk-ratios.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/08/24/simulating-survey.html b/blog/2018/08/24/simulating-survey.html index c7da4fb50..7cc18557e 100644 --- a/blog/2018/08/24/simulating-survey.html +++ b/blog/2018/08/24/simulating-survey.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/08/31/melbourne-rents.html b/blog/2018/08/31/melbourne-rents.html index f7168e5be..5d692a90f 100644 --- a/blog/2018/08/31/melbourne-rents.html +++ b/blog/2018/08/31/melbourne-rents.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/09/26/sri-lanka-arrivals.html b/blog/2018/09/26/sri-lanka-arrivals.html index e3bd23d24..8ddd01600 100644 --- a/blog/2018/09/26/sri-lanka-arrivals.html +++ b/blog/2018/09/26/sri-lanka-arrivals.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/10/07/inequality-groups.html b/blog/2018/10/07/inequality-groups.html index cc908919e..f4bcb7d0f 100644 --- a/blog/2018/10/07/inequality-groups.html +++ b/blog/2018/10/07/inequality-groups.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/10/27/dice-games.html b/blog/2018/10/27/dice-games.html index dbf3e6909..ed1e76ca0 100644 --- a/blog/2018/10/27/dice-games.html +++ b/blog/2018/10/27/dice-games.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/11/06/suppressed-data.html b/blog/2018/11/06/suppressed-data.html index 1291af286..0eeb50c43 100644 --- a/blog/2018/11/06/suppressed-data.html +++ b/blog/2018/11/06/suppressed-data.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/11/18/suppressed-data-2.html b/blog/2018/11/18/suppressed-data-2.html index 5848a80a2..810e36fba 100644 --- a/blog/2018/11/18/suppressed-data-2.html +++ b/blog/2018/11/18/suppressed-data-2.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/11/24/counting-digits.html b/blog/2018/11/24/counting-digits.html index ce374f20a..d66b930ff 100644 --- a/blog/2018/11/24/counting-digits.html +++ b/blog/2018/11/24/counting-digits.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/12/01/number-births.html b/blog/2018/12/01/number-births.html index 042654afd..b0f01211e 100644 --- a/blog/2018/12/01/number-births.html +++ b/blog/2018/12/01/number-births.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2018/12/23/persian-monarchs.html b/blog/2018/12/23/persian-monarchs.html index c933f31cf..f0c25856a 100644 --- a/blog/2018/12/23/persian-monarchs.html +++ b/blog/2018/12/23/persian-monarchs.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/01/26/world-agreeing.html b/blog/2019/01/26/world-agreeing.html index df58e3cef..9b1b57a5d 100644 --- a/blog/2019/01/26/world-agreeing.html +++ b/blog/2019/01/26/world-agreeing.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/02/20/voting-seasonality.html b/blog/2019/02/20/voting-seasonality.html index 07c9f4665..b52515685 100644 --- a/blog/2019/02/20/voting-seasonality.html +++ b/blog/2019/02/20/voting-seasonality.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/03/02/aust-election-1.html b/blog/2019/03/02/aust-election-1.html index e7d5fbfef..a8b61ce86 100644 --- a/blog/2019/03/02/aust-election-1.html +++ b/blog/2019/03/02/aust-election-1.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/03/11/aust-election-2-swings.html b/blog/2019/03/11/aust-election-2-swings.html index 798188967..df3ed0c76 100644 --- a/blog/2019/03/11/aust-election-2-swings.html +++ b/blog/2019/03/11/aust-election-2-swings.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/03/23/afl-elo.html b/blog/2019/03/23/afl-elo.html index 945e34866..a69361eb7 100644 --- a/blog/2019/03/23/afl-elo.html +++ b/blog/2019/03/23/afl-elo.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/03/30/afl-elo-adjusted.html b/blog/2019/03/30/afl-elo-adjusted.html index 17ba40546..9331731b6 100644 --- a/blog/2019/03/30/afl-elo-adjusted.html +++ b/blog/2019/03/30/afl-elo-adjusted.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/03/31/fed-election-page.html b/blog/2019/03/31/fed-election-page.html index 91c799045..96e5d0f44 100644 --- a/blog/2019/03/31/fed-election-page.html +++ b/blog/2019/03/31/fed-election-page.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/04/07/fonts-and-stuff.html b/blog/2019/04/07/fonts-and-stuff.html index 018250c7e..b3f4c1f0e 100644 --- a/blog/2019/04/07/fonts-and-stuff.html +++ b/blog/2019/04/07/fonts-and-stuff.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/04/20/yield-curve.html b/blog/2019/04/20/yield-curve.html index a6a3179db..60fc84917 100644 --- a/blog/2019/04/20/yield-curve.html +++ b/blog/2019/04/20/yield-curve.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/04/22/AES-intro.html b/blog/2019/04/22/AES-intro.html index dadd01989..0eeb66e39 100644 --- a/blog/2019/04/22/AES-intro.html +++ b/blog/2019/04/22/AES-intro.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/05/15/polls-misc.html b/blog/2019/05/15/polls-misc.html index fd06889fd..f9ee1b62e 100644 --- a/blog/2019/05/15/polls-misc.html +++ b/blog/2019/05/15/polls-misc.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/05/19/polls-v-results.html b/blog/2019/05/19/polls-v-results.html index 6c2027921..6ed80d934 100644 --- a/blog/2019/05/19/polls-v-results.html +++ b/blog/2019/05/19/polls-v-results.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/06/28/too-important-for-data-scientists.html b/blog/2019/06/28/too-important-for-data-scientists.html index 698ae5c17..e353e3974 100644 --- a/blog/2019/06/28/too-important-for-data-scientists.html +++ b/blog/2019/06/28/too-important-for-data-scientists.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/07/20/time-series-cv.html b/blog/2019/07/20/time-series-cv.html index 4fdbd0e02..1ae65a06e 100644 --- a/blog/2019/07/20/time-series-cv.html +++ b/blog/2019/07/20/time-series-cv.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/07/28/unemployment-forecasts.html b/blog/2019/07/28/unemployment-forecasts.html index 1eefd5b8f..e1d3f86b4 100644 --- a/blog/2019/07/28/unemployment-forecasts.html +++ b/blog/2019/07/28/unemployment-forecasts.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/08/25/fitting-bins.html b/blog/2019/08/25/fitting-bins.html index fc2802b48..174325672 100644 --- a/blog/2019/08/25/fitting-bins.html +++ b/blog/2019/08/25/fitting-bins.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/09/07/mass-shootings-oz.html b/blog/2019/09/07/mass-shootings-oz.html index df5c2c35a..77d199e05 100644 --- a/blog/2019/09/07/mass-shootings-oz.html +++ b/blog/2019/09/07/mass-shootings-oz.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/11/03/re-creating-microdata.html b/blog/2019/11/03/re-creating-microdata.html index ba84cc37c..c753fe56b 100644 --- a/blog/2019/11/03/re-creating-microdata.html +++ b/blog/2019/11/03/re-creating-microdata.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/11/09/sampling-from-urns.html b/blog/2019/11/09/sampling-from-urns.html index e68f87b37..d3b3623db 100644 --- a/blog/2019/11/09/sampling-from-urns.html +++ b/blog/2019/11/09/sampling-from-urns.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/11/24/cost-benefit-analysis.html b/blog/2019/11/24/cost-benefit-analysis.html index 6aa292f46..e9d1e0a99 100644 --- a/blog/2019/11/24/cost-benefit-analysis.html +++ b/blog/2019/11/24/cost-benefit-analysis.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2019/12/22/nyc-taxis-sql.html b/blog/2019/12/22/nyc-taxis-sql.html index 21c94efcd..c82a5baaa 100644 --- a/blog/2019/12/22/nyc-taxis-sql.html +++ b/blog/2019/12/22/nyc-taxis-sql.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/01/26/tennis-seeding.html b/blog/2020/01/26/tennis-seeding.html index d0c107ee5..3be0e1468 100644 --- a/blog/2020/01/26/tennis-seeding.html +++ b/blog/2020/01/26/tennis-seeding.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/02/01/tennis-carroll.html b/blog/2020/02/01/tennis-carroll.html index 35d8a2851..4e2d9f57e 100644 --- a/blog/2020/02/01/tennis-carroll.html +++ b/blog/2020/02/01/tennis-carroll.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/02/23/bmi.html b/blog/2020/02/23/bmi.html index bd08c8b70..867fc26a9 100644 --- a/blog/2020/02/23/bmi.html +++ b/blog/2020/02/23/bmi.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/03/01/bmi-2.html b/blog/2020/03/01/bmi-2.html index 4c35bedc4..5438be615 100644 --- a/blog/2020/03/01/bmi-2.html +++ b/blog/2020/03/01/bmi-2.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/03/07/nzes-app.html b/blog/2020/03/07/nzes-app.html index a70f45fef..ebe99d537 100644 --- a/blog/2020/03/07/nzes-app.html +++ b/blog/2020/03/07/nzes-app.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/03/17/covid19-cfr.html b/blog/2020/03/17/covid19-cfr.html index 2c225c2c1..2e261adb4 100644 --- a/blog/2020/03/17/covid19-cfr.html +++ b/blog/2020/03/17/covid19-cfr.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/03/21/covid19-cfr-demographics.html b/blog/2020/03/21/covid19-cfr-demographics.html index 5a40f1b86..c21ba602b 100644 --- a/blog/2020/03/21/covid19-cfr-demographics.html +++ b/blog/2020/03/21/covid19-cfr-demographics.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/04/06/crazy-fox-y-axis.html b/blog/2020/04/06/crazy-fox-y-axis.html index 9980343a5..6b0944872 100644 --- a/blog/2020/04/06/crazy-fox-y-axis.html +++ b/blog/2020/04/06/crazy-fox-y-axis.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/04/18/pred-interval-from-log-linear.html b/blog/2020/04/18/pred-interval-from-log-linear.html index a7d81293e..74d570b43 100644 --- a/blog/2020/04/18/pred-interval-from-log-linear.html +++ b/blog/2020/04/18/pred-interval-from-log-linear.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/05/09/covid-population-incidence.html b/blog/2020/05/09/covid-population-incidence.html index 6f94fca31..2499dcef2 100644 --- a/blog/2020/05/09/covid-population-incidence.html +++ b/blog/2020/05/09/covid-population-incidence.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/05/17/covid-texas-incidence.html b/blog/2020/05/17/covid-texas-incidence.html index a03d5806e..f0c79568e 100644 --- a/blog/2020/05/17/covid-texas-incidence.html +++ b/blog/2020/05/17/covid-texas-incidence.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/05/23/ordering-in-bar-charts.html b/blog/2020/05/23/ordering-in-bar-charts.html index 83375e6a3..42e9d4c6f 100644 --- a/blog/2020/05/23/ordering-in-bar-charts.html +++ b/blog/2020/05/23/ordering-in-bar-charts.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/05/30/implausible-health-data-firm.html b/blog/2020/05/30/implausible-health-data-firm.html index 82fd45ad2..4a4f13659 100644 --- a/blog/2020/05/30/implausible-health-data-firm.html +++ b/blog/2020/05/30/implausible-health-data-firm.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/06/06/nz-2020-forecasts.html b/blog/2020/06/06/nz-2020-forecasts.html index bc14c37b5..c7386ef42 100644 --- a/blog/2020/06/06/nz-2020-forecasts.html +++ b/blog/2020/06/06/nz-2020-forecasts.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/06/13/publication-reform.html b/blog/2020/06/13/publication-reform.html index eea3e8143..f94d3a230 100644 --- a/blog/2020/06/13/publication-reform.html +++ b/blog/2020/06/13/publication-reform.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/07/18/victoria-r-convolution.html b/blog/2020/07/18/victoria-r-convolution.html index 5bedaf9e5..2a2702ef9 100644 --- a/blog/2020/07/18/victoria-r-convolution.html +++ b/blog/2020/07/18/victoria-r-convolution.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/08/02/occupation-growth.html b/blog/2020/08/02/occupation-growth.html index 80fbdc9a2..c292f176f 100644 --- a/blog/2020/08/02/occupation-growth.html +++ b/blog/2020/08/02/occupation-growth.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/08/09/country-regression.html b/blog/2020/08/09/country-regression.html index 6aff92f56..2c64e5f5f 100644 --- a/blog/2020/08/09/country-regression.html +++ b/blog/2020/08/09/country-regression.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/08/23/highered-ols.html b/blog/2020/08/23/highered-ols.html index 00ff7d05e..cc47beac9 100644 --- a/blog/2020/08/23/highered-ols.html +++ b/blog/2020/08/23/highered-ols.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/08/29/reff-cv.html b/blog/2020/08/29/reff-cv.html index a6418b8c1..a0e3f7629 100644 --- a/blog/2020/08/29/reff-cv.html +++ b/blog/2020/08/29/reff-cv.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/09/06/mixture-distributions.html b/blog/2020/09/06/mixture-distributions.html index a54977df2..4f2a3e5b8 100644 --- a/blog/2020/09/06/mixture-distributions.html +++ b/blog/2020/09/06/mixture-distributions.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/09/13/processing-language.html b/blog/2020/09/13/processing-language.html index 9525b3bd7..f56bcd8d9 100644 --- a/blog/2020/09/13/processing-language.html +++ b/blog/2020/09/13/processing-language.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/09/26/nzes-issues.html b/blog/2020/09/26/nzes-issues.html index b3e049ca0..5ac3a9a2f 100644 --- a/blog/2020/09/26/nzes-issues.html +++ b/blog/2020/09/26/nzes-issues.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/10/04/covid-symptom-challenge.html b/blog/2020/10/04/covid-symptom-challenge.html index 9a9f9863f..62a83f514 100644 --- a/blog/2020/10/04/covid-symptom-challenge.html +++ b/blog/2020/10/04/covid-symptom-challenge.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/10/11/hamlet.html b/blog/2020/10/11/hamlet.html index 8e19f1141..afebf09a3 100644 --- a/blog/2020/10/11/hamlet.html +++ b/blog/2020/10/11/hamlet.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/11/14/aid-attitudes.html b/blog/2020/11/14/aid-attitudes.html index 297a4aae9..604c248e9 100644 --- a/blog/2020/11/14/aid-attitudes.html +++ b/blog/2020/11/14/aid-attitudes.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/12/05/wwi-ships.html b/blog/2020/12/05/wwi-ships.html index 2f3929537..c7f37136b 100644 --- a/blog/2020/12/05/wwi-ships.html +++ b/blog/2020/12/05/wwi-ships.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2020/12/21/rmit-dashboard.html b/blog/2020/12/21/rmit-dashboard.html index 1714db17d..cc1a48bd7 100644 --- a/blog/2020/12/21/rmit-dashboard.html +++ b/blog/2020/12/21/rmit-dashboard.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2021/02/05/stock-visualizations.html b/blog/2021/02/05/stock-visualizations.html index 2c792503a..abe9a28dc 100644 --- a/blog/2021/02/05/stock-visualizations.html +++ b/blog/2021/02/05/stock-visualizations.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2021/02/14/stock-database.html b/blog/2021/02/14/stock-database.html index 680606658..9560e1d12 100644 --- a/blog/2021/02/14/stock-database.html +++ b/blog/2021/02/14/stock-database.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2021/06/14/pc-penguins.html b/blog/2021/06/14/pc-penguins.html index 8704ac6dd..6f84244b3 100644 --- a/blog/2021/06/14/pc-penguins.html +++ b/blog/2021/06/14/pc-penguins.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2022/03/26/supreme-court-nominations.html b/blog/2022/03/26/supreme-court-nominations.html index 598253e6d..8bc027d01 100644 --- a/blog/2022/03/26/supreme-court-nominations.html +++ b/blog/2022/03/26/supreme-court-nominations.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2022/08/14/pacific-population-pyramids.html b/blog/2022/08/14/pacific-population-pyramids.html index 42d33d65c..f991f76df 100644 --- a/blog/2022/08/14/pacific-population-pyramids.html +++ b/blog/2022/08/14/pacific-population-pyramids.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2022/10/13/pacific-map.html b/blog/2022/10/13/pacific-map.html index 65bcb7e81..582353ca6 100644 --- a/blog/2022/10/13/pacific-map.html +++ b/blog/2022/10/13/pacific-map.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2023/02/25/ilr.html b/blog/2023/02/25/ilr.html index 5db07a531..ac0bb5d2f 100644 --- a/blog/2023/02/25/ilr.html +++ b/blog/2023/02/25/ilr.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2023/05/26/women-parl-map.html b/blog/2023/05/26/women-parl-map.html index 7b933b7ed..55b8dfc8d 100644 --- a/blog/2023/05/26/women-parl-map.html +++ b/blog/2023/05/26/women-parl-map.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2023/05/28/covid-vaccinations.html b/blog/2023/05/28/covid-vaccinations.html index 15fb4591f..007847d5d 100644 --- a/blog/2023/05/28/covid-vaccinations.html +++ b/blog/2023/05/28/covid-vaccinations.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2023/06/04/causality-sims.html b/blog/2023/06/04/causality-sims.html index f09890311..9f7a7ecf3 100644 --- a/blog/2023/06/04/causality-sims.html +++ b/blog/2023/06/04/causality-sims.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2023/06/17/pacific-map-in-package.html b/blog/2023/06/17/pacific-map-in-package.html index cfb30595a..c3df324c0 100644 --- a/blog/2023/06/17/pacific-map-in-package.html +++ b/blog/2023/06/17/pacific-map-in-package.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2023/06/24/weighted-percentiles.html b/blog/2023/06/24/weighted-percentiles.html index d5db0c9a5..e72c3c54f 100644 --- a/blog/2023/06/24/weighted-percentiles.html +++ b/blog/2023/06/24/weighted-percentiles.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2023/07/30/log-transforms.html b/blog/2023/07/30/log-transforms.html index 7170c7069..a86b8aa02 100644 --- a/blog/2023/07/30/log-transforms.html +++ b/blog/2023/07/30/log-transforms.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2023/08/06/model-life-tables.html b/blog/2023/08/06/model-life-tables.html index 2dbbc9271..fa2f9b4b8 100644 --- a/blog/2023/08/06/model-life-tables.html +++ b/blog/2023/08/06/model-life-tables.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2023/09/23/circle.html b/blog/2023/09/23/circle.html index 3c750554c..6af988a3c 100644 --- a/blog/2023/09/23/circle.html +++ b/blog/2023/09/23/circle.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2023/09/30/mvi.html b/blog/2023/09/30/mvi.html index 4e68c6659..b3e274dcf 100644 --- a/blog/2023/09/30/mvi.html +++ b/blog/2023/09/30/mvi.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2023/10/17/mvi-and-v20.html b/blog/2023/10/17/mvi-and-v20.html index 8d13ecbcf..52f8a05c3 100644 --- a/blog/2023/10/17/mvi-and-v20.html +++ b/blog/2023/10/17/mvi-and-v20.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2024/05/05/pop-projections.html b/blog/2024/05/05/pop-projections.html index 3db8172e0..8bdbc1f94 100644 --- a/blog/2024/05/05/pop-projections.html +++ b/blog/2024/05/05/pop-projections.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2024/07/27/aging-pacific.html b/blog/2024/07/27/aging-pacific.html index 8613b54dc..fc0e16d62 100644 --- a/blog/2024/07/27/aging-pacific.html +++ b/blog/2024/07/27/aging-pacific.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2024/08/10/snakes-and-ladders.html b/blog/2024/08/10/snakes-and-ladders.html index f8c0b6f60..4946d9d6f 100644 --- a/blog/2024/08/10/snakes-and-ladders.html +++ b/blog/2024/08/10/snakes-and-ladders.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/blog/2024/08/20/symmetry.html b/blog/2024/08/20/symmetry.html index 712c36cb5..b99846cf9 100644 --- a/blog/2024/08/20/symmetry.html +++ b/blog/2024/08/20/symmetry.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • @@ -306,6 +306,12 @@

    At a glance:

    + + +

    Next post →

    +

    + + diff --git a/blog/2024/08/24/polar-maps.html b/blog/2024/08/24/polar-maps.html new file mode 100644 index 000000000..a2ad3d980 --- /dev/null +++ b/blog/2024/08/24/polar-maps.html @@ -0,0 +1,434 @@ + + + + + + + + Polar-centred maps + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    + +
    +
    +

    Polar-centred maps

    +
    +
    + + + +
    +

    At a glance:

    +

    I draw maps of the largest settlements closest to the north pole and to the south pole, based on an idea by 'Brilliant Maps'.

    +

    24 Aug 2024

    +
    +
    + + +
    + +
    + +

    I stumbled across this page by Brilliant Maps showing settlements with no larger settlement to their north. The author noted that Helsinki was omitted by error. I wanted to address that error, and as a resident of the southern half of the globe myself, to produce a similar map with relation to the south pole.

    + +

    First there’s a matter of sourcing data on cities’ and towns’ populations. There are several possible sources but I chose this dataset on opendatasoft, of all cities with a population > 1000. This doesn’t go to the tiny settlements in the original Brilliant Maps image, but it’s good enough for me.

    + +

    Here’s my prep stage, downloading that data and getting a few things ready for later use in spatial transformations (coordinate reference systems that are centred on the norht and south poles) and plot polishing (abbreviating numbers, fonts, etc).

    + +
    #-----------------prep----------------
    +library(tidyverse)
    +library(sf)
    +library(extrafont)
    +library(rnaturalearth)
    +library(ggforce) # for geom_circle
    +library(glue)
    +
    +
    +# Function for summarising numbers
    +nf <- function(x){
    +  y <- case_when(
    +    x > 1e6 ~ glue::glue("{round(x / 1e6, 1)}m"),
    +    x > 1e4 ~ glue::glue("{round(x / 1e3, 0)}k"),
    +    TRUE ~ scales::comma(signif(x, 2))
    +  )
    +  return(y)
    +}
    +
    +# Font to use
    +ff <- "Roboto"
    +
    +#-------------------download cities data-------------
    +
    +# obtained polar-centred coordinate reference systems (CRS) for later use, from 
    +# https://spatialreference.org/ref/epsg/?search=polar
    +south_crs <- st_crs(3031)
    +north_crs <- st_crs(3411)
    +
    +# 27MB download:
    +if(!file.exists("cities.txt")){
    +  download.file("https://public.opendatasoft.com/api/explore/v2.1/catalog/datasets/geonames-all-cities-with-a-population-1000/exports/csv?lang=en&timezone=UTC&use_labels=true&delimiter=%3B",
    +                destfile = "cities.txt")
    +}
    +
    +if(!exists("cities")){
    +  cities <- read_delim("cities.txt", delim = ";")
    +}
    +
    +d <- cities |>
    +  separate(Coordinates, sep = ",", into = c("lat", "long")) |>
    +  mutate(lat = as.numeric(str_squish(lat)),
    +         long = as.numeric(str_squish(long))) |>
    +  select(Name, `Country name EN`, `Country Code`, Population, lat, long) 
    + +

    Next is the job of identifying cities that are bigger than any others to their north. This was a bit of a fiddly problem which I addressed by sorting all the cities by distrance from the north pole (highest latitude first), making a new column which is the cumulative maximum population so far, and retaining only those cities that are equal to or higher than that maximum population. This gets me a list of just 20 cities.

    + +

    I then turn them into simple features objects with geometry (based on the latitude and longitude), and transform them to coordinates that will represent the world flattened out centred around the north pole, using the coordinate reference system I calculated before.

    + +

    Then, I source country boundaries from the invaluable Natural Earth repository of map data (accessed via the rnaturalearth R package), and give them the same transformation, and turn both data sets into a single map.

    + +

    Here’s the code doing those things:

    + +
    #-----------------most north-------------
    +
    +most_north <- d |>
    +  arrange(desc(lat)) |>
    +  mutate(max_pop = cummax(Population)) |>
    +  filter(Population >= max_pop) |>
    +  st_as_sf(coords = c("long", "lat"), remove = FALSE, crs = st_crs("WGS84"))
    +
    +most_north <- st_transform(most_north, crs = north_crs)
    +most_north <- cbind(most_north, st_coordinates(most_north))
    +
    +# borders of countries north of Shanghai, from Natural Earth
    +north_world <- ne_countries() |>
    +  filter(label_y > 30) |>
    +  st_transform(crs = north_crs)
    +
    +m1 <- most_north |>
    +  mutate(zero = 0,
    +         radius = sqrt(X ^ 2 + Y ^ 2),
    +         label = glue("{Name}, {nf(Population)}")) |>
    +  ggplot() +
    +  # draw the sea as background:
    +  geom_circle(data = tibble(x = 0, r = 8.5e6),
    +              aes(x0 = x, y0 = x, r = r), fill = "steelblue", colour = NA) +
    +  geom_sf(data = north_world, fill = "grey90", colour = NA) +
    +  geom_circle(aes(x0 = zero, y0 = zero, r = radius, colour = radius)) +
    +  geom_sf() +
    +  geom_text_repel(aes(x = X, y = Y, label = label), family = ff, seed = 123, size = 3) +
    +  # these limits are in the transformed coordinates, were chosen by hand / trial and error:
    +  coord_sf(ylim = c(-3000000  , 7000000), lims_method = "orthogonal",
    +           xlim = c(-6000000, 6000000   )) +
    +  theme_void(base_family = ff) +
    +  scale_colour_viridis_c(direction = -1) +
    +  labs(title = "Settlements that have no larger settlement further north of them") +
    +  theme(legend.position = "none")
    + +

    And that results in this map:

    + + + +

    It’s a little different from the original. As expected, I am missing settlements with less than 1,000 people, and I have correctly inserted Helsinki. But there are other differences which come from ambiguities in the population size of cities. For example, if you google “Tokyo 37 million” you are prompted by Google with the frequently searched question “Is Tokyo’s population 14 or 37 million?”. It turns out the “Tokyo Metropolis” is 14m and “Tokyo metropolitan area” is 37 million.

    + +

    Obviously these are numbers that depend on decisions about boundaries, which as soon as you start thinking them through are revealed as being at least to a degree arbitrary. My data source opted on the 14m side for Tokyo. New York is also defined as a smaller area than in the Brilliant Maps original. I’m not particularly concerned with (or qualified to talk about) these urban definitional matters, so I’m just going to stick to the definitions used by my data source.

    + +

    My first effort at drawing these maps did the transformation on the fly using coord_map(projection='orthographic') which worked ok, although it was harder (not impossible) to colour in the sea, and the constant-latitude circles I tried to draw for each city were crude and polygons. But when I tried to do the map centred on the south pole this method tripped up, and noting that coord_map() is now deprecated I went the route of doing the transformation explicitly and in advance first. This gave a nicer result, particularly for the circles, and control over the bounding box of the map. So it was worth the half hour or so of cursing as I worked to understand the method. R’s power in geocomputation is growing so fast that anything on the web older than a couple of years is likely to be out of date - not necessarily wrong, but likely to miss a simpler and more powerful way of doing what you are trying.

    + +

    Anyway, the “explicit transformation done before drawing the map” method worked well for any arbitrary projection, and here is the south pole version:

    + +
    #------------most south---------------
    +
    +most_south <- d |>
    +  arrange(lat) |>
    +  mutate(max_pop = cummax(Population)) |>
    +  filter(Population >= max_pop) |>
    +  st_as_sf(coords = c("long", "lat"), remove = FALSE, crs = st_crs("WGS84"))
    +
    +most_south <- st_transform(most_south, crs = south_crs)
    +most_south <- cbind(most_south, st_coordinates(most_south))
    +
    +
    +# borders of countries south of Shanghai
    +south_world <- ne_countries() |>
    +  filter(label_y < 35) |>
    +  st_transform(crs = south_crs)
    +
    +m2 <- most_south |>
    +  mutate(zero = 0,
    +         radius = sqrt(X ^ 2 + Y ^ 2),
    +         label = glue("{Name}, {nf(Population)}")) |>
    +  ggplot() +
    +  annotate("rect", xmin = -Inf, xmax = Inf, ymin = -Inf, ymax = Inf, fill = "steelblue") +
    +  geom_sf(data = south_world, fill = "grey90", colour = NA) +
    +  geom_circle(aes(x0 = zero, y0 = zero, r = radius, colour = radius)) +
    +  geom_sf() +
    +  geom_text_repel(aes(x = X, y = Y, label = label), family = ff, seed = 123, size = 3) +
    +  # these limits are in the transformed coordinates, were chosen by hand / trial and error:
    +  coord_sf(ylim = c(-11000000  , 11000000), lims_method = "orthogonal",
    +           xlim = c(-7000000, 20000000   )) +
    +  theme_void(base_family = ff) +
    +  scale_colour_viridis_c(direction = -1) +
    +  labs(title = "Settlements that have no larger settlement further south of them") +
    +  theme(legend.position = "none")
    + +

    …which gets me this map. Nice.

    + + + +

    This map goes well over the equator and in some ways gives a distorted view of the world; the sphere has been badly flattened and warped to show Shanghai and the south pole on the same rectangle. But I’m not going to worry about it for now.

    + +

    OK that’s all folks.

    + + + +
    +
    + +
    +
    +
    + + + +
    + + + +

    ← Previous post

    +

    + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + + + + + + + + + \ No newline at end of file diff --git a/blog/index.html b/blog/index.html index 4eafc56e2..ea8a6b169 100644 --- a/blog/index.html +++ b/blog/index.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • @@ -156,6 +156,8 @@

    Most recent at the top

  • showcase
  • @@ -462,6 +462,9 @@

    Distributions

  • showcase
  • diff --git a/blog/surveys.html b/blog/surveys.html index 37ea4acc2..5a230b46a 100644 --- a/blog/surveys.html +++ b/blog/surveys.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • @@ -177,6 +177,9 @@ + + + diff --git a/blog/voting.html b/blog/voting.html index 7b3bcada7..344d0b07c 100644 --- a/blog/voting.html +++ b/blog/voting.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • @@ -238,6 +238,9 @@

    Blog posts

    + + + diff --git a/covid-tracking/index.html b/covid-tracking/index.html index 36c05a707..5f749bdc5 100644 --- a/covid-tracking/index.html +++ b/covid-tracking/index.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/elections/changelog.html b/elections/changelog.html index 65b67cc76..f51c86488 100644 --- a/elections/changelog.html +++ b/elections/changelog.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/elections/combined.html b/elections/combined.html index 31c25cfe6..2b4f413d9 100644 --- a/elections/combined.html +++ b/elections/combined.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/elections/elections.html b/elections/elections.html index 32486c031..224741522 100644 --- a/elections/elections.html +++ b/elections/elections.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/elections/index.html b/elections/index.html index 32bf54c5f..6592f4a40 100644 --- a/elections/index.html +++ b/elections/index.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/elections/nz-2017/changelog.html b/elections/nz-2017/changelog.html index 27541b635..d4be0fc48 100644 --- a/elections/nz-2017/changelog.html +++ b/elections/nz-2017/changelog.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/elections/nz-2017/combined.html b/elections/nz-2017/combined.html index 53ec6adea..b4869a9a0 100644 --- a/elections/nz-2017/combined.html +++ b/elections/nz-2017/combined.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/elections/nz-2017/elections.html b/elections/nz-2017/elections.html index 19fc558f8..3f133f3c5 100644 --- a/elections/nz-2017/elections.html +++ b/elections/nz-2017/elections.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/elections/nz-2017/state-space.html b/elections/nz-2017/state-space.html index 4c8daf71d..fd2c2794e 100644 --- a/elections/nz-2017/state-space.html +++ b/elections/nz-2017/state-space.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/elections/nz-2020/index.html b/elections/nz-2020/index.html index 287ef4133..85931111d 100644 --- a/elections/nz-2020/index.html +++ b/elections/nz-2020/index.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/elections/oz-2019/index.html b/elections/oz-2019/index.html index 9f343abc2..fce325a00 100644 --- a/elections/oz-2019/index.html +++ b/elections/oz-2019/index.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/elections/state-space.html b/elections/state-space.html index 56d1a2fe1..bbb14a93e 100644 --- a/elections/state-space.html +++ b/elections/state-space.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/feed.r.xml b/feed.r.xml index 19feeabec..02a3c2a66 100644 --- a/feed.r.xml +++ b/feed.r.xml @@ -6,10 +6,167 @@ https://freerangestats.info + + Polar-centred maps by @ellis2013nz + <p>I stumbled across <a href="https://brilliantmaps.com/no-settlement-further-north/?fbclid=IwY2xjawE2h7NleHRuA2FlbQIxMAABHdcWMCUYztUNNvniU4XJvlfREJo24ulRyp4qks8c_cWKOpwspzjYCXa4uQ_aem_hy058OxYQsPH_Ay_SX8t5Q">this page by Brilliant Maps</a> showing settlements with no larger settlement to their north. The author noted that Helsinki was omitted by error. I wanted to address that error, and as a resident of the southern half of the globe myself, to produce a similar map with relation to the south pole.</p> + +<p>First there’s a matter of sourcing data on cities’ and towns’ populations. There are several possible sources but I chose <a href="https://public.opendatasoft.com/explore/dataset/geonames-all-cities-with-a-population-1000/table/?disjunctive.cou_name_en&amp;sort=name">this dataset on opendatasoft, of all cities with a population &gt; 1000</a>. This doesn’t go to the tiny settlements in the original Brilliant Maps image, but it’s good enough for me.</p> + +<p>Here’s my prep stage, downloading that data and getting a few things ready for later use in spatial transformations (coordinate reference systems that are centred on the norht and south poles) and plot polishing (abbreviating numbers, fonts, etc).</p> + +<figure class="highlight"><pre><code class="language-r" data-lang="r"><span class="c1">#-----------------prep----------------</span><span class="w"> +</span><span class="n">library</span><span class="p">(</span><span class="n">tidyverse</span><span class="p">)</span><span class="w"> +</span><span class="n">library</span><span class="p">(</span><span class="n">sf</span><span class="p">)</span><span class="w"> +</span><span class="n">library</span><span class="p">(</span><span class="n">extrafont</span><span class="p">)</span><span class="w"> +</span><span class="n">library</span><span class="p">(</span><span class="n">rnaturalearth</span><span class="p">)</span><span class="w"> +</span><span class="n">library</span><span class="p">(</span><span class="n">ggforce</span><span class="p">)</span><span class="w"> </span><span class="c1"># for geom_circle</span><span class="w"> +</span><span class="n">library</span><span class="p">(</span><span class="n">glue</span><span class="p">)</span><span class="w"> + + +</span><span class="c1"># Function for summarising numbers</span><span class="w"> +</span><span class="n">nf</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="k">function</span><span class="p">(</span><span class="n">x</span><span class="p">){</span><span class="w"> + </span><span class="n">y</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">case_when</span><span class="p">(</span><span class="w"> + </span><span class="n">x</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="m">1e6</span><span class="w"> </span><span class="o">~</span><span class="w"> </span><span class="n">glue</span><span class="o">::</span><span class="n">glue</span><span class="p">(</span><span class="s2">"{round(x / 1e6, 1)}m"</span><span class="p">),</span><span class="w"> + </span><span class="n">x</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="m">1e4</span><span class="w"> </span><span class="o">~</span><span class="w"> </span><span class="n">glue</span><span class="o">::</span><span class="n">glue</span><span class="p">(</span><span class="s2">"{round(x / 1e3, 0)}k"</span><span class="p">),</span><span class="w"> + </span><span class="kc">TRUE</span><span class="w"> </span><span class="o">~</span><span class="w"> </span><span class="n">scales</span><span class="o">::</span><span class="n">comma</span><span class="p">(</span><span class="nf">signif</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="m">2</span><span class="p">))</span><span class="w"> + </span><span class="p">)</span><span class="w"> + </span><span class="nf">return</span><span class="p">(</span><span class="n">y</span><span class="p">)</span><span class="w"> +</span><span class="p">}</span><span class="w"> + +</span><span class="c1"># Font to use</span><span class="w"> +</span><span class="n">ff</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="s2">"Roboto"</span><span class="w"> + +</span><span class="c1">#-------------------download cities data-------------</span><span class="w"> + +</span><span class="c1"># obtained polar-centred coordinate reference systems (CRS) for later use, from </span><span class="w"> +</span><span class="c1"># https://spatialreference.org/ref/epsg/?search=polar</span><span class="w"> +</span><span class="n">south_crs</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">st_crs</span><span class="p">(</span><span class="m">3031</span><span class="p">)</span><span class="w"> +</span><span class="n">north_crs</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">st_crs</span><span class="p">(</span><span class="m">3411</span><span class="p">)</span><span class="w"> + +</span><span class="c1"># 27MB download:</span><span class="w"> +</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">file.exists</span><span class="p">(</span><span class="s2">"cities.txt"</span><span class="p">)){</span><span class="w"> + </span><span class="n">download.file</span><span class="p">(</span><span class="s2">"https://public.opendatasoft.com/api/explore/v2.1/catalog/datasets/geonames-all-cities-with-a-population-1000/exports/csv?lang=en&amp;timezone=UTC&amp;use_labels=true&amp;delimiter=%3B"</span><span class="p">,</span><span class="w"> + </span><span class="n">destfile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"cities.txt"</span><span class="p">)</span><span class="w"> +</span><span class="p">}</span><span class="w"> + +</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">exists</span><span class="p">(</span><span class="s2">"cities"</span><span class="p">)){</span><span class="w"> + </span><span class="n">cities</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">read_delim</span><span class="p">(</span><span class="s2">"cities.txt"</span><span class="p">,</span><span class="w"> </span><span class="n">delim</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">";"</span><span class="p">)</span><span class="w"> +</span><span class="p">}</span><span class="w"> + +</span><span class="n">d</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">cities</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">separate</span><span class="p">(</span><span class="n">Coordinates</span><span class="p">,</span><span class="w"> </span><span class="n">sep</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">","</span><span class="p">,</span><span class="w"> </span><span class="n">into</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="s2">"lat"</span><span class="p">,</span><span class="w"> </span><span class="s2">"long"</span><span class="p">))</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">mutate</span><span class="p">(</span><span class="n">lat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">as.numeric</span><span class="p">(</span><span class="n">str_squish</span><span class="p">(</span><span class="n">lat</span><span class="p">)),</span><span class="w"> + </span><span class="n">long</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">as.numeric</span><span class="p">(</span><span class="n">str_squish</span><span class="p">(</span><span class="n">long</span><span class="p">)))</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">select</span><span class="p">(</span><span class="n">Name</span><span class="p">,</span><span class="w"> </span><span class="n">`Country name EN`</span><span class="p">,</span><span class="w"> </span><span class="n">`Country Code`</span><span class="p">,</span><span class="w"> </span><span class="n">Population</span><span class="p">,</span><span class="w"> </span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">long</span><span class="p">)</span><span class="w"> </span></code></pre></figure> + +<p>Next is the job of identifying cities that are bigger than any others to their north. This was a bit of a fiddly problem which I addressed by sorting all the cities by distrance from the north pole (highest latitude first), making a new column which is the cumulative maximum population so far, and retaining only those cities that are equal to or higher than that maximum population. This gets me a list of just 20 cities.</p> + +<p>I then turn them into simple features objects with geometry (based on the latitude and longitude), and transform them to coordinates that will represent the world flattened out centred around the north pole, using the coordinate reference system I calculated before.</p> + +<p>Then, I source country boundaries from the invaluable Natural Earth repository of map data (accessed via the <code class="language-plaintext highlighter-rouge">rnaturalearth</code> R package), and give them the same transformation, and turn both data sets into a single map.</p> + +<p>Here’s the code doing those things:</p> + +<figure class="highlight"><pre><code class="language-r" data-lang="r"><span class="c1">#-----------------most north-------------</span><span class="w"> + +</span><span class="n">most_north</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">d</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">arrange</span><span class="p">(</span><span class="n">desc</span><span class="p">(</span><span class="n">lat</span><span class="p">))</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">mutate</span><span class="p">(</span><span class="n">max_pop</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">cummax</span><span class="p">(</span><span class="n">Population</span><span class="p">))</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">filter</span><span class="p">(</span><span class="n">Population</span><span class="w"> </span><span class="o">&gt;=</span><span class="w"> </span><span class="n">max_pop</span><span class="p">)</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">st_as_sf</span><span class="p">(</span><span class="n">coords</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="s2">"long"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lat"</span><span class="p">),</span><span class="w"> </span><span class="n">remove</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">crs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">st_crs</span><span class="p">(</span><span class="s2">"WGS84"</span><span class="p">))</span><span class="w"> + +</span><span class="n">most_north</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">st_transform</span><span class="p">(</span><span class="n">most_north</span><span class="p">,</span><span class="w"> </span><span class="n">crs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">north_crs</span><span class="p">)</span><span class="w"> +</span><span class="n">most_north</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">cbind</span><span class="p">(</span><span class="n">most_north</span><span class="p">,</span><span class="w"> </span><span class="n">st_coordinates</span><span class="p">(</span><span class="n">most_north</span><span class="p">))</span><span class="w"> + +</span><span class="c1"># borders of countries north of Shanghai, from Natural Earth</span><span class="w"> +</span><span class="n">north_world</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">ne_countries</span><span class="p">()</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">filter</span><span class="p">(</span><span class="n">label_y</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="m">30</span><span class="p">)</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">st_transform</span><span class="p">(</span><span class="n">crs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">north_crs</span><span class="p">)</span><span class="w"> + +</span><span class="n">m1</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">most_north</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">mutate</span><span class="p">(</span><span class="n">zero</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0</span><span class="p">,</span><span class="w"> + </span><span class="n">radius</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">sqrt</span><span class="p">(</span><span class="n">X</span><span class="w"> </span><span class="o">^</span><span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">Y</span><span class="w"> </span><span class="o">^</span><span class="w"> </span><span class="m">2</span><span class="p">),</span><span class="w"> + </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">glue</span><span class="p">(</span><span class="s2">"{Name}, {nf(Population)}"</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="w"> </span><span class="o">+</span><span class="w"> + </span><span class="c1"># draw the sea as background:</span><span class="w"> + </span><span class="n">geom_circle</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">tibble</span><span class="p">(</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0</span><span class="p">,</span><span class="w"> </span><span class="n">r</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">8.5e6</span><span class="p">),</span><span class="w"> + </span><span class="n">aes</span><span class="p">(</span><span class="n">x0</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y0</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">r</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">r</span><span class="p">),</span><span class="w"> </span><span class="n">fill</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"steelblue"</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="kc">NA</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">geom_sf</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">north_world</span><span class="p">,</span><span class="w"> </span><span class="n">fill</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"grey90"</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="kc">NA</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">geom_circle</span><span class="p">(</span><span class="n">aes</span><span class="p">(</span><span class="n">x0</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">zero</span><span class="p">,</span><span class="w"> </span><span class="n">y0</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">zero</span><span class="p">,</span><span class="w"> </span><span class="n">r</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">radius</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">radius</span><span class="p">))</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">geom_sf</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">geom_text_repel</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">X</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">Y</span><span class="p">,</span><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">family</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ff</span><span class="p">,</span><span class="w"> </span><span class="n">seed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">123</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">3</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="c1"># these limits are in the transformed coordinates, were chosen by hand / trial and error:</span><span class="w"> + </span><span class="n">coord_sf</span><span class="p">(</span><span class="n">ylim</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="m">-3000000</span><span class="w"> </span><span class="p">,</span><span class="w"> </span><span class="m">7000000</span><span class="p">),</span><span class="w"> </span><span class="n">lims_method</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"orthogonal"</span><span class="p">,</span><span class="w"> + </span><span class="n">xlim</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="m">-6000000</span><span class="p">,</span><span class="w"> </span><span class="m">6000000</span><span class="w"> </span><span class="p">))</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">theme_void</span><span class="p">(</span><span class="n">base_family</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ff</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">scale_colour_viridis_c</span><span class="p">(</span><span class="n">direction</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">-1</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">labs</span><span class="p">(</span><span class="n">title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Settlements that have no larger settlement further north of them"</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">theme</span><span class="p">(</span><span class="n">legend.position</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"none"</span><span class="p">)</span></code></pre></figure> + +<p>And that results in this map:</p> + +<object type="image/svg+xml" data="https://freerangestats.info/img/0274-most-north.svg" width="100%"><img src="https://freerangestats.info/img/0274-most-north.png" width="100%" /></object> + +<p>It’s a little different from the original. As expected, I am missing settlements with less than 1,000 people, and I have correctly inserted Helsinki. But there are other differences which come from ambiguities in the population size of cities. For example, if you google “Tokyo 37 million” you are prompted by Google with the frequently searched question “Is Tokyo’s population 14 or 37 million?”. It turns out the “Tokyo Metropolis” is 14m and “Tokyo metropolitan area” is 37 million.</p> + +<p>Obviously these are numbers that depend on decisions about boundaries, which as soon as you start thinking them through are revealed as being at least to a degree arbitrary. My data source opted on the 14m side for Tokyo. New York is also defined as a smaller area than in the Brilliant Maps original. I’m not particularly concerned with (or qualified to talk about) these urban definitional matters, so I’m just going to stick to the definitions used by my data source.</p> + +<p>My first effort at drawing these maps did the transformation on the fly using <code class="language-plaintext highlighter-rouge">coord_map(projection='orthographic')</code> which worked ok, although it was harder (not impossible) to colour in the sea, and the constant-latitude circles I tried to draw for each city were crude and polygons. But when I tried to do the map centred on the south pole this method tripped up, and noting that <code class="language-plaintext highlighter-rouge">coord_map()</code> is now deprecated I went the route of doing the transformation explicitly and in advance first. This gave a nicer result, particularly for the circles, and control over the bounding box of the map. So it was worth the half hour or so of cursing as I worked to understand the method. R’s power in geocomputation is growing so fast that anything on the web older than a couple of years is likely to be out of date - not necessarily wrong, but likely to miss a simpler and more powerful way of doing what you are trying.</p> + +<p>Anyway, the “explicit transformation done before drawing the map” method worked well for any arbitrary projection, and here is the south pole version:</p> + +<figure class="highlight"><pre><code class="language-r" data-lang="r"><span class="c1">#------------most south---------------</span><span class="w"> + +</span><span class="n">most_south</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">d</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">arrange</span><span class="p">(</span><span class="n">lat</span><span class="p">)</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">mutate</span><span class="p">(</span><span class="n">max_pop</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">cummax</span><span class="p">(</span><span class="n">Population</span><span class="p">))</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">filter</span><span class="p">(</span><span class="n">Population</span><span class="w"> </span><span class="o">&gt;=</span><span class="w"> </span><span class="n">max_pop</span><span class="p">)</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">st_as_sf</span><span class="p">(</span><span class="n">coords</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="s2">"long"</span><span class="p">,</span><span class="w"> </span><span class="s2">"lat"</span><span class="p">),</span><span class="w"> </span><span class="n">remove</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">FALSE</span><span class="p">,</span><span class="w"> </span><span class="n">crs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">st_crs</span><span class="p">(</span><span class="s2">"WGS84"</span><span class="p">))</span><span class="w"> + +</span><span class="n">most_south</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">st_transform</span><span class="p">(</span><span class="n">most_south</span><span class="p">,</span><span class="w"> </span><span class="n">crs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">south_crs</span><span class="p">)</span><span class="w"> +</span><span class="n">most_south</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">cbind</span><span class="p">(</span><span class="n">most_south</span><span class="p">,</span><span class="w"> </span><span class="n">st_coordinates</span><span class="p">(</span><span class="n">most_south</span><span class="p">))</span><span class="w"> + + +</span><span class="c1"># borders of countries south of Shanghai</span><span class="w"> +</span><span class="n">south_world</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">ne_countries</span><span class="p">()</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">filter</span><span class="p">(</span><span class="n">label_y</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="m">35</span><span class="p">)</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">st_transform</span><span class="p">(</span><span class="n">crs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">south_crs</span><span class="p">)</span><span class="w"> + +</span><span class="n">m2</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">most_south</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> + </span><span class="n">mutate</span><span class="p">(</span><span class="n">zero</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0</span><span class="p">,</span><span class="w"> + </span><span class="n">radius</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">sqrt</span><span class="p">(</span><span class="n">X</span><span class="w"> </span><span class="o">^</span><span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">Y</span><span class="w"> </span><span class="o">^</span><span class="w"> </span><span class="m">2</span><span class="p">),</span><span class="w"> + </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">glue</span><span class="p">(</span><span class="s2">"{Name}, {nf(Population)}"</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="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">annotate</span><span class="p">(</span><span class="s2">"rect"</span><span class="p">,</span><span class="w"> </span><span class="n">xmin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">-</span><span class="kc">Inf</span><span class="p">,</span><span class="w"> </span><span class="n">xmax</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">Inf</span><span class="p">,</span><span class="w"> </span><span class="n">ymin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">-</span><span class="kc">Inf</span><span class="p">,</span><span class="w"> </span><span class="n">ymax</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">Inf</span><span class="p">,</span><span class="w"> </span><span class="n">fill</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"steelblue"</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">geom_sf</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">south_world</span><span class="p">,</span><span class="w"> </span><span class="n">fill</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"grey90"</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="kc">NA</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">geom_circle</span><span class="p">(</span><span class="n">aes</span><span class="p">(</span><span class="n">x0</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">zero</span><span class="p">,</span><span class="w"> </span><span class="n">y0</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">zero</span><span class="p">,</span><span class="w"> </span><span class="n">r</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">radius</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">radius</span><span class="p">))</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">geom_sf</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">geom_text_repel</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">X</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">Y</span><span class="p">,</span><span class="w"> </span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">family</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ff</span><span class="p">,</span><span class="w"> </span><span class="n">seed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">123</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">3</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="c1"># these limits are in the transformed coordinates, were chosen by hand / trial and error:</span><span class="w"> + </span><span class="n">coord_sf</span><span class="p">(</span><span class="n">ylim</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="m">-11000000</span><span class="w"> </span><span class="p">,</span><span class="w"> </span><span class="m">11000000</span><span class="p">),</span><span class="w"> </span><span class="n">lims_method</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"orthogonal"</span><span class="p">,</span><span class="w"> + </span><span class="n">xlim</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="m">-7000000</span><span class="p">,</span><span class="w"> </span><span class="m">20000000</span><span class="w"> </span><span class="p">))</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">theme_void</span><span class="p">(</span><span class="n">base_family</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ff</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">scale_colour_viridis_c</span><span class="p">(</span><span class="n">direction</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">-1</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">labs</span><span class="p">(</span><span class="n">title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Settlements that have no larger settlement further south of them"</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> + </span><span class="n">theme</span><span class="p">(</span><span class="n">legend.position</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"none"</span><span class="p">)</span></code></pre></figure> + +<p>…which gets me this map. Nice.</p> + +<object type="image/svg+xml" data="https://freerangestats.info/img/0274-most-south.svg" width="100%"><img src="https://freerangestats.info/img/0274-most-south.png" width="100%" /></object> + +<p>This map goes well over the equator and in some ways gives a distorted view of the world; the sphere has been badly flattened and warped to show Shanghai and the south pole on the same rectangle. But I’m not going to worry about it for now.</p> + +<p>OK that’s all folks.</p> + + Sat, 24 Aug 2024 00:00:00 +1100 + https://freerangestats.info/blog/2024/08/24/polar-maps + https://freerangestats.info/blog/2024/08/24/polar-maps + + Perturbing a non-symmetrical probability distribution by @ellis2013nz <p>So I will fess up, I was one of the 34% of people who chose the first, incorrect answer on this quiz on Mastodon: -<img src="https:/freerangestats.info/img/0272-toot-1.png" width="95%" /></p> +<img src="https://freerangestats.info/img/0272-toot-1.png" width="95%" /></p> <p><a href="https://mastodon.social/@tslumley@fediscience.org/112974355500253935">Original Toot, and explanatory responses, is available here</a>.</p> @@ -91,11 +248,11 @@ $value <p>OK, as predicted. Can a visualisation help? Here’s one showing the original distribution and, superimposed, the version that has been perturbed with white noise. In this version, the horizontal axis has been given a modulus transform (one of the <a href="/blog/2015/09/07/transforming-breaks-in-a-scale">very first things I blogged about</a> - a great way to visualise data that feels like it needs a logarithm or Cox-Box transform, but inconveniently includes negative values). This transform is good helping see the “bump” on the left, present in both the original and perturbed distribution:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0272-both.svg" width="100%"><img src="https:/freerangestats.info/img/0272-both.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0272-both.svg" width="100%"><img src="https://freerangestats.info/img/0272-both.png" width="100%" /></object> <p>However, the modulus transform makes it harder to understand the skew, so here’s the same chart with an untransformed x axis. This time we can see the original skew around the original mean and median, and perhaps this helps us understand what’s going on.</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0272-both-untransformed.svg" width="100%"><img src="https:/freerangestats.info/img/0272-both-untransformed.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0272-both-untransformed.svg" width="100%"><img src="https://freerangestats.info/img/0272-both-untransformed.png" width="100%" /></object> <p>Seeing it like this, in the original scale, is useful for me at least, helping imagine adding random noise to the original distribution and seeing how doing that to the points just to the left of the original median pushes them over it (dragging the median up), whereas at least some of the points to the right of the median don’t get perturbed enough leftwards to push them over the median and drag it down.</p> @@ -133,7 +290,7 @@ $value <p>That’s all folks. What out for those tricky distributions. Actually, although the simulated example above with exactly matching mean and median is obviously contrived, a distibution that is a mix of a skewed log-normal with a lump of something far to the left isn’t unusual in some economic areas - like firms’ profits or individuals’ incomes (mostly they are shaped log normal and strictly positive, but a small selection make some degree of a loss, and it’s definitely a mixture of two distributions not some easily-described single mathematical function).</p> - Tue, 20 Aug 2024 00:00:00 +1000 + Tue, 20 Aug 2024 00:00:00 +1100 https://freerangestats.info/blog/2024/08/20/symmetry https://freerangestats.info/blog/2024/08/20/symmetry @@ -146,7 +303,7 @@ $value <p>First, a reminder of how <a href="https://en.wikipedia.org/wiki/Snakes_and_ladders">Snakes and Ladders</a> works. Here is a stylised version of a common Snakes and Ladders board, the Milton Bradley 1952 “Chutes and Ladders” (American children are frightened of snakes, apparently) depicted on the Wikipedia page. I’ve used arrows rather than snakes or chutes and ladders, and of course omitted all the extra imagery, which while interesting for a historian of morality and games, isn’t relevant to gameplay. I was actually in Sri Lanka back in 2018 when I started this Snakes and Ladders work, so had a particular interest in its origins, but I don’t have time to explain that now.</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0130-s-and-l-board.svg" width="100%"><img src="https:/freerangestats.info/img/0130-s-and-l-board.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0130-s-and-l-board.svg" width="100%"><img src="https://freerangestats.info/img/0130-s-and-l-board.png" width="100%" /></object> <p>You start at a virtual square 0, roll a six-sided dice and move your counter that number of squares. If you end in a position with a ladder, you move up to where it finishes. So if your first roll is a 1,you move to square 1 and immediately climb the ladder to square 38. If you end on a snake, you move down to the tail of the snake.</p> @@ -215,7 +372,7 @@ $value <p>I want a realistic simulation of the game as actually played, so after mucking around with Markov chains for a while realised that it was going to be much simpler to write code that mimics how the players go about it. That’s what I used to simulate 10,000 solo games to create this animation of a hundred Snakes and Ladders games:</p> -<p><img src="https:/freerangestats.info/img/0130-snakes-and-ladders.gif" width="90%" /></p> +<p><img src="https://freerangestats.info/img/0130-snakes-and-ladders.gif" width="90%" /></p> <p>The code for which is below. All the heavy work is done by the <code class="language-plaintext highlighter-rouge">sl_game()</code> function, which takes as an argument the current position of the player (defaults to zero) - we’ll be using this more later.</p> @@ -330,7 +487,7 @@ $value <p>The distribution of the number of rolls required is very much squewed with a long tail - it is in fact possible for a game to go on forever (although extremely improbable):</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0130-lengths.svg" width="100%"><img src="https:/freerangestats.info/img/0130-lengths.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0130-lengths.svg" width="100%"><img src="https://freerangestats.info/img/0130-lengths.png" width="100%" /></object> <p>OK, so where does the gambling come in? Gambling becomes interesting when there is a choice about the <em>timing</em> or <em>odds</em> of a wager. If all gambling was an even odds stake put down before the game, then Snakes and Ladders would stay a game of pure chance. But if it is possible, say at the beginning of your turn, to size up the board and say “I’ll bet you on even odds that I’ll win”, you’re making a choice based on your knowledge of the game. A naive observer might think that anyone who is at a more advanced square is more likely to win, and therefore could be trapped into taking a bet that would only be fair if there were favourable odds given to them.</p> @@ -338,7 +495,7 @@ $value <p>We can visualise the result in a chart like this one. The highlight boxes are where Player 1, who is about to roll, has a surprisingly good chance of winning (higher than 0.55), despite being behind Player 2 in the race. These are the probable opportunities to offer a 50:50 bet to your opponent; only an unusually disciplined or knowledgeable player would think they were losing in this position.</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0130-unusual-winning-chances.svg" width="100%"><img src="https:/freerangestats.info/img/0130-unusual-winning-chances.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0130-unusual-winning-chances.svg" width="100%"><img src="https://freerangestats.info/img/0130-unusual-winning-chances.png" width="100%" /></object> <p>.</p> <p>Here are some of those positions:</p> @@ -453,7 +610,7 @@ Black squares indicate situations where it is worth betting on Player 1 even tho <p>Generally speaking - putting aside some backgammon-specific complications - it makes sense to accept the doubling cube if you have a 1 in 4 or better chance of winning. If you have a 0.75 probability of winning and have the cube available, you should definitely offer the double; and your opponent should refuse. Now, I’ve never heard of Snakes and Ladders with a doubling cube but actually I am sure it has happened (or will happen in the future). So it’s worth highlighting what are the points at which Player 2 should decline the cube if offered and accept the loss at the current stake? This chart answers this for us (although probably a table would be more useful for actual use):</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0130-doubling-cube.svg" width="100%"><img src="https:/freerangestats.info/img/0130-doubling-cube.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0130-doubling-cube.svg" width="100%"><img src="https://freerangestats.info/img/0130-doubling-cube.png" width="100%" /></object> <p>Produced with this little snipped of extra code:</p> @@ -472,7 +629,7 @@ Black squares indicate situations where Player 2 should decline an offered doubl <p>OK folks, that’s all. Remember to gamble responsibly. In particular, if you use this post to rip off any kids, their sadness will be on your conscience, and I absolutely disclaim all responsibility for any misuse of any kind of any of the above material.</p> - Sat, 10 Aug 2024 00:00:00 +1000 + Sat, 10 Aug 2024 00:00:00 +1100 https://freerangestats.info/blog/2024/08/10/snakes-and-ladders https://freerangestats.info/blog/2024/08/10/snakes-and-ladders @@ -485,7 +642,7 @@ Black squares indicate situations where Player 2 should decline an offered doubl <p>After quite a bit of experimentation and iteration through different variants, I came up with this chart of the proportion of elderly people in the different PICTs:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0271-aging-linechart.svg" width="100%"><img src="https:/freerangestats.info/img/0271-aging-linechart.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0271-aging-linechart.svg" width="100%"><img src="https://freerangestats.info/img/0271-aging-linechart.png" width="100%" /></object> <p>The choice of “percentage of population that is aged 65 and over” seemed straightforward enough giving my aims to understand population aging. The harder questions were about what to map colour to. I tried an individual colour for each country - this was probably the easiest to read, and maybe what I’d use if the chart was for a more general readership. I also tried mapping colour to subregion (Melanesia, Polynesia and Micronesia), to population growth rates, and population sizes, before settling on GDP per capita in 2023 as a genuinely interesting additional variable that highlights some relationships between aging and income.</p> @@ -493,7 +650,7 @@ Black squares indicate situations where Player 2 should decline an offered doubl <p>I did feel the sub-regional aspect was an important one too, despite not choosing it in the end for colour. So I made a faceted version of the same chart to show that, which I think works quite nicely too:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0271-aging-linechart-facet.svg" width="100%"><img src="https:/freerangestats.info/img/0271-aging-linechart-facet.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0271-aging-linechart-facet.svg" width="100%"><img src="https://freerangestats.info/img/0271-aging-linechart-facet.png" width="100%" /></object> <p>All the code for these charts is in one chunk at the bottom of the blog. It’s all straightforward stuff, importing data from two data sources and then some moderately finicky plot polishing. The power of the grammar of graphics really shone through in making it easy to iterate through different versions of these before coming to the final production charts; this isn’t so obvious in just reading the code except for when we see the simple one-liner conversion of the main chart into the faceted one.</p> @@ -501,7 +658,7 @@ Black squares indicate situations where Player 2 should decline an offered doubl <p>I wanted a sense of the absolute magnitudes too. Proportions of populations by PICT are all very well, but how many millions of people are we talking about in different age groups? It turns out this is an important thing to visualise because of how easy it is to forget that, in numbers of people terms, the Pacific is dominated by Melanesia, and Melanesia in turn is mostly Papua New Guinea. Again after a bit of iteration and experimentation I came up with this chart to show that:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0271-aging-areachart.svg" width="100%"><img src="https:/freerangestats.info/img/0271-aging-areachart.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0271-aging-areachart.svg" width="100%"><img src="https://freerangestats.info/img/0271-aging-areachart.png" width="100%" /></object> <h2 id="r-code">R code</h2> @@ -698,7 +855,7 @@ Black squares indicate situations where Player 2 should decline an offered doubl </span><span class="n">print</span><span class="p">(</span><span class="n">p3</span><span class="p">)</span></code></pre></figure> - Sat, 27 Jul 2024 00:00:00 +1000 + Sat, 27 Jul 2024 00:00:00 +1100 https://freerangestats.info/blog/2024/07/27/aging-pacific https://freerangestats.info/blog/2024/07/27/aging-pacific @@ -711,15 +868,15 @@ Black squares indicate situations where Player 2 should decline an offered doubl <p>Here’s my reproduction of Vanuatu’s population projection from 2020 to 2100, using just the 2020 population totals and the forecast fertility, mortality and migration rates. As you can see it’s basically identical to the UN totals:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0262-vanuatu-pop.svg" width="100%"><img src="https:/freerangestats.info/img/0262-vanuatu-pop.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0262-vanuatu-pop.svg" width="100%"><img src="https://freerangestats.info/img/0262-vanuatu-pop.png" width="100%" /></object> <p>And here’s the same method tweaked for the actual 2020 census total and with a rough adjustment made to fertility rates based on what was observed at the 2020 census:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0262-vanuatu-revised.svg" width="100%"><img src="https:/freerangestats.info/img/0262-vanuatu-revised.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0262-vanuatu-revised.svg" width="100%"><img src="https://freerangestats.info/img/0262-vanuatu-revised.png" width="100%" /></object> <p>Of course, this method delivers a full set of projections by age and sex, and we could construct life tables or any indicators we want from it. Here are population pyramids comparing the published UN projections for 2050 with my revised set. Not visually stunning in its comparison, but enough to prove that it’s possible:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0262-vanuatu-pyramid.svg" width="100%"><img src="https:/freerangestats.info/img/0262-vanuatu-pyramid.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0262-vanuatu-pyramid.svg" width="100%"><img src="https://freerangestats.info/img/0262-vanuatu-pyramid.png" width="100%" /></object> <h2 id="reproducing-un-projections">Reproducing UN projections</h2> @@ -1058,7 +1215,7 @@ Black squares indicate situations where Player 2 should decline an offered doubl </span><span class="n">subtitle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Attempt to re-create the UN population projections from population in 2020, fertility and mortality rates"</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="s2">"Population"</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="s2">""</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="s2">""</span><span class="p">)</span></code></pre></figure> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0262-vanuatu-pop.svg" width="100%"><img src="https:/freerangestats.info/img/0262-vanuatu-pop.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0262-vanuatu-pop.svg" width="100%"><img src="https://freerangestats.info/img/0262-vanuatu-pop.png" width="100%" /></object> <p>As we can see the results are pretty much identical. Let’s look at my projected births and deaths based on fertility and mortality rates, and compare them to the published projected numbers</p> @@ -1086,8 +1243,8 @@ Black squares indicate situations where Player 2 should decline an offered doubl </span><span class="n">subtitle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Attempt to re-create the UN population projections from population in 2020, fertility and mortality rates"</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="s2">"Deaths (thousands)"</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="s2">""</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="s2">""</span><span class="p">)</span></code></pre></figure> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0262-vanuatu-births.svg" width="100%"><img src="https:/freerangestats.info/img/0262-vanuatu-births.png" width="100%" /></object> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0262-vanuatu-deaths.svg" width="100%"><img src="https:/freerangestats.info/img/0262-vanuatu-deaths.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0262-vanuatu-births.svg" width="100%"><img src="https://freerangestats.info/img/0262-vanuatu-births.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0262-vanuatu-deaths.svg" width="100%"><img src="https://freerangestats.info/img/0262-vanuatu-deaths.png" width="100%" /></object> <p>I’m pretty happy with those. There’s definitely some discrepancies and a lag in the births which I suspect come down to how one treats populations of mothers - numbers on 1 January v 1 July, that sort of thing. But in the scheme of things these are very small.</p> @@ -1112,7 +1269,7 @@ Black squares indicate situations where Player 2 should decline an offered doubl </span><span class="n">plot_mig</span><span class="p">(</span><span class="s2">"Australia"</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">plot_mig</span><span class="p">(</span><span class="s2">"India"</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">plot_layout</span><span class="p">(</span><span class="n">ncol</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">2</span><span class="p">)</span></code></pre></figure> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0262-migration.svg" width="100%"><img src="https:/freerangestats.info/img/0262-migration.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0262-migration.svg" width="100%"><img src="https://freerangestats.info/img/0262-migration.png" width="100%" /></object> <p>For countries that have good data on it, migration is a big deal in the projections; but forecasting is hard, particularly of the future.</p> @@ -1120,9 +1277,9 @@ Black squares indicate situations where Player 2 should decline an offered doubl <p>Here’s the final result comparing UN projections with mine for a few interesting countries:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0262-Australia-pop.svg" width="100%"><img src="https:/freerangestats.info/img/0262-Australia-pop.png" width="100%" /></object> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0262-China-pop.svg" width="100%"><img src="https:/freerangestats.info/img/0262-China-pop.png" width="100%" /></object> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0262-India-pop.svg" width="100%"><img src="https:/freerangestats.info/img/0262-India-pop.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0262-Australia-pop.svg" width="100%"><img src="https://freerangestats.info/img/0262-Australia-pop.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0262-China-pop.svg" width="100%"><img src="https://freerangestats.info/img/0262-China-pop.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0262-India-pop.svg" width="100%"><img src="https://freerangestats.info/img/0262-India-pop.png" width="100%" /></object> <h2 id="adjusting-the-starting-point">Adjusting the starting point</h2> @@ -1211,15 +1368,15 @@ Black squares indicate situations where Player 2 should decline an offered doubl <p>And that’s what gets us these results:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0262-vanuatu-revised.svg" width="100%"><img src="https:/freerangestats.info/img/0262-vanuatu-revised.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0262-vanuatu-revised.svg" width="100%"><img src="https://freerangestats.info/img/0262-vanuatu-revised.png" width="100%" /></object> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0262-vanuatu-pyramid.svg" width="100%"><img src="https:/freerangestats.info/img/0262-vanuatu-pyramid.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0262-vanuatu-pyramid.svg" width="100%"><img src="https://freerangestats.info/img/0262-vanuatu-pyramid.png" width="100%" /></object> <p>I’m hoping this might be actually useful for pragmatic updates of the UN population projections when more current data is available, without having to revise everything from scratch.</p> <p>OK, that’s all for today.</p> - Sun, 05 May 2024 00:00:00 +1000 + Sun, 05 May 2024 00:00:00 +1100 https://freerangestats.info/blog/2024/05/05/pop-projections https://freerangestats.info/blog/2024/05/05/pop-projections @@ -1264,7 +1421,7 @@ Black squares indicate situations where Player 2 should decline an offered doubl <p>In fact, many countries in the V20 have below-average MVI scores; and there are also countries that aren’t in the V20 but have notably above-average MVI scores. Consider this chart:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0257-discrepancies.svg" width="100%"><img src="https:/freerangestats.info/img/0257-discrepancies.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0257-discrepancies.svg" width="100%"><img src="https://freerangestats.info/img/0257-discrepancies.png" width="100%" /></object> <p>The blue labelled countries are non-members of the V20 with an MVI of above 65. The red labelled countries are members of the V20 with an MVI below 50 (by construction, 50 is the average MVI score, so below 50 means below average). The GDP per capita, in purchasing power parity (PPP) terms in 2017 international dollars, is just for contextual information; it isn’t used for determining which countries are labelled or not.</p> @@ -1395,7 +1552,7 @@ Palestine is a member of V20 but does not have a MVI. Seven countries have an MV <p>First lets look at some results for the Pacific, the area I’m working on in my day job. Here are the values on the final, single Multidimensional Vulnerability Index (MVI) for the 12 Pacific Island countries in the dataset, compared to other countries in grey:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0255-overall-index.svg" width="100%"><img src="https:/freerangestats.info/img/0255-overall-index.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0255-overall-index.svg" width="100%"><img src="https://freerangestats.info/img/0255-overall-index.png" width="100%" /></object> <p>Unlike most of my posts, I haven’t interspersed my text and output with code creating it, because I want the results to be easy to focus on without distraction in talking about how the visualisations are done. But that code is still <a href="https://github.com/ellisp/blog-source/blob/master/_working/0255-mvi-pacific.R">available in one spot here</a>.</p> @@ -1403,7 +1560,7 @@ Palestine is a member of V20 but does not have a MVI. Seven countries have an MV <p>Next level down from the main index we have two important component indexes - “Structural Vulnerability” and “Lack of Structural Resilience”. The final index for each country is their average of scores on these two, so let’s look again at the Pacific countries on the two indexes at once, again with the rest of the world’s countries shown in grey:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0255-two-indexes.svg" width="100%"><img src="https:/freerangestats.info/img/0255-two-indexes.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0255-two-indexes.svg" width="100%"><img src="https://freerangestats.info/img/0255-two-indexes.png" width="100%" /></object> <p>Hmm ok, that’s interesting; for example we can see that Tuvalu gets it’s relatively high overall score (that we saw in the first plot where it was ranked second most vulnerable of Pacific countries) almost entirely from “lack of structural resilience” and in contrast is actually slightly below the median score for “Structural vulnerability”.</p> @@ -1411,25 +1568,25 @@ Palestine is a member of V20 but does not have a MVI. Seven countries have an MV <p>First, here’s “structural vulnerability”. There are two levels of concepts I’ve merged into one chart here; the first three (economic, environmental and social vulnerability) are themselves made up of the more detailed remaining nine. We’re still dealing with abstracts, not down to any actual data here. But at least we can see what it is that conceptually is leading to high or low scores. In the case of Nauru for example we see a particularly high score for “exposure to entrance of international forced displacement of people”. Hmm, there’s some complicated history behind that one.</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0255-sv-concepts.svg" width="100%"><img src="https:/freerangestats.info/img/0255-sv-concepts.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0255-sv-concepts.svg" width="100%"><img src="https://freerangestats.info/img/0255-sv-concepts.png" width="100%" /></object> <p>And here’s the concepts making up “lack of structural resilience”:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0255-lsr-concepts.svg" width="100%"><img src="https:/freerangestats.info/img/0255-lsr-concepts.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0255-lsr-concepts.svg" width="100%"><img src="https://freerangestats.info/img/0255-lsr-concepts.png" width="100%" /></object> <p>We can see that these “resilience” concepts are about the ability of a society to respond to shocks they will get as a result of vulnerability; for example the lack economies of scale, adequate water supply, or a resilient agricultural system.</p> <p>Finally, one more level down, here are the actual measureable indicators that are turned into those concepts, and ultimately the index itself:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0255-sv-variables.svg" width="100%"><img src="https:/freerangestats.info/img/0255-sv-variables.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0255-sv-variables.svg" width="100%"><img src="https://freerangestats.info/img/0255-sv-variables.png" width="100%" /></object> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0255-lsr-variables.svg" width="100%"><img src="https:/freerangestats.info/img/0255-lsr-variables.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0255-lsr-variables.svg" width="100%"><img src="https://freerangestats.info/img/0255-lsr-variables.png" width="100%" /></object> <h2 id="visualising-the-hierarchy-of-concepts">Visualising the hierarchy of concepts</h2> <p>But which variables feed in to which concepts, and how to grasp this all at once? To help me understand how the variables get aggregated into concepts, then into higher level concepts, then into two indexes and finally one index, I constructed a network graph to illustrate the hierarchy:</p> -<p><a href="https:/freerangestats.info/img/0255-construction.png"><img src="https:/freerangestats.info/img/0255-construction.png" width="100%" /></a></p> +<p><a href="https://freerangestats.info/img/0255-construction.png"><img src="https://freerangestats.info/img/0255-construction.png" width="100%" /></a></p> <p>This visualisation works for me - at least on a reasonable sized screen. But this, and all of the following network charts, are a bit fiddly to read in-line in the blog so I’d recommend opening them in another tab (with right mouse button) or clicking on them to navigate straight there (and then you can use the back key to come back here to the main text).</p> @@ -1437,54 +1594,54 @@ Palestine is a member of V20 but does not have a MVI. Seven countries have an MV <h3>Melanesia</h3> <h4>Papua New Guinea</h4> -<p><a href="https:/freerangestats.info/img/0255-mvi-Papua New Guinea.png"><img src="https:/freerangestats.info/img/0255-mvi-Papua New Guinea.png" width="100%" /></a></p> +<p><a href="https://freerangestats.info/img/0255-mvi-Papua New Guinea.png"><img src="https://freerangestats.info/img/0255-mvi-Papua New Guinea.png" width="100%" /></a></p> <p>Most vulnerable scores (bright yellow) for PNG coming from gender equity, and lack of access to sanitation. Non-vulnerable scores coming from no problem with drylands, coastal zones, and access to freshwater.</p> <h4>Fiji</h4> -<p><a href="https:/freerangestats.info/img/0255-mvi-Fiji.png"><img src="https:/freerangestats.info/img/0255-mvi-Fiji.png" width="100%" /></a></p> +<p><a href="https://freerangestats.info/img/0255-mvi-Fiji.png"><img src="https://freerangestats.info/img/0255-mvi-Fiji.png" width="100%" /></a></p> <p>Fiji scores higher for vulnerability on exposure to natural hazards, rainfall shocks, low connectivity and low integration wutih international markets.</p> <h4>Vanuatu</h4> -<p><a href="https:/freerangestats.info/img/0255-mvi-Vanuatu.png"><img src="https:/freerangestats.info/img/0255-mvi-Vanuatu.png" width="100%" /></a></p> +<p><a href="https://freerangestats.info/img/0255-mvi-Vanuatu.png"><img src="https://freerangestats.info/img/0255-mvi-Vanuatu.png" width="100%" /></a></p> <p>Vanuatu also scores high on vulnerability to natural hazards, low connectivity, and gender equity. But it is scored with a fairly high level of enviornmental resilience, and not too socially vulnerable.</p> <p>… and so on. I won’t write commentary on each individual country, but for completion they are all here:</p> <h4>Solomon Islands</h4> -<p><a href="https:/freerangestats.info/img/0255-mvi-Solomon Islands.png"><img src="https:/freerangestats.info/img/0255-mvi-Solomon Islands.png" width="100%" /></a></p> +<p><a href="https://freerangestats.info/img/0255-mvi-Solomon Islands.png"><img src="https://freerangestats.info/img/0255-mvi-Solomon Islands.png" width="100%" /></a></p> <h3>Micronesia</h3> <h4>Federated States of Micronesia</h4> -<p><a href="https:/freerangestats.info/img/0255-mvi-Micronesia (Federated States of).png"><img src="https:/freerangestats.info/img/0255-mvi-Micronesia (Federated States of).png" width="100%" /></a></p> +<p><a href="https://freerangestats.info/img/0255-mvi-Micronesia (Federated States of).png"><img src="https://freerangestats.info/img/0255-mvi-Micronesia (Federated States of).png" width="100%" /></a></p> <h4>Marshall Islands</h4> -<p><a href="https:/freerangestats.info/img/0255-mvi-Marshall Islands.png"><img src="https:/freerangestats.info/img/0255-mvi-Marshall Islands.png" width="100%" /></a></p> +<p><a href="https://freerangestats.info/img/0255-mvi-Marshall Islands.png"><img src="https://freerangestats.info/img/0255-mvi-Marshall Islands.png" width="100%" /></a></p> <h4>Kiribati</h4> -<p><a href="https:/freerangestats.info/img/0255-mvi-Kiribati.png"><img src="https:/freerangestats.info/img/0255-mvi-Kiribati.png" width="100%" /></a></p> +<p><a href="https://freerangestats.info/img/0255-mvi-Kiribati.png"><img src="https://freerangestats.info/img/0255-mvi-Kiribati.png" width="100%" /></a></p> <h4>Tuvalu</h4> -<p><a href="https:/freerangestats.info/img/0255-mvi-Tuvalu.png"><img src="https:/freerangestats.info/img/0255-mvi-Tuvalu.png" width="100%" /></a></p> +<p><a href="https://freerangestats.info/img/0255-mvi-Tuvalu.png"><img src="https://freerangestats.info/img/0255-mvi-Tuvalu.png" width="100%" /></a></p> <h4>Nauru</h4> -<p><a href="https:/freerangestats.info/img/0255-mvi-Nauru.png"><img src="https:/freerangestats.info/img/0255-mvi-Nauru.png" width="100%" /></a></p> +<p><a href="https://freerangestats.info/img/0255-mvi-Nauru.png"><img src="https://freerangestats.info/img/0255-mvi-Nauru.png" width="100%" /></a></p> <h4>Palau</h4> -<p><a href="https:/freerangestats.info/img/0255-mvi-Palau.png"><img src="https:/freerangestats.info/img/0255-mvi-Palau.png" width="100%" /></a></p> +<p><a href="https://freerangestats.info/img/0255-mvi-Palau.png"><img src="https://freerangestats.info/img/0255-mvi-Palau.png" width="100%" /></a></p> <h3>Polynesia</h3> <h4>Samoa</h4> -<p><a href="https:/freerangestats.info/img/0255-mvi-Samoa.png"><img src="https:/freerangestats.info/img/0255-mvi-Samoa.png" width="100%" /></a></p> +<p><a href="https://freerangestats.info/img/0255-mvi-Samoa.png"><img src="https://freerangestats.info/img/0255-mvi-Samoa.png" width="100%" /></a></p> <h4>Tonga</h4> -<p><a href="https:/freerangestats.info/img/0255-mvi-Tonga.png"><img src="https:/freerangestats.info/img/0255-mvi-Tonga.png" width="100%" /></a></p> +<p><a href="https://freerangestats.info/img/0255-mvi-Tonga.png"><img src="https://freerangestats.info/img/0255-mvi-Tonga.png" width="100%" /></a></p> <p>OK, that was interesting. I certainly feel I understand both a) how the index is constructed and b) the ratings it is giving to Pacific Island countries.</p> - Sat, 30 Sep 2023 00:00:00 +1000 + Sat, 30 Sep 2023 00:00:00 +1100 https://freerangestats.info/blog/2023/09/30/mvi https://freerangestats.info/blog/2023/09/30/mvi @@ -1493,7 +1650,7 @@ Palestine is a member of V20 but does not have a MVI. Seven countries have an MV Finding a circle in a chart by @ellis2013nz <p>So <a href="https://twitter.com/iwontoffendyou/status/1704935240907518367">this tweet</a> came across my feed. To save you going there it is about a selection exercise for a job for (I think) an IT start up, described proudly by its author as “insanely hard”; and the job is to find the radius of the brown circle in this diagram:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0254-circles.svg" width="100%"><img src="https:/freerangestats.info/img/0254-circles.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0254-circles.svg" width="100%"><img src="https://freerangestats.info/img/0254-circles.png" width="100%" /></object> <p>At first it just annoyed me, and my reaction was a) I’d never want to work for this guy and b) this is a really dumb way to select your team, unless you’re recruiting for the maths department at a university. I strongly believe that recruitment exercises should be:</p> @@ -1633,7 +1790,7 @@ Palestine is a member of V20 but does not have a MVI. Seven countries have an MV <p>That’s all for today. Take care out there.</p> - Sat, 23 Sep 2023 00:00:00 +1000 + Sat, 23 Sep 2023 00:00:00 +1100 https://freerangestats.info/blog/2023/09/23/circle https://freerangestats.info/blog/2023/09/23/circle @@ -1706,7 +1863,7 @@ The basic procedure to use these, as I understand it, is that you: <p>So this lets us do some interesting comparisons. For example, you can look at the relationship between infant mortality and life expectancy for each family of the model life tables:</p> -<object type="image/svg+xml" data='https:/freerangestats.info/img/0252-facets.svg' width='100%'><img src='https:/freerangestats.info/img/0252-facets.png' width='100%'></object> +<object type="image/svg+xml" data='https://freerangestats.info/img/0252-facets.svg' width='100%'><img src='https://freerangestats.info/img/0252-facets.png' width='100%'></object> <p>Here's the code for everything so far - downloading the model life tables from the UN, reading them into R, counting the families and drawing that plot of life expectancies:</p> @@ -1748,7 +1905,7 @@ The basic procedure to use these, as I understand it, is that you: <p>Alternatively we can look at a more summarised version of the data by comparing a couple of particular demographic statistics, at a given life expectancy, for the different model life tables. Here's my attempt at repeating (but adding in a sex dimension) Figure 1 from <a href = 'http://demographicestimation.iussp.org/content/introduction-model-life-tables'>this UNFPA instructional site</a>.</p> -<object type="image/svg+xml" data='https:/freerangestats.info/img/0252-scatter.svg' width='100%'><img src='https:/freerangestats.info/img/0252-scatter.png' width='100%'></object> +<object type="image/svg+xml" data='https://freerangestats.info/img/0252-scatter.svg' width='100%'><img src='https://freerangestats.info/img/0252-scatter.png' width='100%'></object> <p>I like this plot. It lets you see at a glance how the different families of model life table vary in at least one or two important ways. For example, we can see that the "South" (Coale-Demeny) and "South Asian" (UN) tables have relatively high child mortality (and then of course compensating low adult mortality) for a given life expectancy.</p> @@ -1790,7 +1947,7 @@ The basic procedure to use these, as I understand it, is that you: <p>OK so that's a nice representation of the overall life expectancy, but what about the gritty detail of the mortality rates at each individual age? One way to look at this is via an animation:</p> -<img src='https:/freerangestats.info/img/0252-model-life-tables.gif' width = '100%'> +<img src='https://freerangestats.info/img/0252-model-life-tables.gif' width = '100%'> <p>I quite like this for giving you an overview of the mortality rates of the different families and different life expectancies, but it's not great for comparing say two different families with the same life expectancy. </p> @@ -1866,7 +2023,7 @@ The basic procedure to use these, as I understand it, is that you: <p>As mentioned earlier, this isn't an area of deep expertise for me. I'm quite likely to have got some details of the terminology wrong, for example, so use the above with caution, and please add comments for anything you spot that I can correct.</P> - Sun, 06 Aug 2023 00:00:00 +1000 + Sun, 06 Aug 2023 00:00:00 +1100 https://freerangestats.info/blog/2023/08/06/model-life-tables https://freerangestats.info/blog/2023/08/06/model-life-tables @@ -1899,7 +2056,7 @@ The basic procedure to use these, as I understand it, is that you: <p>We take our sample of 1,000 diamonds and plot the statistical density of price. This gives us this right-skewed distribution, similar to what we’d see with many economic and financial variables.</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0204-distribution.svg" width="100%"><img src="https:/freerangestats.info/img/0204-distribution.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0204-distribution.svg" width="100%"><img src="https://freerangestats.info/img/0204-distribution.png" width="100%" /></object> <p>The right skew is an important part of what follows because it is both part of the reason for doing a log transform in a common model, and the reason why it is problematic for our main inference purpose.</p> @@ -1927,7 +2084,7 @@ The basic procedure to use these, as I understand it, is that you: <p>Following the methods taught in any statistics course introducing regression modelling, we start with a scatter plot of weight on the horizontal axis and price on the vertical axis.</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0204-untransformed.svg" width="100%"><img src="https:/freerangestats.info/img/0204-untransformed.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0204-untransformed.svg" width="100%"><img src="https://freerangestats.info/img/0204-untransformed.png" width="100%" /></object> <p>I’ve actually drawn a likely model in place here. Anyone who paid attention in that statistics course will recognise that the data set suffers from heteroskedasticity. As noted in the plot’s subtitle this breaches the Gauss-Markov assumptions, one of which is that variance is constant regardless of the expected value of the response variable. In this case - as is the case for many economic variables - the variance increases as the expected price increases, causing a familiar characteristic fanning out of the data. This means we can’t rely on Gauss-Markov to show that ordinary least squares (OLS) is the best linear unbiased estimator. In fact, we can be confident that OLS <em>isn’t</em>, and that even if we kept the same structure of our model we would be better off with some kind of weighted least squares estimator.</p> @@ -1935,7 +2092,7 @@ The basic procedure to use these, as I understand it, is that you: <p>If you were trained in this school of thought you are likely to replot the data with transformed axes, and fit a different model that is linear in the logs. Illustrated by this:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0204-transformed.svg" width="100%"><img src="https:/freerangestats.info/img/0204-transformed.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0204-transformed.svg" width="100%"><img src="https://freerangestats.info/img/0204-transformed.png" width="100%" /></object> <p>Boom, the heteroscedasticity is gone; and not only that the lines for each colour are nearly parallel. For various reasons, some philosophical and some more aesthetic, I am actually pretty sure this “linear in the logs” model is a better model for the purpose of understanding the relationship between price and weight.</p> @@ -1967,7 +2124,7 @@ breaking the Gauss-Markov assumptions."</span><span class="p& <p>The conviction that the log transform is a good one is reinforced when we look at the diagnostic plots of the two models (or rather, of two similar models - in the charts below I have simplified the models to remove an interaction between colour and weight). Here are the four most common diagnostic plots based on the residuals of the untransformed linear model:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0204-diagnostics-untransformed.svg" width="100%"><img src="https:/freerangestats.info/img/0204-diagnostics-untransformed.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0204-diagnostics-untransformed.svg" width="100%"><img src="https://freerangestats.info/img/0204-diagnostics-untransformed.png" width="100%" /></object> <p>The code for fitting the model and drawing these diagnostics is going to come a bit later</p> @@ -1979,7 +2136,7 @@ breaking the Gauss-Markov assumptions."</span><span class="p& </ul> <p>Quick digression - in case you want a visual key of how things look in a quantile-quantile plot, here’s one I knocked up earlier and might as well have here as anywhere. The thing we are looking for in a Q-Q plot is that if the observed data is similar to the reference distribution (in this case a normal distribution), we’d see a basically straight line.</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0204-qqnorm-demo.svg" width="100%"><img src="https:/freerangestats.info/img/0204-qqnorm-demo.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0204-qqnorm-demo.svg" width="100%"><img src="https://freerangestats.info/img/0204-qqnorm-demo.png" width="100%" /></object> <p>Produced with this quick excursion into base graphics:</p> @@ -1998,7 +2155,7 @@ breaking the Gauss-Markov assumptions."</span><span class="p& <p>OK, back to our diamonds; so we have fat-tailed, heteroskedastic residuals, a right-skewed original variable, and a bit of a curve in the data. We reach for our log-transform and refit the model and get this <em>much</em> better set of diagnostic plots:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0204-diagnostics-transformed.svg" width="100%"><img src="https:/freerangestats.info/img/0204-diagnostics-transformed.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0204-diagnostics-transformed.svg" width="100%"><img src="https://freerangestats.info/img/0204-diagnostics-transformed.png" width="100%" /></object> <p>The issues of concern are fixed:</p> <ul> @@ -2023,7 +2180,7 @@ breaking the Gauss-Markov assumptions."</span><span class="p& <p>For each of the three approaches I take the model that has been fit on my sample and apply it to the full population of 53,490 to estimate each diamond’s price, and add them up to get the average price I can expect for <em>all</em> my diamonds (remembering that’s the point of the exercise). Then, I’m looking at the answers, and comparing that result to the true average price. Then I do this again with a different sample of 1,000 diamonds; and plot the overall results:</p> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0204-model-comparison-density.svg" width="100%"><img src="https:/freerangestats.info/img/0204-model-comparison-density.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0204-model-comparison-density.svg" width="100%"><img src="https://freerangestats.info/img/0204-model-comparison-density.png" width="100%" /></object> <p>Well, I sort of gave this away at the beginning; but the model with the <em>untransformed</em> price variable in the sample performs much better. Basically because it’s unbiased. All that heteroskedasticity and non-normality and a bit of curve doesn’t matter; if fixing them means you bias the total result substantially downwards.</p> @@ -2035,7 +2192,7 @@ breaking the Gauss-Markov assumptions."</span><span class="p& <li>The chart on the right compares the two models, with untransformed and transformed price variables. We see that given the same sample of 1,000 diamonds, one method is much better than the other.</li> </ul> -<object type="image/svg+xml" data="https:/freerangestats.info/img/0204-model-comparison-scatter.svg" width="100%"><img src="https:/freerangestats.info/img/0204-model-comparison-scatter.png" width="100%" /></object> +<object type="image/svg+xml" data="https://freerangestats.info/img/0204-model-comparison-scatter.svg" width="100%"><img src="https://freerangestats.info/img/0204-model-comparison-scatter.png" width="100%" /></object> <p>Of course as soon as you think about what’s happening here it’s obvious. With the log-transformed price variable, when I predict new values for the out-of-sample diamonds on the log scale, those are unbiased estimates <em>of the logarithm of the unobserved diamonds’ prices</em>. When I say e to the power of those estimates, I get biased estimates of the price on their original scale. It’s actually exactly as though I took the geometric mean of the sample - which in a right-skewed variable will be on average lower than the arithmetic mean - and tried to scale it up to the populatio level just by multiplying it by N/n.</p> @@ -2131,446 +2288,10 @@ breaking the Gauss-Markov assumptions."</span><span class="p& <p>And I have other stuff to do so OK, that’s all for now.</p> - Sun, 30 Jul 2023 00:00:00 +1000 + Sun, 30 Jul 2023 00:00:00 +1100 https://freerangestats.info/blog/2023/07/30/log-transforms https://freerangestats.info/blog/2023/07/30/log-transforms - - Weighted versus unweighted percentiles by @ellis2013nz - <p>This interesting paper came out recently: <a href="https://www.demographic-research.org/volumes/vol48/26/">A test of the predictive validity of relative versus absolute income for self-reported health and well-being in the United States</a>, by David Brady, Michaela Curran and Richard Carpiano. It uses a large sample of longitudinal data to exploit between-individual and within-individual (across time) variation in absolute and relative income to explore which one is more associated with well-being. Seems that in the USA, relative income is more important.</p> - -<p>“Relative income” here is defined as your position (percentile rank) in the national distribution of incomes in a particular year. The average relative income should be 50 by definition. I noticed that the mean percentile reported in table A.1 was 57, not 50, which led to this <a href="https://twitter.com/ellis2013nz/status/1671996132757757953">slightly confusing (for me, anyway) exchange on Twitter</a>. It sparked my interest in a broader question, not really related to the paper itself - what is the relationship between weighted and unweighted percentile rank when using survey data?</p> - -<h2 id="weighted-percentile-rank">Weighted percentile rank</h2> - -<p>I was surprised to find (well actually, I had discovered this before, so really should say to be “reminded”) that there doesn’t seem to be a weighted version of dplyr’s <code class="language-plaintext highlighter-rouge">percent_rank()</code> function in dplyr or other R packages. There are several packages with functions that will estimate quantiles from weighted data, but if you want to then turn the original vector of continuous variables into percentiles you need to take those quantiles and <code class="language-plaintext highlighter-rouge">cut</code> the original variable using them as breaks.</p> - -<p>I started by making my own convenience function to do this. To calculate the breaks, I am using the <code class="language-plaintext highlighter-rouge">wtd.quantile</code> function from Mark Hancock’s <code class="language-plaintext highlighter-rouge">reldist</code> package, which was notably faster than its competition (more on this later).</p> - -<p><em>Post continues after R code</em></p> - -<figure class="highlight"><pre><code class="language-r" data-lang="r"><span class="n">library</span><span class="p">(</span><span class="n">DescTools</span><span class="p">)</span><span class="w"> -</span><span class="n">library</span><span class="p">(</span><span class="n">microbenchmark</span><span class="p">)</span><span class="w"> -</span><span class="n">library</span><span class="p">(</span><span class="n">modi</span><span class="p">)</span><span class="w"> -</span><span class="n">library</span><span class="p">(</span><span class="n">reldist</span><span class="p">)</span><span class="w"> -</span><span class="n">library</span><span class="p">(</span><span class="n">sampling</span><span class="p">)</span><span class="w"> -</span><span class="n">library</span><span class="p">(</span><span class="n">tidyverse</span><span class="p">)</span><span class="w"> -</span><span class="n">library</span><span class="p">(</span><span class="n">glue</span><span class="p">)</span><span class="w"> -</span><span class="n">library</span><span class="p">(</span><span class="n">kableExtra</span><span class="p">)</span><span class="w"> - -</span><span class="cd">#' Weighted percent rank</span><span class="w"> -</span><span class="cd">#' </span><span class="w"> -</span><span class="cd">#' @param x a vector</span><span class="w"> -</span><span class="cd">#' @param weights weights eg survey or frequency weights</span><span class="w"> -</span><span class="cd">#' @param q quantiles to compute as the basis for cutting x, </span><span class="w"> -</span><span class="cd">#' passed through to reldist::wtd.quantile </span><span class="w"> -</span><span class="cd">#' @details</span><span class="w"> -</span><span class="cd">#' This is a bit of a hack, a homemande version of dplyr::percent_rank</span><span class="w"> -</span><span class="cd">#' I haven't thought through things like NAs, ties, etc</span><span class="w"> -</span><span class="cd">#' @importFrom reldist wtd.quantile</span><span class="w"> -</span><span class="cd">#' @export</span><span class="w"> -</span><span class="n">wt_percent_rank</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="k">function</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> - </span><span class="n">weights</span><span class="p">,</span><span class="w"> - </span><span class="n">q</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="m">0</span><span class="o">:</span><span class="m">1000</span><span class="p">)</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="m">1000</span><span class="p">){</span><span class="w"> - </span><span class="c1"># fastest method to calculate breaks</span><span class="w"> - </span><span class="n">breaks</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">reldist</span><span class="o">::</span><span class="n">wtd.quantile</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">weight</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">weights</span><span class="p">,</span><span class="w"> </span><span class="n">q</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">q</span><span class="p">)</span><span class="w"> - </span><span class="c1"># problem sometimes with ties in the breaks. This forces a way through:</span><span class="w"> - </span><span class="n">breaks</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">unique</span><span class="p">(</span><span class="n">breaks</span><span class="p">)</span><span class="w"> - </span><span class="n">breaks</span><span class="p">[</span><span class="m">1</span><span class="p">]</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="o">-</span><span class="kc">Inf</span><span class="w"> - </span><span class="c1"># cut the data where the quantile breaks are:</span><span class="w"> - </span><span class="n">y</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">cut</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">breaks</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">breaks</span><span class="p">,</span><span class="w"> </span><span class="n">labels</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">FALSE</span><span class="p">)</span><span class="w"> </span><span class="c1"># labels = FALSE for speed</span><span class="w"> - - </span><span class="c1"># convert this into a number from 0 to 1</span><span class="w"> - </span><span class="n">y</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="nf">as.numeric</span><span class="p">(</span><span class="n">y</span><span class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="m">1</span><span class="w"> - </span><span class="n">y</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="nf">max</span><span class="p">(</span><span class="n">y</span><span class="p">)</span><span class="w"> - </span><span class="nf">return</span><span class="p">(</span><span class="n">y</span><span class="p">)</span><span class="w"> -</span><span class="p">}</span><span class="w"> - -</span><span class="c1"># for unweighted data, wt_percent_rank should give identical</span><span class="w"> -</span><span class="c1"># results to percent_rank</span><span class="w"> -</span><span class="n">x</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">rnorm</span><span class="p">(</span><span class="m">1000</span><span class="p">)</span><span class="w"> -</span><span class="n">tibble</span><span class="p">(</span><span class="n">homemade</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">wt_percent_rank</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">weights</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">rep</span><span class="p">(</span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="nf">length</span><span class="p">(</span><span class="n">x</span><span class="p">))),</span><span class="w"> - </span><span class="n">dplyr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">percent_rank</span><span class="p">(</span><span class="n">x</span><span class="p">))</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">mutate</span><span class="p">(</span><span class="n">difference</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">homemade</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">dplyr</span><span class="p">)</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">arrange</span><span class="p">(</span><span class="n">desc</span><span class="p">(</span><span class="nf">abs</span><span class="p">(</span><span class="n">difference</span><span class="p">)))</span></code></pre></figure> - -<p>That little test of whether I get the same result as <code class="language-plaintext highlighter-rouge">dplyr::percent_rank()</code> with unweighted data turns out ok:</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> homemade dplyr difference - &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; - 1 0.189 0.189 0 - 2 0.557 0.557 0 - 3 0.869 0.869 0 - 4 0.944 0.944 0 - 5 0.704 0.704 0 - 6 0.448 0.448 0 - 7 0.411 0.411 0 - 8 0.121 0.121 0 - 9 0.584 0.584 0 -10 0.307 0.307 0 -# ℹ 990 more rows -</code></pre></div></div> - -<h2 id="simulating-a-population-and-drawing-a-sample">Simulating a population and drawing a sample</h2> - -<p>So to actually explore the difference between weighted and unweighted percentiles, I wanted to simulate a complex survey with unequal probabilities of observations being in the sample, and a skewed variable (income a good example) that was also related, directly or indirectly, to the probability of an observation being in the sample. I did this by creating a educatin variable with 7 different levels, and said</p> -<ul> - <li>the higher the education the higher the mean income</li> - <li>the higher the education, the lower the chance of being sampled (or, which is effectively the same for my purpose, the lower the chance of completing a response to the survey)</li> -</ul> - -<p>Once I have drawn the sample I am going to use standard post-stratification methods to calculate weights that mean the points in the sample between them represent the original population fully.</p> - -<p>Whether or not this sampling or non-response effect is realistic doesn’t matter much. Obviously in reality things will be much more complicated. I just wanted something where survey weights were going to vary in a known way (that could be inferred from the data) that correlates with the variable of interest.</p> - -<p>Actual income is simulated as coming from a log-normal distribution.</p> - -<p><em>Post continues after R code</em></p> - -<figure class="highlight"><pre><code class="language-r" data-lang="r"><span class="c1">#----------------define population-----------------</span><span class="w"> -</span><span class="n">n</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="m">1e4</span><span class="w"> -</span><span class="n">N</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="m">1e7</span><span class="w"> -</span><span class="n">set.seed</span><span class="p">(</span><span class="m">123</span><span class="p">)</span><span class="w"> -</span><span class="n">population</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">tibble</span><span class="p">(</span><span class="n">educ</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sample</span><span class="p">(</span><span class="m">1</span><span class="o">:</span><span class="m">7</span><span class="p">,</span><span class="w"> </span><span class="n">N</span><span class="p">,</span><span class="w"> </span><span class="n">replace</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">))</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">mutate</span><span class="p">(</span><span class="n">income</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">exp</span><span class="p">(</span><span class="n">rnorm</span><span class="p">(</span><span class="n">N</span><span class="p">,</span><span class="w"> </span><span class="m">9</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">educ</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="m">5</span><span class="p">,</span><span class="w"> </span><span class="m">1</span><span class="p">)),</span><span class="w"> - </span><span class="n">prob_sample</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="m">10</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">educ</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">N</span><span class="p">)</span><span class="w"> - -</span><span class="c1"># marginal totals we will use later for weighting</span><span class="w"> -</span><span class="n">marginal_total</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">population</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">count</span><span class="p">(</span><span class="n">educ</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Freq"</span><span class="p">)</span><span class="w"> - -</span><span class="c1"># check the income is indeed higher for people in higher education groups:</span><span class="w"> -</span><span class="n">population</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">group_by</span><span class="p">(</span><span class="n">educ</span><span class="p">)</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">summarise</span><span class="p">(</span><span class="n">mean</span><span class="p">(</span><span class="n">income</span><span class="p">))</span></code></pre></figure> - -<p>This is what the mean income looks like for my different education levels:</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> educ `mean(income)` - &lt;int&gt; &lt;dbl&gt; -1 1 16307. -2 2 19982. -3 3 24369. -4 4 29761. -5 5 36302. -6 6 44355. -7 7 54212. -</code></pre></div></div> -<p>OK, now I need to draw a sample. I originally did this with <code class="language-plaintext highlighter-rouge">dplyr::slice_sample()</code> but found it slow. The <code class="language-plaintext highlighter-rouge">strata()</code> function in Yves Tillé and Alina Matei’s <code class="language-plaintext highlighter-rouge">sampling</code> package is about twice as fast (benchmarking later in this post) so I used that instead. The code below draws that sample, does the post-stratification weighting (by simply joining the sample to the marginal totals data frame calculated earlier and creating weights forced to add up to those marginal totals) and then calculates the percentile ranks (both weighted and unweighted).</p> - -<p>BTW, the reason I was particularly attuned to speed in this overall exercise is that I had heard that Stata was very slow in calculating the weighted percentile ranks. But apart from drawing the sample, everything I was doing in R turned out to be very fast; even calculating percentile ranks on 200,000 observations grouped by year (so similar to the actual data in the original paper) only takes a few seconds.</p> - -<p><em>Post continues after R code</em></p> - -<figure class="highlight"><pre><code class="language-r" data-lang="r"><span class="c1">#---------------draw a sample------------------------</span><span class="w"> -</span><span class="c1"># Sampling, with unequal probabilities</span><span class="w"> -</span><span class="c1"># the slow part here is actually the sampling with unequal probabilities. Not</span><span class="w"> -</span><span class="c1"># sure why so slow. See benchmarking later for why we use this strata()</span><span class="w"> -</span><span class="c1"># function.</span><span class="w"> -</span><span class="n">sample_rows</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">sampling</span><span class="o">::</span><span class="n">strata</span><span class="p">(</span><span class="n">population</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">n</span><span class="p">,</span><span class="w"> - </span><span class="n">pik</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">population</span><span class="o">$</span><span class="n">prob_sample</span><span class="p">,</span><span class="w"> </span><span class="n">method</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"systematic"</span><span class="p">)</span><span class="w"> - -</span><span class="n">sample</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">population</span><span class="p">[</span><span class="n">sample_rows</span><span class="o">$</span><span class="n">ID_unit</span><span class="p">,</span><span class="w"> </span><span class="p">]</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="c1"># join with marginal totals and calculate weights necessary</span><span class="w"> - </span><span class="c1"># so weights add up to the marginal totals</span><span class="w"> - </span><span class="n">left_join</span><span class="p">(</span><span class="n">marginal_total</span><span class="p">,</span><span class="w"> </span><span class="n">by</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"educ"</span><span class="p">)</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">group_by</span><span class="p">(</span><span class="n">educ</span><span class="p">)</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">mutate</span><span class="p">(</span><span class="n">wt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Freq</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">n</span><span class="p">())</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">ungroup</span><span class="p">()</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="c1"># calculate unweighted and weighted percentile ranks</span><span class="w"> - </span><span class="n">mutate</span><span class="p">(</span><span class="n">uw_perc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">percent_rank</span><span class="p">(</span><span class="n">income</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="m">100</span><span class="p">,</span><span class="w"> - </span><span class="n">w_perc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">wt_percent_rank</span><span class="p">(</span><span class="n">income</span><span class="p">,</span><span class="w"> </span><span class="n">weights</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">wt</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="m">100</span><span class="p">,</span><span class="w"> - </span><span class="n">difference</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">w_perc</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">uw_perc</span><span class="p">)</span><span class="w"> - -</span><span class="c1"># check that the weights add up to the population number</span><span class="w"> -</span><span class="n">stopifnot</span><span class="p">(</span><span class="nf">sum</span><span class="p">(</span><span class="n">sample</span><span class="o">$</span><span class="n">wt</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">N</span><span class="p">)</span><span class="w"> - -</span><span class="c1"># visual check that the sum of weights in each category</span><span class="w"> -</span><span class="c1"># of educ matches the population totals (they do):</span><span class="w"> -</span><span class="n">count</span><span class="p">(</span><span class="n">sample</span><span class="p">,</span><span class="w"> </span><span class="n">educ</span><span class="p">,</span><span class="w"> </span><span class="n">wt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">wt</span><span class="p">,</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Sum of weights"</span><span class="p">)</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">left_join</span><span class="p">(</span><span class="n">marginal_total</span><span class="p">,</span><span class="w"> </span><span class="n">by</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"educ"</span><span class="p">)</span></code></pre></figure> - -<h2 id="comparing-the-weighted-and-unweighted-percentiles">Comparing the weighted and unweighted percentiles</h2> - -<p>OK, time to do the actual comparisons. Here’s a scatter plot of the weighted and unweighted percentiles. Note the very very high correlation - 0.999! - but also the visually clear slight curvature:</p> - -<object type="image/svg+xml" data="https:/freerangestats.info/img/0250-scatter1.svg" width="90%"><img src="https:/freerangestats.info/img/0250-scatter1.png" width="90%" /></object> - -<p>That curvature is more obvious if we plot the difference between the two estimates:</p> - -<object type="image/svg+xml" data="https:/freerangestats.info/img/0250-scatter2.svg" width="90%"><img src="https:/freerangestats.info/img/0250-scatter2.png" width="90%" /></object> - -<p>Why do we get this pattern? It’s simple enough if you consider three people - at the bottom, the top and the middle of the sample’s income distribution. For the person at the bottom, whether we are weighting the observations or not, we know that this person has the lowest observed income. They’re in the bottom percentile either way, and the weights of all the people above them simply don’t matter. This applies in reverse for the person at the top. So the weighted and unweighted percentiles are identical in these extremes.</p> - -<p>For the person in the middle however it does matter. We look at the unweighted sample and say “right, you’re bang in the middle, you’re the 50th percentile”. But then we look at the weights and say “hold on, the half of the sample that has incomes below you has relatively low weights (because, in my simulation, people with lower education were more likely to be in the survey so get lower weights to compensate). So while it looks like you’ve got higher income than 50% of people, that 50% of the sample actually only represents 45% of the population.” So we get a material difference between weighted and unweighted percentile estimates in the middle, but not at the ends, of the distribution.</p> - -<p>There’s nothing inherent that says the weighted percentiles in the middle will always be lower than unweighted as in my simulation - that’s only the case because the lower income people on average had lower weights. With other sampling designs or non-response rates, this could be reversed. But however the weights work out, there will be more discrepancy between the weighted and unweighted percentiles in the middle of the distribution than the ends.</p> - -<p>Here’s the simple code for drawing those plots.</p> - -<p><em>Post continues after R code</em></p> - -<figure class="highlight"><pre><code class="language-r" data-lang="r"><span class="c1">#-----------visual comparisons-------------</span><span class="w"> - -</span><span class="n">the_title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">str_wrap</span><span class="p">(</span><span class="s2">"Comparison between weighted and unweighted percentiles - in a simulated right-skewed variable from a complex - survey."</span><span class="p">,</span><span class="w"> </span><span class="m">80</span><span class="p">)</span><span class="w"> - -</span><span class="c1"># it *looks* like the unweighted and weighted percentils are indistinguishable:</span><span class="w"> -</span><span class="n">p1</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">ggplot</span><span class="p">(</span><span class="n">sample</span><span class="p">,</span><span class="w"> </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">uw_perc</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">w_perc</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="w"> </span><span class="o">+</span><span class="w"> - </span><span class="n">geom_abline</span><span class="p">(</span><span class="n">slope</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">1</span><span class="p">,</span><span class="w"> </span><span class="n">intercept</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0</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="s2">"steelblue"</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> - </span><span class="n">labs</span><span class="p">(</span><span class="n">title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">the_title</span><span class="p">,</span><span class="w"> - </span><span class="n">subtitle</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">str_squish</span><span class="p">(</span><span class="n">glue</span><span class="p">(</span><span class="s2">"Correlation = - {round(cor(sample$uw_perc, sample$w_perc), 3)}. - Blue line shows equality."</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="s2">"Unweighted percentile"</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="s2">"Weighted percentile"</span><span class="p">)</span><span class="w"> -</span><span class="c1"># Note this line is slightly curved.</span><span class="w"> -</span><span class="n">print</span><span class="p">(</span><span class="n">p1</span><span class="p">)</span><span class="w"> - -</span><span class="c1"># at the higher incomes and lower incomes there is no difference -</span><span class="w"> -</span><span class="c1"># we know you are the richest or the poorest. But for people in the</span><span class="w"> -</span><span class="c1"># middle it makes a real difference:</span><span class="w"> -</span><span class="n">p2</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">ggplot</span><span class="p">(</span><span class="n">sample</span><span class="p">,</span><span class="w"> </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">uw_perc</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">difference</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="o">=</span><span class="w"> </span><span class="m">0.11</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> - </span><span class="n">labs</span><span class="p">(</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Unweighted percentile"</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="s2">"Weighted minus\nunweighted percentile"</span><span class="p">,</span><span class="w"> - </span><span class="n">title</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">the_title</span><span class="p">)</span><span class="w"> -</span><span class="n">print</span><span class="p">(</span><span class="n">p2</span><span class="p">)</span></code></pre></figure> - -<p>A couple of other interesting observations. The unweighted mean of the unweighted percentile is 50; and so is the weighted mean of the weighted percentile. But the unweighted mean of the weighted percentile is low - about 47 - and the weighted mean of the unweighted percentile is high - about 53. This all makes sense based on the above reasoning.</p> - -<p>Here are some summary stats on the sample:</p> - -<table class="table" style="margin-left: auto; margin-right: auto;"> - <thead> - <tr> - <th style="text-align:right;"> educ </th> - <th style="text-align:right;"> mean(wt) </th> - <th style="text-align:right;"> mean(income) </th> - <th style="text-align:right;"> mean(uw_perc) </th> - <th style="text-align:right;"> mean(w_perc) </th> - <th style="text-align:right;"> n() </th> - <th style="text-align:right;"> sum(wt) </th> - </tr> - </thead> -<tbody> - <tr> - <td style="text-align:right;"> 1 </td> - <td style="text-align:right;"> 690.4403 </td> - <td style="text-align:right;"> 16980.99 </td> - <td style="text-align:right;"> 37.66090 </td> - <td style="text-align:right;"> 34.70156 </td> - <td style="text-align:right;"> 2067 </td> - <td style="text-align:right;"> 1427140 </td> - </tr> - <tr> - <td style="text-align:right;"> 2 </td> - <td style="text-align:right;"> 762.0085 </td> - <td style="text-align:right;"> 21147.84 </td> - <td style="text-align:right;"> 42.89254 </td> - <td style="text-align:right;"> 39.78324 </td> - <td style="text-align:right;"> 1873 </td> - <td style="text-align:right;"> 1427242 </td> - </tr> - <tr> - <td style="text-align:right;"> 3 </td> - <td style="text-align:right;"> 842.4838 </td> - <td style="text-align:right;"> 25146.92 </td> - <td style="text-align:right;"> 48.18424 </td> - <td style="text-align:right;"> 45.01756 </td> - <td style="text-align:right;"> 1697 </td> - <td style="text-align:right;"> 1429695 </td> - </tr> - <tr> - <td style="text-align:right;"> 4 </td> - <td style="text-align:right;"> 989.3329 </td> - <td style="text-align:right;"> 31281.51 </td> - <td style="text-align:right;"> 54.45006 </td> - <td style="text-align:right;"> 51.25665 </td> - <td style="text-align:right;"> 1445 </td> - <td style="text-align:right;"> 1429586 </td> - </tr> - <tr> - <td style="text-align:right;"> 5 </td> - <td style="text-align:right;"> 1175.7494 </td> - <td style="text-align:right;"> 35873.40 </td> - <td style="text-align:right;"> 58.81986 </td> - <td style="text-align:right;"> 55.67827 </td> - <td style="text-align:right;"> 1217 </td> - <td style="text-align:right;"> 1430887 </td> - </tr> - <tr> - <td style="text-align:right;"> 6 </td> - <td style="text-align:right;"> 1500.4732 </td> - <td style="text-align:right;"> 42648.17 </td> - <td style="text-align:right;"> 62.77626 </td> - <td style="text-align:right;"> 59.67482 </td> - <td style="text-align:right;"> 951 </td> - <td style="text-align:right;"> 1426950 </td> - </tr> - <tr> - <td style="text-align:right;"> 7 </td> - <td style="text-align:right;"> 1904.6667 </td> - <td style="text-align:right;"> 50135.01 </td> - <td style="text-align:right;"> 66.77896 </td> - <td style="text-align:right;"> 63.82556 </td> - <td style="text-align:right;"> 750 </td> - <td style="text-align:right;"> 1428500 </td> - </tr> -</tbody> -</table> - -<p>And the code to make those summary stats and compare the different means of the different percentiles.</p> - -<p><em>Post continues after R code</em></p> - -<figure class="highlight"><pre><code class="language-r" data-lang="r"><span class="c1"># check that the average weights are higher for the higher</span><span class="w"> -</span><span class="c1"># education groups, as we wanted it to be</span><span class="w"> -</span><span class="n">sample</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">group_by</span><span class="p">(</span><span class="n">educ</span><span class="p">)</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">summarise</span><span class="p">(</span><span class="n">mean</span><span class="p">(</span><span class="n">wt</span><span class="p">),</span><span class="w"> - </span><span class="n">mean</span><span class="p">(</span><span class="n">income</span><span class="p">),</span><span class="w"> - </span><span class="n">mean</span><span class="p">(</span><span class="n">uw_perc</span><span class="p">),</span><span class="w"> - </span><span class="n">mean</span><span class="p">(</span><span class="n">w_perc</span><span class="p">),</span><span class="w"> - </span><span class="n">n</span><span class="p">(),</span><span class="w"> - </span><span class="nf">sum</span><span class="p">(</span><span class="n">wt</span><span class="p">))</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">kable</span><span class="p">()</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">kable_styling</span><span class="p">()</span><span class="w"> - -</span><span class="c1"># unweighted mean of the unweighted percentile is 50:</span><span class="w"> -</span><span class="n">mean</span><span class="p">(</span><span class="n">sample</span><span class="o">$</span><span class="n">uw_perc</span><span class="p">)</span><span class="w"> -</span><span class="c1"># but unweighted mean of the weighted percentile isn't!</span><span class="w"> -</span><span class="n">mean</span><span class="p">(</span><span class="n">sample</span><span class="o">$</span><span class="n">w_perc</span><span class="p">)</span><span class="w"> - -</span><span class="c1"># Weighted mean of the weighted percentile is 50:</span><span class="w"> -</span><span class="n">weighted.mean</span><span class="p">(</span><span class="n">sample</span><span class="o">$</span><span class="n">w_perc</span><span class="p">,</span><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sample</span><span class="o">$</span><span class="n">wt</span><span class="p">)</span><span class="w"> -</span><span class="c1"># but weighted mean of the unweighted percentile isn't!</span><span class="w"> -</span><span class="n">weighted.mean</span><span class="p">(</span><span class="n">sample</span><span class="o">$</span><span class="n">uw_perc</span><span class="p">,</span><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sample</span><span class="o">$</span><span class="n">wt</span><span class="p">)</span></code></pre></figure> - -<h2 id="some-speed-benchmarking">Some speed benchmarking</h2> - -<p>Finally, here are some speed tests that were behind some of the design choices above. As it turns out, none of it matters very much. As mentioned above, R can calculate the weighted percentiles for hundreds of thousands of observations grouped by year in only a couple of seconds, so I didn’t need to worry about that. But in case it matters, here’s my core conclusions from running the benchmarking below</p> - -<ul> - <li><code class="language-plaintext highlighter-rouge">reldist::wtd.quantile</code> is about twice as fast as <code class="language-plaintext highlighter-rouge">Desctools::Quantile</code> in calculating weighted quantiles and gives near-identical results.</li> - <li>setting <code class="language-plaintext highlighter-rouge">labels = FALSE</code> in a call to <code class="language-plaintext highlighter-rouge">cut()</code> makes the function about four times as fast</li> - <li><code class="language-plaintext highlighter-rouge">dplyr::slice_sample</code> takes about the same time to do a sample with unequal probability of selection as a home made function using <code class="language-plaintext highlighter-rouge">base::sample</code>, but <code class="language-plaintext highlighter-rouge">sampling:strata</code> function is about twice as fast.</li> - <li>my final homemade function <code class="language-plaintext highlighter-rouge">wt_percent_rank</code> for weighted percentile ranks is about four times slower than the unweighted <code class="language-plaintext highlighter-rouge">dplyr::percent_rank</code>, but is still plenty fast enough (&lt;5 seconds for 200,000 observations).</li> -</ul> - -<p>Benchmarking code:</p> - -<figure class="highlight"><pre><code class="language-r" data-lang="r"><span class="c1">#===================speed tests==================</span><span class="w"> - -</span><span class="c1"># Some tests done here behind some of the decisions of what is actually used in</span><span class="w"> -</span><span class="c1"># the script above.</span><span class="w"> - -</span><span class="c1">#---------------calculating the breaks at various points in quantile---------</span><span class="w"> -</span><span class="n">set.seed</span><span class="p">(</span><span class="m">321</span><span class="p">)</span><span class="w"> -</span><span class="n">n</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="m">100000</span><span class="w"> -</span><span class="n">x</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="nf">exp</span><span class="p">(</span><span class="n">rnorm</span><span class="p">(</span><span class="n">n</span><span class="p">))</span><span class="w"> -</span><span class="n">w</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="nf">exp</span><span class="p">(</span><span class="n">rnorm</span><span class="p">(</span><span class="n">n</span><span class="p">))</span><span class="w"> -</span><span class="n">p</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="m">0</span><span class="o">:</span><span class="m">1000</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="m">1000</span><span class="w"> </span><span class="c1"># percentiles to use in benchmarking qunatile functions</span><span class="w"> - - -</span><span class="c1"># note modi::weighted.quantile(x, w = w, prob = 0.5) only works with a scalar value of prob</span><span class="w"> -</span><span class="n">microbenchmark</span><span class="p">(</span><span class="w"> - </span><span class="n">unweighted</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">quantile</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">probs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p</span><span class="p">),</span><span class="w"> - </span><span class="n">Desctools</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DescTools</span><span class="o">::</span><span class="n">Quantile</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">weights</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">probs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p</span><span class="p">),</span><span class="w"> - </span><span class="n">reldist</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reldist</span><span class="o">::</span><span class="n">wtd.quantile</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">q</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p</span><span class="p">,</span><span class="w"> </span><span class="n">weight</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">w</span><span class="p">)</span><span class="w"> -</span><span class="p">)</span><span class="w"> -</span><span class="c1"># reldist is notably faster than DescTools in fact it is nearly as fast as</span><span class="w"> -</span><span class="c1"># the unweighted base r calculation</span><span class="w"> - -</span><span class="c1"># the results are a tiny bit different but usually not:</span><span class="w"> -</span><span class="n">tibble</span><span class="p">(</span><span class="w"> - </span><span class="n">dt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DescTools</span><span class="o">::</span><span class="n">Quantile</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">weights</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">probs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p</span><span class="p">),</span><span class="w"> - </span><span class="n">rd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reldist</span><span class="o">::</span><span class="n">wtd.quantile</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">q</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p</span><span class="p">,</span><span class="w"> </span><span class="n">weight</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">w</span><span class="p">)</span><span class="w"> -</span><span class="p">)</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">mutate</span><span class="p">(</span><span class="n">diff</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rd</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">dt</span><span class="p">)</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">arrange</span><span class="p">(</span><span class="n">desc</span><span class="p">(</span><span class="nf">abs</span><span class="p">(</span><span class="n">diff</span><span class="p">)))</span><span class="w"> - -</span><span class="c1">#-------------------actually assigning the percentiles to the original data-----------</span><span class="w"> -</span><span class="n">breaks</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">wtd.quantile</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">q</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p</span><span class="p">,</span><span class="w"> </span><span class="n">weight</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">w</span><span class="p">)</span><span class="w"> - -</span><span class="n">microbenchmark</span><span class="p">(</span><span class="w"> - </span><span class="n">cut</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">breaks</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">breaks</span><span class="p">),</span><span class="w"> - </span><span class="n">cut</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">breaks</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">breaks</span><span class="p">,</span><span class="w"> </span><span class="n">labels</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">FALSE</span><span class="p">)</span><span class="w"> -</span><span class="p">)</span><span class="w"> -</span><span class="c1"># much faster (about 4x) with labels = FALSE</span><span class="w"> - - -</span><span class="c1">#-------------------sampling with unequal probabilities---------</span><span class="w"> -</span><span class="c1"># sampling a bunch of rows at random with unequal probabilities using</span><span class="w"> -</span><span class="c1"># slice_sample is surprisinglyu slow. Is there a better way?</span><span class="w"> -</span><span class="c1"># try my home made sampler, and also one from the sampling package</span><span class="w"> - -</span><span class="n">eg_d</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">tibble</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">x</span><span class="p">,</span><span class="w"> - </span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">w</span><span class="w"> -</span><span class="p">)</span><span class="w"> - -</span><span class="n">my_sampler</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="k">function</span><span class="p">(</span><span class="n">d</span><span class="p">,</span><span class="w"> </span><span class="n">n</span><span class="p">,</span><span class="w"> </span><span class="n">weight_by</span><span class="p">){</span><span class="w"> - </span><span class="n">id</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="m">1</span><span class="o">:</span><span class="n">nrow</span><span class="p">(</span><span class="n">d</span><span class="p">)</span><span class="w"> - </span><span class="n">rows</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">sample</span><span class="p">(</span><span class="n">id</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">n</span><span class="p">,</span><span class="w"> </span><span class="n">prob</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">weight_by</span><span class="p">)</span><span class="w"> - </span><span class="nf">return</span><span class="p">(</span><span class="n">d</span><span class="p">[</span><span class="n">rows</span><span class="p">,</span><span class="w"> </span><span class="p">])</span><span class="w"> -</span><span class="p">}</span><span class="w"> - - -</span><span class="n">this_n</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="m">1000</span><span class="w"> -</span><span class="n">microbenchmark</span><span class="p">(</span><span class="w"> - </span><span class="n">unweighted</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">slice_sample</span><span class="p">(</span><span class="n">eg_d</span><span class="p">,</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">this_n</span><span class="p">),</span><span class="w"> - </span><span class="n">`weighted dplyr`</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">slice_sample</span><span class="p">(</span><span class="n">eg_d</span><span class="p">,</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">this_n</span><span class="p">,</span><span class="w"> </span><span class="n">weight_by</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">w</span><span class="p">),</span><span class="w"> - </span><span class="n">`weighted homemade`</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">my_sampler</span><span class="p">(</span><span class="n">eg_d</span><span class="p">,</span><span class="w"> </span><span class="n">n</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">this_n</span><span class="p">,</span><span class="w"> </span><span class="n">weight_by</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">eg_d</span><span class="o">$</span><span class="n">w</span><span class="p">),</span><span class="w"> - </span><span class="n">`sampling package`</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">eg_d</span><span class="p">[</span><span class="n">strata</span><span class="p">(</span><span class="n">eg_d</span><span class="p">,</span><span class="w"> - </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">this_n</span><span class="p">,</span><span class="w"> - </span><span class="n">pik</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">eg_d</span><span class="o">$</span><span class="n">w</span><span class="p">,</span><span class="w"> - </span><span class="n">method</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"systematic"</span><span class="p">)</span><span class="o">$</span><span class="n">ID_unit</span><span class="p">,</span><span class="w"> </span><span class="p">]</span><span class="w"> -</span><span class="p">)</span><span class="w"> -</span><span class="c1"># times for weighted dplyr and home made funcionts are very similar </span><span class="w"> -</span><span class="c1"># for this_n of 100, 1000, 10000</span><span class="w"> -</span><span class="c1"># the sampling::strata() function is about twice as fast</span><span class="w"> -</span><span class="c1"># unweighted sampling is much much faster</span><span class="w"> - -</span><span class="c1">#---------comparing speed of unweighted and weighted percentile calculation------</span><span class="w"> -</span><span class="n">microbenchmark</span><span class="p">(</span><span class="w"> - </span><span class="n">wt_percent_rank</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">x</span><span class="p">,</span><span class="w"> </span><span class="n">weights</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">w</span><span class="p">,</span><span class="w"> </span><span class="n">probs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p</span><span class="p">),</span><span class="w"> - </span><span class="n">percent_rank</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">x</span><span class="p">)</span><span class="w"> -</span><span class="p">)</span><span class="w"> -</span><span class="c1"># Note that the weighted version is 3-4 times slower even after</span><span class="w"> -</span><span class="c1"># not using labels for cut and using the quickest quantile</span><span class="w"> -</span><span class="c1"># calculation we have.</span><span class="w"> - - -</span><span class="c1">#----------percentile rank for large sample-----------</span><span class="w"> -</span><span class="c1"># simulate similar size data to that which is in</span><span class="w"> -</span><span class="c1"># https://www.demographic-research.org/volumes/vol48/26/48-26.pdf</span><span class="w"> -</span><span class="n">psid_eg</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="n">tibble</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="nf">exp</span><span class="p">(</span><span class="n">rnorm</span><span class="p">(</span><span class="m">200000</span><span class="p">,</span><span class="w"> </span><span class="m">8</span><span class="p">,</span><span class="w"> </span><span class="m">1</span><span class="p">)),</span><span class="w"> - </span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">exp</span><span class="p">(</span><span class="n">rnorm</span><span class="p">(</span><span class="m">200000</span><span class="p">)),</span><span class="w"> - </span><span class="n">year</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sample</span><span class="p">(</span><span class="m">1</span><span class="o">:</span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">200000</span><span class="p">,</span><span class="w"> </span><span class="n">replace</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">))</span><span class="w"> -</span><span class="p">)</span><span class="w"> - -</span><span class="n">system.time</span><span class="p">({</span><span class="w"> - </span><span class="n">psid_eg</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">group_by</span><span class="p">(</span><span class="n">year</span><span class="p">)</span><span class="w"> </span><span class="o">|&gt;</span><span class="w"> - </span><span class="n">mutate</span><span class="p">(</span><span class="n">wpr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">wt_percent_rank</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">weights</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">w</span><span class="p">))</span><span class="w"> -</span><span class="p">})</span><span class="w"> -</span><span class="c1"># &lt; 5 seconds</span></code></pre></figure> - -<p>That’s all, cheerio.</p> - -<h3 id="versioning-of-this-blog-post">Versioning of this blog post</h3> - -<p>An earlier version of this post had some speculation about the original referenced paper without me adequately checking what was actually happening. As it’s not relevant for my main point that paragraph has been removed.</p> - - Sat, 24 Jun 2023 00:00:00 +1000 - https://freerangestats.info/blog/2023/06/24/weighted-percentiles - https://freerangestats.info/blog/2023/06/24/weighted-percentiles - - diff --git a/feed.xml b/feed.xml index 03644d2e3..6e4d94bf7 100644 --- a/feed.xml +++ b/feed.xml @@ -6,6 +6,22 @@ https://freerangestats.info + + Polar-centred maps + + + + I draw maps of the largest settlements closest to the north pole and to the south pole, based on an idea by 'Brilliant Maps'. + + + Sat, 24 Aug 2024 00:00:00 +1100 + https://freerangestats.info/blog/2024/08/24/polar-maps + https://freerangestats.info/blog/2024/08/24/polar-maps + + + + + Perturbing a non-symmetrical probability distribution @@ -14,7 +30,7 @@ Inspired by a Toot from Thomas Lumley, I explore a situation where adding random noise to a distribution changes the median but not the mean. - Tue, 20 Aug 2024 00:00:00 +1000 + Tue, 20 Aug 2024 00:00:00 +1100 https://freerangestats.info/blog/2024/08/20/symmetry https://freerangestats.info/blog/2024/08/20/symmetry @@ -30,7 +46,7 @@ When playing Snakes and Ladders with the common rules actually used, it is more complex than a simple mathematical model; I simulate games and put forward some findings that could be useful in a future high stakes Snakes and Ladders game. - Sat, 10 Aug 2024 00:00:00 +1000 + Sat, 10 Aug 2024 00:00:00 +1100 https://freerangestats.info/blog/2024/08/10/snakes-and-ladders https://freerangestats.info/blog/2024/08/10/snakes-and-ladders @@ -46,7 +62,7 @@ I polish up some visualisations of demographic trends in the Pacific. - Sat, 27 Jul 2024 00:00:00 +1000 + Sat, 27 Jul 2024 00:00:00 +1100 https://freerangestats.info/blog/2024/07/27/aging-pacific https://freerangestats.info/blog/2024/07/27/aging-pacific @@ -62,7 +78,7 @@ I have a mostly successful go at cohort component population projections to replicate the UN's totals from their published parts, with an idea to making small changes to observations or assumptions that can build on the official projections. - Sun, 05 May 2024 00:00:00 +1000 + Sun, 05 May 2024 00:00:00 +1100 https://freerangestats.info/blog/2024/05/05/pop-projections https://freerangestats.info/blog/2024/05/05/pop-projections @@ -94,7 +110,7 @@ I make some visualisations of the country scores of the UN's proposed Multidimensional Vulnerability Index - Sat, 30 Sep 2023 00:00:00 +1000 + Sat, 30 Sep 2023 00:00:00 +1100 https://freerangestats.info/blog/2023/09/30/mvi https://freerangestats.info/blog/2023/09/30/mvi @@ -110,7 +126,7 @@ I have a go at an 'insanely hard' (actually not that hard) problem to find the radius of a circle from someone's recruitment exercise - Sat, 23 Sep 2023 00:00:00 +1000 + Sat, 23 Sep 2023 00:00:00 +1100 https://freerangestats.info/blog/2023/09/23/circle https://freerangestats.info/blog/2023/09/23/circle @@ -126,7 +142,7 @@ I make an animation and a basic Shiny app to explore the United Nations' model life tables used for demographic estimates in countries where direct estimation of mortality rates by age isn't possible. - Sun, 06 Aug 2023 00:00:00 +1000 + Sun, 06 Aug 2023 00:00:00 +1100 https://freerangestats.info/blog/2023/08/06/model-life-tables https://freerangestats.info/blog/2023/08/06/model-life-tables @@ -142,28 +158,12 @@ A model that is 'improved' (in terms of making standard assumptions more plausible) by using a logarithm transform of the response will not necessarily be improved for estimating population totals. - Sun, 30 Jul 2023 00:00:00 +1000 + Sun, 30 Jul 2023 00:00:00 +1100 https://freerangestats.info/blog/2023/07/30/log-transforms https://freerangestats.info/blog/2023/07/30/log-transforms - - - - Weighted versus unweighted percentiles - - - - When working with complex survey data where the weights are related to a continuous variable of interest, using a weighted rather than unweighted percentile rank will lead to different results towards the middle of the distribution; but the two measures will be highly correlated with eachother. Also, R reportedly calculates weighted percentile ranks much much faster than Stata. - - - Sat, 24 Jun 2023 00:00:00 +1000 - https://freerangestats.info/blog/2023/06/24/weighted-percentiles - https://freerangestats.info/blog/2023/06/24/weighted-percentiles - - - diff --git a/img/0274-most-north.png b/img/0274-most-north.png new file mode 100644 index 000000000..3739a1192 Binary files /dev/null and b/img/0274-most-north.png differ diff --git a/img/0274-most-north.svg b/img/0274-most-north.svg new file mode 100644 index 000000000..260f270e1 --- /dev/null +++ b/img/0274-most-north.svg @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Dikson, 1,100 +Pond Inlet, 1,600 +Khatanga, 3,200 +Tiksi, 5,700 +Hammerfest, 11k +Tromsø, 64k +Norilsk, 141k +Oulu, 210k +Yakutsk, 236k +Tampere, 244k +Surgut, 300k +Helsinki, 659k +Stockholm, 1.5m +Minsk, 1.7m +Hamburg, 1.8m +Kyiv, 2.8m +Harbin, 5.2m +Shenyang, 7m +Istanbul, 14.8m +Shanghai, 22.3m + + +Settlements that have no larger settlement further north of them + + diff --git a/img/0274-most-south.png b/img/0274-most-south.png new file mode 100644 index 000000000..74a7e1805 Binary files /dev/null and b/img/0274-most-south.png differ diff --git a/img/0274-most-south.svg b/img/0274-most-south.svg new file mode 100644 index 000000000..75317c365 --- /dev/null +++ b/img/0274-most-south.svg @@ -0,0 +1,241 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +McMurdo Station, 1,300 +Ushuaia, 57k +Punta Arenas, 117k +Comodoro Rivadavia, 141k +Hobart, 247k +Wellington, 382k +Mar del Plata, 593k +Melbourne, 4.9m +São Paulo, 12.4m +Kinshasa, 16m +Shenzhen, 17.5m +Shanghai, 22.3m + + +Settlements that have no larger settlement further south of them + + diff --git a/index.html b/index.html index e208f73b1..5978ecea1 100644 --- a/index.html +++ b/index.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • @@ -166,6 +166,22 @@

    free range statistics

    Recent posts

    +
    +
    +
    + +

    Polar-centred maps

    +

    24 August 2024

    +
    +

    I draw maps of the largest settlements closest to the north pole and to the south pole, based on an idea by 'Brilliant Maps'.

    +
    +
    + +
    +
    + + +
    @@ -310,22 +326,6 @@

    30 July 2023

    -
    -
    -
    - -

    Weighted versus unweighted percentiles

    -

    24 June 2023

    -
    -

    When working with complex survey data where the weights are related to a continuous variable of interest, using a weighted rather than unweighted percentile rank will lead to different results towards the middle of the distribution; but the two measures will be highly correlated with eachother. Also, R reportedly calculates weighted percentile ranks much much faster than Stata.

    -
    -
    - -
    -
    - - -

    diff --git a/library-and-themes.R b/library-and-themes.R index 6fd7283a4..41acd7b97 100644 --- a/library-and-themes.R +++ b/library-and-themes.R @@ -8,9 +8,9 @@ library(beepr) library(Cairo) library(ggrepel) library(svglite) -library(frs) library(conflicted) +library(frs) # remotes::install_github("ellisp/frs-r-package/pkg") conflict_prefer("filter", "dplyr") conflict_prefer("select", "dplyr") diff --git a/presentations/index.html b/presentations/index.html index 10ea0cdb1..594181d25 100644 --- a/presentations/index.html +++ b/presentations/index.html @@ -113,7 +113,7 @@
  • all posts with data about new zealand
  • all posts on voting behaviour
  • all posts on surveys
  • -
  • most recent post
  • +
  • most recent post
  • showcase
  • diff --git a/sitemap.xml b/sitemap.xml index caab21dda..c173fb834 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,55 +2,55 @@ https://freerangestats.info/blog/2015/07/26/hello-world -2015-07-26T00:00:00+10:00 +2015-07-26T00:00:00+11:00 https://freerangestats.info/blog/2015/08/01/new-zealand-data-on-github -2015-08-01T00:00:00+10:00 +2015-08-01T00:00:00+11:00 https://freerangestats.info/blog/2015/08/07/fibs-elo-ratings-basics -2015-08-07T00:00:00+10:00 +2015-08-07T00:00:00+11:00 https://freerangestats.info/blog/2015/08/15/importing-nzis-surf -2015-08-15T00:00:00+10:00 +2015-08-15T00:00:00+11:00 https://freerangestats.info/blog/2015/08/21/visualising-distributions -2015-08-21T00:00:00+10:00 +2015-08-21T00:00:00+11:00 https://freerangestats.info/blog/2015/08/30/starting-in-datascience -2015-08-30T00:00:00+10:00 +2015-08-30T00:00:00+11:00 https://freerangestats.info/blog/2015/09/05/creating-a-scale-transformation -2015-09-05T00:00:00+10:00 +2015-09-05T00:00:00+11:00 https://freerangestats.info/blog/2015/09/07/transforming-breaks-in-a-scale -2015-09-07T00:00:00+10:00 +2015-09-07T00:00:00+11:00 https://freerangestats.info/blog/2015/09/12/inequality-stats-distributions -2015-09-12T00:00:00+10:00 +2015-09-12T00:00:00+11:00 https://freerangestats.info/blog/2015/09/19/timeseries-same-acf -2015-09-19T00:00:00+10:00 +2015-09-19T00:00:00+11:00 https://freerangestats.info/blog/2015/09/20/timeseries-differences -2015-09-20T00:00:00+10:00 +2015-09-20T00:00:00+11:00 https://freerangestats.info/blog/2015/09/30/autoarima-success-rates -2015-09-30T00:00:00+10:00 +2015-09-30T00:00:00+11:00 https://freerangestats.info/blog/2015/10/04/recruiting -2015-10-04T00:00:00+10:00 +2015-10-04T00:00:00+11:00 https://freerangestats.info/blog/2015/10/10/X13ARIMA-SEATS @@ -138,83 +138,83 @@ https://freerangestats.info/blog/2016/04/04/nzelect2 -2016-04-04T00:00:00+10:00 +2016-04-04T00:00:00+11:00 https://freerangestats.info/blog/2016/04/09/nzelect3 -2016-04-09T00:00:00+10:00 +2016-04-09T00:00:00+11:00 https://freerangestats.info/blog/2016/04/16/nzelect4 -2016-04-16T00:00:00+10:00 +2016-04-16T00:00:00+11:00 https://freerangestats.info/blog/2016/05/07/forecastHybrid -2016-05-07T00:00:00+10:00 +2016-05-07T00:00:00+11:00 https://freerangestats.info/blog/2016/05/14/scots-female-ratio -2016-05-14T00:00:00+10:00 +2016-05-14T00:00:00+11:00 https://freerangestats.info/blog/2016/05/22/robust-regression -2016-05-22T00:00:00+10:00 +2016-05-22T00:00:00+11:00 https://freerangestats.info/blog/2016/05/29/standard-deviation-confidence-intervals -2016-05-29T00:00:00+10:00 +2016-05-29T00:00:00+11:00 https://freerangestats.info/blog/2016/06/05/bootstrap-cv-strategies -2016-06-05T00:00:00+10:00 +2016-06-05T00:00:00+11:00 https://freerangestats.info/blog/2016/06/14/graphics-presentation -2016-06-14T00:00:00+10:00 +2016-06-14T00:00:00+11:00 https://freerangestats.info/blog/2016/06/16/mrtes -2016-06-16T00:00:00+10:00 +2016-06-16T00:00:00+11:00 https://freerangestats.info/blog/2016/06/30/ehii -2016-06-30T00:00:00+10:00 +2016-06-30T00:00:00+11:00 https://freerangestats.info/blog/2016/07/02/ehii-map -2016-07-02T00:00:00+10:00 +2016-07-02T00:00:00+11:00 https://freerangestats.info/blog/2016/07/14/nzelect-cran -2016-07-14T00:00:00+10:00 +2016-07-14T00:00:00+11:00 https://freerangestats.info/blog/2016/08/04/nzcensus-gam-elastic-lm -2016-08-04T00:00:00+10:00 +2016-08-04T00:00:00+11:00 https://freerangestats.info/blog/2016/08/13/fitbit-lasso -2016-08-13T00:00:00+10:00 +2016-08-13T00:00:00+11:00 https://freerangestats.info/blog/2016/08/18/dualaxes -2016-08-18T00:00:00+10:00 +2016-08-18T00:00:00+11:00 https://freerangestats.info/blog/2016/08/28/dualaxes2 -2016-08-28T00:00:00+10:00 +2016-08-28T00:00:00+11:00 https://freerangestats.info/blog/2016/09/13/mtagdp -2016-09-13T00:00:00+10:00 +2016-09-13T00:00:00+11:00 https://freerangestats.info/blog/2016/09/16/version-control -2016-09-16T00:00:00+10:00 +2016-09-16T00:00:00+11:00 https://freerangestats.info/blog/2016/09/18/nzes1 -2016-09-18T00:00:00+10:00 +2016-09-18T00:00:00+11:00 https://freerangestats.info/blog/2016/10/12/ggsdc-rents @@ -322,87 +322,87 @@ https://freerangestats.info/blog/2017/04/09/propensity-v-regression -2017-04-09T00:00:00+10:00 +2017-04-09T00:00:00+11:00 https://freerangestats.info/blog/2017/04/15/propensity-simulations -2017-04-15T00:00:00+10:00 +2017-04-15T00:00:00+11:00 https://freerangestats.info/blog/2017/04/23/cartograms -2017-04-23T00:00:00+10:00 +2017-04-23T00:00:00+11:00 https://freerangestats.info/blog/2017/04/25/more-cartograms -2017-04-25T00:00:00+10:00 +2017-04-25T00:00:00+11:00 https://freerangestats.info/blog/2017/04/30/micromaps -2017-04-30T00:00:00+10:00 +2017-04-30T00:00:00+11:00 https://freerangestats.info/blog/2017/05/06/nz-first -2017-05-06T00:00:00+10:00 +2017-05-06T00:00:00+11:00 https://freerangestats.info/blog/2017/05/14/nzes-app -2017-05-14T00:00:00+10:00 +2017-05-14T00:00:00+11:00 https://freerangestats.info/blog/2017/05/21/nzes-sankey -2017-05-21T00:00:00+10:00 +2017-05-21T00:00:00+11:00 https://freerangestats.info/blog/2017/06/04/military-gdp -2017-06-04T00:00:00+10:00 +2017-06-04T00:00:00+11:00 https://freerangestats.info/blog/2017/06/17/microdata-access -2017-06-17T00:00:00+10:00 +2017-06-17T00:00:00+11:00 https://freerangestats.info/blog/2017/06/24/oz-polls-statespace -2017-06-24T00:00:00+10:00 +2017-06-24T00:00:00+11:00 https://freerangestats.info/blog/2017/07/02/family-violence -2017-07-02T00:00:00+10:00 +2017-07-02T00:00:00+11:00 https://freerangestats.info/blog/2017/07/09/oz-polls-revisited -2017-07-09T00:00:00+10:00 +2017-07-09T00:00:00+11:00 https://freerangestats.info/blog/2017/07/13/voter-turnout -2017-07-13T00:00:00+10:00 +2017-07-13T00:00:00+11:00 https://freerangestats.info/blog/2017/07/22/inter-country-inequality -2017-07-22T00:00:00+10:00 +2017-07-22T00:00:00+11:00 https://freerangestats.info/blog/2017/08/05/weighted-gini -2017-08-05T00:00:00+10:00 +2017-08-05T00:00:00+11:00 https://freerangestats.info/blog/2017/08/19/quantiles-gini -2017-08-19T00:00:00+10:00 +2017-08-19T00:00:00+11:00 https://freerangestats.info/blog/2017/08/20/nzes-so-far -2017-08-20T00:00:00+10:00 +2017-08-20T00:00:00+11:00 https://freerangestats.info/blog/2017/09/09/nzpolls-again -2017-09-09T00:00:00+10:00 +2017-09-09T00:00:00+11:00 https://freerangestats.info/blog/2017/09/09/rmarkdown -2017-09-09T00:00:00+10:00 +2017-09-09T00:00:00+11:00 https://freerangestats.info/blog/2017/09/16/time-varying-house-effects -2017-09-16T00:00:00+10:00 +2017-09-16T00:00:00+11:00 https://freerangestats.info/blog/2017/10/05/nzelect-0-4-0 @@ -454,67 +454,67 @@ https://freerangestats.info/blog/2018/04/11/weighted-survey-data-with-power-bi -2018-04-11T00:00:00+10:00 +2018-04-11T00:00:00+11:00 https://freerangestats.info/blog/2018/05/05/survey-books-and-courses -2018-05-05T00:00:00+10:00 +2018-05-05T00:00:00+11:00 https://freerangestats.info/blog/2018/05/13/nz-govt-shinyapps -2018-05-13T00:00:00+10:00 +2018-05-13T00:00:00+11:00 https://freerangestats.info/blog/2018/05/31/life-expectancy -2018-05-31T00:00:00+10:00 +2018-05-31T00:00:00+11:00 https://freerangestats.info/blog/2018/06/15/ggseas-and-tcomp-update -2018-06-15T00:00:00+10:00 +2018-06-15T00:00:00+11:00 https://freerangestats.info/blog/2018/06/26/fertility-rate -2018-06-26T00:00:00+10:00 +2018-06-26T00:00:00+11:00 https://freerangestats.info/blog/2018/07/01/petrol-spend -2018-07-01T00:00:00+10:00 +2018-07-01T00:00:00+11:00 https://freerangestats.info/blog/2018/07/07/twitter-monitor -2018-07-07T00:00:00+10:00 +2018-07-07T00:00:00+11:00 https://freerangestats.info/blog/2018/08/01/business-expectations -2018-08-01T00:00:00+10:00 +2018-08-01T00:00:00+11:00 https://freerangestats.info/blog/2018/08/10/leading-indicators -2018-08-10T00:00:00+10:00 +2018-08-10T00:00:00+11:00 https://freerangestats.info/blog/2018/08/14/fuel-prices -2018-08-14T00:00:00+10:00 +2018-08-14T00:00:00+11:00 https://freerangestats.info/blog/2018/08/17/risk-ratios -2018-08-17T00:00:00+10:00 +2018-08-17T00:00:00+11:00 https://freerangestats.info/blog/2018/08/24/simulating-survey -2018-08-24T00:00:00+10:00 +2018-08-24T00:00:00+11:00 https://freerangestats.info/blog/2018/08/31/melbourne-rents -2018-08-31T00:00:00+10:00 +2018-08-31T00:00:00+11:00 https://freerangestats.info/blog/2018/09/26/sri-lanka-arrivals -2018-09-26T00:00:00+10:00 +2018-09-26T00:00:00+11:00 https://freerangestats.info/blog/2018/10/07/inequality-groups -2018-10-07T00:00:00+10:00 +2018-10-07T00:00:00+11:00 https://freerangestats.info/blog/2018/10/27/dice-games @@ -574,39 +574,39 @@ https://freerangestats.info/blog/2019/04/20/yield-curve -2019-04-20T00:00:00+10:00 +2019-04-20T00:00:00+11:00 https://freerangestats.info/blog/2019/04/22/AES-intro -2019-04-22T00:00:00+10:00 +2019-04-22T00:00:00+11:00 https://freerangestats.info/blog/2019/05/15/polls-misc -2019-05-15T00:00:00+10:00 +2019-05-15T00:00:00+11:00 https://freerangestats.info/blog/2019/05/19/polls-v-results -2019-05-19T00:00:00+10:00 +2019-05-19T00:00:00+11:00 https://freerangestats.info/blog/2019/06/28/too-important-for-data-scientists -2019-06-28T00:00:00+10:00 +2019-06-28T00:00:00+11:00 https://freerangestats.info/blog/2019/07/20/time-series-cv -2019-07-20T00:00:00+10:00 +2019-07-20T00:00:00+11:00 https://freerangestats.info/blog/2019/07/28/unemployment-forecasts -2019-07-28T00:00:00+10:00 +2019-07-28T00:00:00+11:00 https://freerangestats.info/blog/2019/08/25/fitting-bins -2019-08-25T00:00:00+10:00 +2019-08-25T00:00:00+11:00 https://freerangestats.info/blog/2019/09/07/mass-shootings-oz -2019-09-07T00:00:00+10:00 +2019-09-07T00:00:00+11:00 https://freerangestats.info/blog/2019/11/03/re-creating-microdata @@ -654,71 +654,71 @@ https://freerangestats.info/blog/2020/04/06/crazy-fox-y-axis -2020-04-06T00:00:00+10:00 +2020-04-06T00:00:00+11:00 https://freerangestats.info/blog/2020/04/18/pred-interval-from-log-linear -2020-04-18T00:00:00+10:00 +2020-04-18T00:00:00+11:00 https://freerangestats.info/blog/2020/05/09/covid-population-incidence -2020-05-09T00:00:00+10:00 +2020-05-09T00:00:00+11:00 https://freerangestats.info/blog/2020/05/17/covid-texas-incidence -2020-05-17T00:00:00+10:00 +2020-05-17T00:00:00+11:00 https://freerangestats.info/blog/2020/05/23/ordering-in-bar-charts -2020-05-23T00:00:00+10:00 +2020-05-23T00:00:00+11:00 https://freerangestats.info/blog/2020/05/30/implausible-health-data-firm -2020-05-30T00:00:00+10:00 +2020-05-30T00:00:00+11:00 https://freerangestats.info/blog/2020/06/06/nz-2020-forecasts -2020-06-06T00:00:00+10:00 +2020-06-06T00:00:00+11:00 https://freerangestats.info/blog/2020/06/13/publication-reform -2020-06-13T00:00:00+10:00 +2020-06-13T00:00:00+11:00 https://freerangestats.info/blog/2020/07/18/victoria-r-convolution -2020-07-18T00:00:00+10:00 +2020-07-18T00:00:00+11:00 https://freerangestats.info/blog/2020/08/02/occupation-growth -2020-08-02T00:00:00+10:00 +2020-08-02T00:00:00+11:00 https://freerangestats.info/blog/2020/08/09/country-regression -2020-08-09T00:00:00+10:00 +2020-08-09T00:00:00+11:00 https://freerangestats.info/blog/2020/08/23/highered-ols -2020-08-23T00:00:00+10:00 +2020-08-23T00:00:00+11:00 https://freerangestats.info/blog/2020/08/29/reff-cv -2020-08-29T00:00:00+10:00 +2020-08-29T00:00:00+11:00 https://freerangestats.info/blog/2020/09/06/mixture-distributions -2020-09-06T00:00:00+10:00 +2020-09-06T00:00:00+11:00 https://freerangestats.info/blog/2020/09/13/processing-language -2020-09-13T00:00:00+10:00 +2020-09-13T00:00:00+11:00 https://freerangestats.info/blog/2020/09/26/nzes-issues -2020-09-26T00:00:00+10:00 +2020-09-26T00:00:00+11:00 https://freerangestats.info/blog/2020/10/04/covid-symptom-challenge -2020-10-04T00:00:00+10:00 +2020-10-04T00:00:00+11:00 https://freerangestats.info/blog/2020/10/11/hamlet @@ -746,7 +746,7 @@ https://freerangestats.info/blog/2021/06/14/pc-penguins -2021-06-14T00:00:00+10:00 +2021-06-14T00:00:00+11:00 https://freerangestats.info/blog/2022/03/26/supreme-court-nominations @@ -754,7 +754,7 @@ https://freerangestats.info/blog/2022/08/14/pacific-population-pyramids -2022-08-14T00:00:00+10:00 +2022-08-14T00:00:00+11:00 https://freerangestats.info/blog/2022/10/13/pacific-map @@ -766,39 +766,39 @@ https://freerangestats.info/blog/2023/05/26/women-parl-map -2023-05-26T00:00:00+10:00 +2023-05-26T00:00:00+11:00 https://freerangestats.info/blog/2023/05/28/covid-vaccinations -2023-05-28T00:00:00+10:00 +2023-05-28T00:00:00+11:00 https://freerangestats.info/blog/2023/06/04/causality-sims -2023-06-04T00:00:00+10:00 +2023-06-04T00:00:00+11:00 https://freerangestats.info/blog/2023/06/17/pacific-map-in-package -2023-06-17T00:00:00+10:00 +2023-06-17T00:00:00+11:00 https://freerangestats.info/blog/2023/06/24/weighted-percentiles -2023-06-24T00:00:00+10:00 +2023-06-24T00:00:00+11:00 https://freerangestats.info/blog/2023/07/30/log-transforms -2023-07-30T00:00:00+10:00 +2023-07-30T00:00:00+11:00 https://freerangestats.info/blog/2023/08/06/model-life-tables -2023-08-06T00:00:00+10:00 +2023-08-06T00:00:00+11:00 https://freerangestats.info/blog/2023/09/23/circle -2023-09-23T00:00:00+10:00 +2023-09-23T00:00:00+11:00 https://freerangestats.info/blog/2023/09/30/mvi -2023-09-30T00:00:00+10:00 +2023-09-30T00:00:00+11:00 https://freerangestats.info/blog/2023/10/17/mvi-and-v20 @@ -806,19 +806,23 @@ https://freerangestats.info/blog/2024/05/05/pop-projections -2024-05-05T00:00:00+10:00 +2024-05-05T00:00:00+11:00 https://freerangestats.info/blog/2024/07/27/aging-pacific -2024-07-27T00:00:00+10:00 +2024-07-27T00:00:00+11:00 https://freerangestats.info/blog/2024/08/10/snakes-and-ladders -2024-08-10T00:00:00+10:00 +2024-08-10T00:00:00+11:00 https://freerangestats.info/blog/2024/08/20/symmetry -2024-08-20T00:00:00+10:00 +2024-08-20T00:00:00+11:00 + + +https://freerangestats.info/blog/2024/08/24/polar-maps +2024-08-24T00:00:00+11:00 https://freerangestats.info/404 @@ -894,78 +898,78 @@ https://freerangestats.info/presentations/ellis-bigdata-evaluation.html -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/presentations/ellis-bigdata-evaluation_files/reveal.js-3.2.0/ -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/presentations/ellis-bigdata-evaluation_files/reveal.js-3.2.0/plugin/markdown/example.html -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/presentations/ellis-bigdata-evaluation_files/reveal.js-3.2.0/plugin/notes-server/notes.html -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/presentations/ellis-bigdata-evaluation_files/reveal.js-3.2.0/plugin/notes/notes.html -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/presentations/ellis-bigdata-evaluation_files/reveal.js-3.2.0/test/test-markdown-element-attributes.html -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/presentations/ellis-bigdata-evaluation_files/reveal.js-3.2.0/test/test-markdown-slide-attributes.html -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/presentations/ellis-bigdata-evaluation_files/reveal.js-3.2.0/test/test-markdown.html -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/presentations/ellis-bigdata-evaluation_files/reveal.js-3.2.0/test/test-pdf.html -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/presentations/ellis-bigdata-evaluation_files/reveal.js-3.2.0/test/test.html -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/presentations/ellis-mtagdp.pdf -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/presentations/ellis-timeseries-pred-intervals.html -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/presentations/ellisp-mtagdp-presentation.html -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/presentations/gc2023/graphics-communicating.html -2023-07-12T10:46:49+10:00 +2023-07-12T11:46:49+11:00 https://freerangestats.info/presentations/gc2023/graphics-communicating_files/libs/revealjs/plugin/notes/speaker-view.html -2023-05-13T05:57:22+10:00 +2023-05-13T06:57:22+11:00 https://freerangestats.info/presentations/graphics-intro.html -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/presentations/rmarkdown-styled-demo.html -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/presentations/wrug2017.html -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00 https://freerangestats.info/sketches/sketch-test.html -2023-04-06T09:42:15+10:00 +2023-04-06T10:42:15+11:00