generated from 360-info/quarto-scaffold
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.qmd
86 lines (57 loc) · 3.64 KB
/
README.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
format: gfm
360readme:
title: Education brain drain
summary: Visualises the flow of international students between countries toward highly developed economies
repo: report-global-education
share-url: https://globaleducation.360visuals.org/topcountries?edshare
data-sources: |
<ul>
<li><a href="http://data.uis.unesco.org">UNESCO Institute of Statistics</a></li>
<li><a href="https://ourworldindata.org/human-development-index">Our World in Data</a></li>
</ul>
---
# {{< meta 360readme.title >}}
### [📋 Add graphic to your story]({{< meta 360readme.share-url >}}?edshare) • [📊 Get the data](data) • [💻 Reproduce the analysis](#-reproduce-the-analysis)
{{< meta 360readme.summary >}}
## ♻️ Use + Remix rights
![[Creative Commons Attribution 4.0](https://creativecommons.org/licenses/by/4.0)](https://mirrors.creativecommons.org/presskit/buttons/80x15/png/by.png)
These charts, as well as the analyses that underpin them, are available under a Creative Commons Attribution 4.0 licence. This includes commercial reuse and derivates.
<!-- Do any of the data sources fall under a different licence? If so, describe the licence and which parts of the data fall under it here! if most of it does, change the above and replace LICENCE.md too -->
Data in these charts comes from:
{{< meta 360readme.data-sources >}}
**Please attribute 360info and the data sources when you use and remix these visualisations.**
## 💻 Reproduce the analysis
### Quickstart: use the dev container
This project comes with a ready-to-use [dev container](https://code.visualstudio.com/docs/remote/containers) that includes everything you need to reproduce the analysis (or do a similar one of your own!), including [R](https://r-project.org) and [Quarto](https://quarto.org).
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/360-info/{{< meta 360readme.repo >}}?quickstart=1)
::::{.callout-important}
In order to reproduce this analysis, you will need an account with the [Copernicus Climate Data Store](https://cds.climate.copernicus.eu), as the ECMWF API requires authentication.
Ensure a `.Renviron` file is present with the credentials. The variable name should be the numerical CDS username prefixed with `ecmwfr_cds:`, and the value should be the key:
```env
ecmwfr_cds:[user]=[key]
```
If you have Docker installed, you can build and run the container locally:
- Download or clone the project
- Open it in [Visual Studio Code](https://code.visualstudio.com)
- Run the **Remote-Containers: Reopen in Container** command
Once the container has launched (it might take a few minutes to set up the first time), you can run the analysis scripts with:
```sh
quarto render
```
Or look for the `.qmd` files to modify the analysis.
### Manual setup
To setup a development environment manually,
You'll need to:
- [Download and install Quarto](https://quarto.org/docs/get-started)
- [Download the install R](https://www.r-project.org)
- Satisfy the R package dependencies. In R:
* Install the [`renv`](https://rstudio.github.io/renv) package with `install.packages("renv")`,
* Then run `renv::restore()` to install the R package dependencies.
* (For problems satisfying R package dependencies, refer to [Quarto's documentation on virtual environments](https://quarto.org/docs/projects/virtual-environments.html).)
Now, render the `.qmd` files to the `/out` directory with:
```sh
quarto render
```
## ❓ Help
If you find any problems with our analysis or charts, please feel free to [create an issue](https://github.com/360-info/{{< meta 360readme.repo >}}/issues/new)!