Skip to content

Commit

Permalink
barebones application, remove default code
Browse files Browse the repository at this point in the history
  • Loading branch information
ancasarb committed Nov 13, 2024
1 parent a7d87a9 commit a349a7d
Show file tree
Hide file tree
Showing 15 changed files with 1,639 additions and 414 deletions.
19 changes: 7 additions & 12 deletions observablehq.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,10 @@ export default {
// The pages and sections in the sidebar. If you don’t specify this option,
// all pages will be listed in alphabetical order. Listing pages explicitly
// lets you organize them into sections and have unlisted pages.
// pages: [
// {
// name: "Examples",
// pages: [
// {name: "Dashboard", path: "/example-dashboard"},
// {name: "Report", path: "/example-report"}
// ]
// }
// ],
pages: [
{name: "Explore regions", path: "/explore-regions"},
{name: "Explore indicators", path: "/explore-indicators"}
],

// Content to add to the head of the page, e.g. for a favicon:
head: '<link rel="icon" href="observable.png" type="image/png" sizes="32x32">',
Expand All @@ -25,10 +20,10 @@ export default {
// Some additional configuration options and their defaults:
// theme: "default", // try "light", "dark", "slate", etc.
// header: "", // what to show in the header (HTML)
// footer: "Built with Observable.", // what to show in the footer (HTML)
footer: "", // what to show in the footer (HTML)
// sidebar: true, // whether to show the sidebar
// toc: true, // whether to show the table of contents
// pager: true, // whether to show previous & next links in the footer
toc: false, // whether to show the table of contents
pager: false, // whether to show previous & next links in the footer
// output: "dist", // path to the output root for build
// search: true, // activate search
// linkify: true, // convert URLs in Markdown to links
Expand Down
Binary file added src/assets/images/APT_logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/images/VFSG_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 0 additions & 16 deletions src/components/timeline.js

This file was deleted.

1,569 changes: 1,569 additions & 0 deletions src/data/apt_data.csv

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/data/apt_data.csv.js
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));
8 changes: 0 additions & 8 deletions src/data/events.json

This file was deleted.

13 changes: 0 additions & 13 deletions src/data/forecast.json.js

This file was deleted.

61 changes: 0 additions & 61 deletions src/data/launches.csv.js

This file was deleted.

99 changes: 0 additions & 99 deletions src/example-dashboard.md

This file was deleted.

75 changes: 0 additions & 75 deletions src/example-report.md

This file was deleted.

25 changes: 25 additions & 0 deletions src/explore-indicators.md
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
```
28 changes: 28 additions & 0 deletions src/explore-regions.md
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
```
Loading

0 comments on commit a349a7d

Please sign in to comment.