-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
barebones application, remove default code
- Loading branch information
Showing
15 changed files
with
1,639 additions
and
414 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import * as d3 from 'd3'; | ||
|
||
const data = await d3.csv('apt_data.csv'); | ||
process.stdout.write(csvFormat(data)); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
title: Explore indicators | ||
toc: false | ||
--- | ||
|
||
# Explore data by indicators | ||
|
||
```js | ||
const indicators = view( | ||
Inputs.select( | ||
new Map([ | ||
["Ratification of the UN Convention against Torture", 1], | ||
["Ratification of Optional Protocol (OPCAT)", 2], | ||
["Submission of initial report to CAT", 3], | ||
["Prohibition of torture in the constitution", 4], | ||
["Criminalisation of torture under domestic law", 5], | ||
["Designation of the National Preventive Mechanism (in law)", 6], | ||
["Operationality of the National Preventive Mechanism", 7], | ||
["Existence of National Human Rights Institution that fully complies with Paris Principles", 8], | ||
]), | ||
{value: 1, label: "Indicator", format: ([name, value]) => `${name}`, width: 600}, | ||
) | ||
); | ||
indicators | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: Explore regions | ||
toc: false | ||
--- | ||
|
||
# Explore data by regions | ||
|
||
```js | ||
const apt_data = FileAttachment("data/apt_data.csv").csv({typed: true}); | ||
``` | ||
<!-- <span class="big">${apt_data.filter((d) => d.Region === "Americas").length.toLocaleString("en-US")}</span> --> | ||
|
||
|
||
```js | ||
const regions = view( | ||
Inputs.select( | ||
new Map([ | ||
["Africa", 1], | ||
["Americas", 2], | ||
["Asia-Pacific", 3], | ||
["Europe", 4], | ||
["Middle East", 5] | ||
]), | ||
{value: 4, label: "Region", format: ([name, value]) => `${name}`, width:150} | ||
) | ||
); | ||
regions | ||
``` |
Oops, something went wrong.