term | definition |
---|---|
RWB | Reporters Without Borders (RWB), known by its French name Reporters sans frontières and acronym RSF, is an international non-profit and non-governmental organization headquartered in Paris, France, founded in 1985 in Montpellier by journalists Robert Ménard, Rémy Loury, Jacques Molénat, and Émilien Jubineau. It is dedicated to safeguarding the right to freedom of information and defends journalists and media personnel who are imprisoned, persecuted, or at risk for their work. The organization has consultative status at the United Nations, UNESCO, the Council of Europe, and the International Organisation of the Francophonie. |
WHR | The World Happiness Reports are a partnership of Gallup, the Oxford Wellbeing Research Centre, the UN Sustainable Development Solutions Network, and the WHR’s Editorial Board. The report is produced under the editorial control of the WHR Editorial Board. The Reports reflects a worldwide demand for more attention to happiness and well-being as criteria for government policy. It reviews the state of happiness in the world today and shows how the science of happiness explains personal and national variations in happiness. (https://worldhappiness.report/about/) |
6 Functionality
Objectives
- Functionalities (Section 6.1): I am presenting in this section the concept and status of realization for my dashboard on Reporters Without Borders (RWB).
- Realizations (Section 6.2): In this section I am describing my plans for the concrete implementation of the different functionalities. When it is finished I will discuss the chosen realization with its advantages and problems (still to solve).
This chapter will be updated whenever I add some functionality to my RWB dashboard. It isn’t completed until I have finished by dashboard.
6.1 Functionalities
I am thinking on a dashboard with the following functionalities (see also the preliminiary project plan in the preface Section 3):
6.1.1 Three display modes
Central for the user interface are three display modes:
- Map: Presenting maps, similar as on the RSF Homepage.
- Chart: Presenting chars to show the development over the years. There is no equivalent at the RSF website. You can see an example at the WHR Dashboard under the subsection “Charts”.
- Country Presenting details about a specific country. Again the RSF website has no equivalence, but you got an idea after choosing a particular country under the subsection “Countries”. See as an example Austria.
6.1.2 Parameters
These three modes are essentially different, because they need diverse additional information (parameters):
6.1.2.1 Map Mode
-
Year
: Allow only one year for map. -
Score
: One of the available scores:- The global score for the years 2013-2025.
- The components scores for the years 2022-2025.
- The global score for the years 2013-2025.
-
Ranking
: Not allowed (or later perhaps a map of the ranking differences between two years?) -
Region
: is allowed with map mode, but takes the chosen map and zooms into the selected region. Similar as in WHR website by choosing “Map” and the select by “Filter by region”. -
Country
: Select one or more of the available countries (because filtered by region was choose, then only the countries of this region are eligible.
6.1.2.2 Chart Mode
-
Year
: Default is all available years, but the user can alternatively (de)select years. -
Score
: One of the available scores:- The global score for the years 2013-2025 (default), but (de)selecting years is possible.
- The components scores for the years 2022-2025 (default), but (de)selecting years is possible.
- The global score for the years 2013-2025 (default), but (de)selecting years is possible.
-
Ranking
: Alternatively withScore
All year is default, but (de)selecting years is possible. -
Region
: One region is eligible. Default is all countries. -
Country
: One or more countries are eligible. If a region is filtered then one can add other countries or deselect some countries from the region.
6.1.2.3 Country Mode
Overview about different parameters. Which parameters is still to decide. First approximation (see example Austria):
All three modes are not always available!
-
Score chart
: Global and component scores over all available years -
Ranking chart
: Global and component rankings over all available years -
Value boxes
: Current, highest, lowest, average, medium, biggest climb, biggest fall (only rankings and global score)
6.2 Realizations
6.2.1 Gloabl Score Line Charts
In Chapter 8 I have started with with experiments for the chart mode. At the end of the chapter I was able to display global score line charts for several countries.
There is still a problem to overcome: Adding another countries changes the line color of all countries already displayed. This is annoying and distracting.
A work around with actionButton()
delays the visualization after all countries are selected. But adding or removinmg a country from the selection results in the same inconsisten behaviour.
I have posted my problem on StackOverflow and in the Posit Forum but had not received any help so far (2025-09-07).
Another issue with the actionButton()
: It generates an error when it is clicked and no country is selected.
I finally found the solution to my problem of changing the line color of the already chosen countries. The part I didn’t understand was that I needed a named color vector as demonstrated in the second example of Custom Color Scales of the Plotly website.
The problem with the actionButton()
still exists, but as I prefer the immediate display of the country developments, I do not need the delayed reaction.
6.2.2 General Line Charts
My next step (starting 2025-09-08) is to provide more options for line charts:
- Choosing between global score and ranking.
6.3 Glossary Entries
Session Info
Session Info
Code
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.5.1 (2025-06-13)
#> os macOS Sequoia 15.6.1
#> system aarch64, darwin20
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Europe/Zagreb
#> date 2025-09-08
#> pandoc 3.7.0.2 @ /opt/homebrew/bin/ (via rmarkdown)
#> quarto 1.8.4 @ /usr/local/bin/quarto
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> ! package * version date (UTC) lib source
#> P cli 3.6.5 2025-04-23 [?] CRAN (R 4.5.0)
#> P commonmark 2.0.0 2025-07-07 [?] CRAN (R 4.5.0)
#> P curl 7.0.0 2025-08-19 [?] CRAN (R 4.5.0)
#> P digest 0.6.37 2024-08-19 [?] CRAN (R 4.5.0)
#> P evaluate 1.0.5 2025-08-27 [?] CRAN (R 4.5.1)
#> P farver 2.1.2 2024-05-13 [?] CRAN (R 4.5.0)
#> P fastmap 1.2.0 2024-05-15 [?] CRAN (R 4.5.0)
#> glossary * 1.0.0 2023-05-30 [1] RSPM (R 4.5.0)
#> P glue 1.8.0 2024-09-30 [?] CRAN (R 4.5.0)
#> P htmltools 0.5.8.1 2024-04-04 [?] CRAN (R 4.5.0)
#> P htmlwidgets 1.6.4 2023-12-06 [?] CRAN (R 4.5.0)
#> P jsonlite 2.0.0 2025-03-27 [?] CRAN (R 4.5.0)
#> P kableExtra 1.4.0 2024-01-24 [?] CRAN (R 4.5.0)
#> P knitr 1.50 2025-03-16 [?] CRAN (R 4.5.0)
#> P lifecycle 1.0.4 2023-11-07 [?] CRAN (R 4.5.0)
#> P litedown 0.7 2025-04-08 [?] CRAN (R 4.5.0)
#> P magrittr 2.0.3 2022-03-30 [?] CRAN (R 4.5.0)
#> P markdown 2.0 2025-03-23 [?] CRAN (R 4.5.0)
#> P R6 2.6.1 2025-02-15 [?] CRAN (R 4.5.0)
#> P RColorBrewer 1.1-3 2022-04-03 [?] CRAN (R 4.5.0)
#> renv 1.1.5 2025-07-24 [1] CRAN (R 4.5.0)
#> P rlang 1.1.6 2025-04-11 [?] CRAN (R 4.5.0)
#> P rmarkdown 2.29 2024-11-04 [?] CRAN (R 4.5.0)
#> P rstudioapi 0.17.1 2024-10-22 [?] CRAN (R 4.5.0)
#> P rversions 2.1.2 2022-08-31 [?] CRAN (R 4.5.0)
#> P scales 1.4.0 2025-04-24 [?] CRAN (R 4.5.0)
#> P sessioninfo 1.2.3 2025-02-05 [?] CRAN (R 4.5.0)
#> P stringi 1.8.7 2025-03-27 [?] CRAN (R 4.5.0)
#> P stringr 1.5.1 2023-11-14 [?] CRAN (R 4.5.0)
#> P svglite 2.2.1 2025-05-12 [?] CRAN (R 4.5.0)
#> P systemfonts 1.2.3 2025-04-30 [?] CRAN (R 4.5.0)
#> P textshaping 1.0.1 2025-05-01 [?] CRAN (R 4.5.0)
#> P vctrs 0.6.5 2023-12-01 [?] CRAN (R 4.5.0)
#> P viridisLite 0.4.2 2023-05-02 [?] CRAN (R 4.5.0)
#> P xfun 0.53 2025-08-19 [?] CRAN (R 4.5.0)
#> P xml2 1.4.0 2025-08-20 [?] CRAN (R 4.5.0)
#> P yaml 2.3.10 2024-07-26 [?] CRAN (R 4.5.0)
#>
#> [1] /Users/petzi/Documents/Meine-Repos/rwb-book/renv/library/macos/R-4.5/aarch64-apple-darwin20
#> [2] /Users/petzi/Library/Caches/org.R-project.R/R/renv/sandbox/macos/R-4.5/aarch64-apple-darwin20/4cd76b74
#>
#> * ── Packages attached to the search path.
#> P ── Loaded and on-disk path mismatch.
#>
#> ──────────────────────────────────────────────────────────────────────────────