Skip to content

Commit dab94b4

Browse files
committed
Update URL for deployment on ooa.world
1 parent f448da3 commit dab94b4

13 files changed

+66
-33
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The Observatory of Anonymity
22

3-
Source code for the Observatory of anonymity, available online at [https://cpg.doc.ic.ac.uk/observatory/](https://cpg.doc.ic.ac.uk/observatory/).
3+
Source code for the Observatory of anonymity, available online at [https://ooa.world/](https://ooa.world/).
44
The Observatory of Anonymity allows users to test their degree of anonymity in 89 different countries.
55

66
This is a client-side only application developed in TypeScript. All the computation to run the models are done directly in the browser.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"name": "privacy-demo",
33
"version": "2.0.0",
44
"description": "Analyze anonymized datasets using Gaussian Copula model",
5-
"homepage": "/observatory/",
5+
"homepage": "/",
66
"scripts": {
77
"build": "webpack --mode=production --config webpack.config.js",
88
"start": "http-server dist/",
99
"start:dev": "PUBLIC_URL=/ webpack-dev-server --mode=development --host 0.0.0.0"
1010
},
1111
"engines": {
12-
"node": "14.x",
13-
"npm": "6.x"
12+
"node": "18.x",
13+
"npm": "8.x"
1414
},
1515
"keywords": [
1616
"react",

src/App.tsx

+10-10
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,38 @@ class App extends React.Component<RouteComponentProps, unknown> {
1919
pages = [
2020
{
2121
title: 'Home',
22-
url: '/observatory',
22+
url: '/',
2323
page: MainPage,
2424
has_pill: true,
2525
},
2626
{
2727
title: 'Try for yourself',
28-
url: '/observatory/take-the-quiz/:iso3?',
29-
baseUrl: '/observatory/take-the-quiz',
28+
url: '/take-the-quiz/:iso3?',
29+
baseUrl: '/take-the-quiz',
3030
page: IndividualRiskPage,
3131
has_pill: false,
3232
},
3333
{
3434
title: 'Explore anonymity',
35-
url: '/observatory/explore',
35+
url: '/explore',
3636
page: CountryReportsPage,
3737
has_pill: true,
3838
},
3939
{
4040
title: 'Analyze your data',
41-
url: '/observatory/analyze-your-data',
41+
url: '/analyze-your-data',
4242
page: ToolsPage,
4343
has_pill: true,
4444
},
4545
{
4646
title: 'Why it matters',
47-
url: '/observatory/why-it-matters',
47+
url: '/why-it-matters',
4848
page: AboutPage,
4949
has_pill: true,
5050
},
5151
{
5252
title: 'About Us',
53-
url: '/observatory/why-it-matters#about-us',
53+
url: '/why-it-matters#about-us',
5454
page: AboutPage,
5555
has_pill: true,
5656
},
@@ -117,12 +117,12 @@ class App extends React.Component<RouteComponentProps, unknown> {
117117
<Row className="row-v-spacing" justify="center">
118118
<Col xs={24} sm={24} md={16} lg={12}>
119119
<h3>The Observatory of Anonymity</h3>
120-
<p>The Computational Privacy Group (CPG) is committed to protecting the privacy of visitors to our website. The Observatory of Anonymity does not collect nor share any personal data. All statistical computations run entirely in the browser, and no personal data is transmitted to Imperial College's servers. We only collect anonymous analytics (page URL and user agent).</p>
120+
<p>We are committed to protecting the privacy of visitors to our website. The Observatory of Anonymity does not collect nor share any personal data. All statistical computations run entirely in the browser, and no personal data is transmitted to our servers. We only collect anonymous analytics (page URL and user agent).</p>
121121
<p>The source code of the Observatory is available at <a href="https://github.com/computationalprivacy/observatory">https://github.com/computationalprivacy/observatory</a> and distributed under a free license.</p>
122122
<h3>Contacting us</h3>
123-
<p>Have questions, comments, or concerns? Please contact <a href="https://rocher.lc/">Luc Rocher</a> by email at: lrocher (at) imperial (dot) ac (dot) uk.</p>
123+
<p>Have questions, comments, or concerns? Please contact <a href="https://rocher.lc/">Luc Rocher</a> by email at: x@y where x=luc.rocher and y=oii.ox.ac.uk.</p>
124124
<br />
125-
<a href="https://cpg.doc.ic.ac.uk/"><img src="/observatory/assets/logo-cpg-icl.png" style={{ objectFit: 'contain', maxWidth: '50%' }} /></a>
125+
<a href="https://cpg.doc.ic.ac.uk/"><img src="/assets/logo-cpg-icl.png" style={{ objectFit: 'contain', maxWidth: '50%' }} /></a>
126126
</Col>
127127
</Row>
128128
</Footer>

src/index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<meta http-equiv="x-ua-compatible" content="ie=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
77

8-
<meta property="og:url" content="https://cpg.doc.ic.ac.uk/observatory/" />
8+
<meta property="og:url" content="https://ooa.world/" />
99
<meta property="og:type" content="article" />
1010
<meta property="og:title" content="The Observatory of Anonymity" />
1111
<meta property="og:description" content="Explore the research of the Computational Privacy Group on anonymity online. Take a short quiz to find out what makes you more vulnerable to re-identification, explore anonymity in 89 countries around the world, or train our method with your own datasets." />
12-
<meta property="og:image" content="https://cpg.doc.ic.ac.uk/observatory/image-1.png" />
13-
<meta property="og:image" content="https://cpg.doc.ic.ac.uk/observatory/image-2.png" />
12+
<meta property="og:image" content="https://ooa.world/image-1.png" />
13+
<meta property="og:image" content="https://ooa.world/image-2.png" />
1414

1515
<title>The Observatory of Anonymity</title>
1616
<link rel="manifest" href="./manifest.json">

src/index.ts

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* Welcome to Cloudflare Workers! This is your first worker.
3+
*
4+
* - Run `wrangler dev src/index.ts` in your terminal to start a development server
5+
* - Open a browser tab at http://localhost:8787/ to see your worker in action
6+
* - Run `wrangler publish src/index.ts --name my-worker` to publish your worker
7+
*
8+
* Learn more at https://developers.cloudflare.com/workers/
9+
*/
10+
11+
export interface Env {
12+
// Example binding to KV. Learn more at https://developers.cloudflare.com/workers/runtime-apis/kv/
13+
// MY_KV_NAMESPACE: KVNamespace;
14+
//
15+
// Example binding to Durable Object. Learn more at https://developers.cloudflare.com/workers/runtime-apis/durable-objects/
16+
// MY_DURABLE_OBJECT: DurableObjectNamespace;
17+
//
18+
// Example binding to R2. Learn more at https://developers.cloudflare.com/workers/runtime-apis/r2/
19+
// MY_BUCKET: R2Bucket;
20+
}
21+
22+
export default {
23+
async fetch(
24+
request: Request,
25+
env: Env,
26+
ctx: ExecutionContext
27+
): Promise<Response> {
28+
return new Response("Hello World!");
29+
},
30+
};

src/pages/AboutPage.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default class AboutPage extends React.Component<RouteComponentProps, any>
6767
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
6868
<img
6969
className="dynamicScaleImg"
70-
src="/observatory/assets/fig_anon_record.png"
70+
src="/assets/fig_anon_record.png"
7171
width="10%"
7272
style={{ objectFit: 'contain' }}
7373
/>
@@ -135,7 +135,7 @@ export default class AboutPage extends React.Component<RouteComponentProps, any>
135135
<Title level={3} style={{ textAlign: 'center' }}>
136136
Does sampling actually help?
137137
</Title>
138-
<img src="/observatory/assets/fig_sampling.png" width="100%" />
138+
<img src="/assets/fig_sampling.png" width="100%" />
139139
<Paragraph>
140140
<b>Sampling in theory</b>: Every dot is one
141141
individual. Some share your basic demographics (in
@@ -282,7 +282,7 @@ export default class AboutPage extends React.Component<RouteComponentProps, any>
282282
}
283283
bordered={false}
284284
cover={
285-
<img src="/observatory/assets/luc-rocher.png" />
285+
<img src="/assets/luc-rocher.png" />
286286
}>
287287
<Title level={4}>Luc Rocher</Title>
288288
Research Associate,
@@ -301,7 +301,7 @@ export default class AboutPage extends React.Component<RouteComponentProps, any>
301301
}
302302
bordered={false}
303303
cover={
304-
<img src="/observatory/assets/julien-hendrickx.jpg" />
304+
<img src="/assets/julien-hendrickx.jpg" />
305305
}>
306306
<Title level={4}>Julien Hendrickx</Title>
307307
Professor,
@@ -320,7 +320,7 @@ export default class AboutPage extends React.Component<RouteComponentProps, any>
320320
}
321321
bordered={false}
322322
cover={
323-
<img src="/observatory/assets/y-a-demontjoye.png" />
323+
<img src="/assets/y-a-demontjoye.png" />
324324
}>
325325
<Title level={4}>
326326
Yves-Alexandre de Montjoye
@@ -341,7 +341,7 @@ export default class AboutPage extends React.Component<RouteComponentProps, any>
341341
}
342342
bordered={false}
343343
cover={
344-
<img src="/observatory/assets/meenatchi-sundaram-msa.jpg" />
344+
<img src="/assets/meenatchi-sundaram-msa.jpg" />
345345
}>
346346
<Title level={4}>
347347
Meenatchi Sundaram MSA

src/pages/CountryReportsPage.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default class CountryReportsPage extends React.Component<
6969

7070
// read available countries & corresponding continent data from file
7171
componentDidMount(): void {
72-
json('/observatory/risk.json').then((data) => {
72+
json('/risk.json').then((data) => {
7373
const countryData = data as Country[];
7474
const continents: Record<string, Country[]> = {};
7575

@@ -124,7 +124,7 @@ export default class CountryReportsPage extends React.Component<
124124
attrs = [];
125125
}
126126

127-
json(`/observatory/country_models/${iso3}.json`).then((data) => {
127+
json(`/country_models/${iso3}.json`).then((data) => {
128128
const model = data as Model;
129129

130130
// necessary variables for UniquenessData component

src/pages/IndividualRiskPage.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default class IndividualRiskPage extends React.Component<
7070
loadCountryModel(): void {
7171
const country_index = this.state.attrs[0];
7272
const country = this.state.countryData[country_index];
73-
json(`/observatory/country_models/${country.iso3}.json`).then((data) => {
73+
json(`/country_models/${country.iso3}.json`).then((data) => {
7474
const model = data as Model;
7575
const selectedHeaders = model.avail_var;
7676
selectedHeaders.push('COUNTRY');
@@ -144,9 +144,9 @@ export default class IndividualRiskPage extends React.Component<
144144
countrySelected = params.iso3;
145145
}
146146

147-
json('/observatory/risk.json').then((data) => {
147+
json('/risk.json').then((data) => {
148148
const countryData = data as Country[];
149-
json('/observatory/qns.json').then((data) => {
149+
json('/qns.json').then((data) => {
150150
const qnData = data as Question[];
151151

152152
// add choosing country to list of questions and sort by name
@@ -411,7 +411,7 @@ export default class IndividualRiskPage extends React.Component<
411411
return (
412412
<Redirect
413413
to={{
414-
pathname: '/observatory/explore',
414+
pathname: '/explore',
415415
state: {
416416
attrs: state.attrs.map((val) =>
417417
val == -1 ? Number.NaN : val

src/pages/MainPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ export default class MainPage extends React.Component<unknown, IState> {
277277

278278
Welcome to the Observatory of Anonymity, an interactive website to explore the research of the Computational Privacy Group at Imperial College London. Take a short quiz to find out what makes you more vulnerable to re-identification, explore anonymity in 89 countries around the world, or train our method with your own datasets.
279279
</Paragraph>
280-
<Link to="/observatory/take-the-quiz">
280+
<Link to="/take-the-quiz">
281281
<Button type="primary">Try for yourself</Button>
282282
</Link>
283283
</div>

src/pages/components/ChooseDataset.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default class ChooseDataset extends React.Component<IProps, unknown> {
6161
<Text>
6262
<Text keyboard>Datasets</Text> are expected to follow
6363
the CSV protocol with the first row being the header. To simply try this tool with a sample toy dataset, we provide a copy of the ADULT dataset {' '}
64-
<a href="/observatory/adult.csv">here</a>. Click on <Text keyboard>Select Dataset</Text> and upload the downloaded dataset to get started!
64+
<a href="/adult.csv">here</a>. Click on <Text keyboard>Select Dataset</Text> and upload the downloaded dataset to get started!
6565
<br />
6666
<br />
6767
The <Text keyboard>sample size</Text> represents the

src/service-worker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ registerRoute(
5050
// Return true to signal that we want to use the handler.
5151
return true;
5252
},
53-
createHandlerBoundToURL('/observatory/index.html')
53+
createHandlerBoundToURL('/index.html')
5454
);
5555

5656
// An example runtime caching route for requests that aren't handled by the

src/serviceWorkerRegistration.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function register(config?: Config): void {
3535
// }
3636

3737
window.addEventListener('load', () => {
38-
const swUrl = `/observatory/service-worker.js`;
38+
const swUrl = `/service-worker.js`;
3939

4040
if (isLocalhost) {
4141
// This is running on localhost. Let's check if a service worker still exists or not.

wrangler.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name = "observatory"
2+
main = "src/index.ts"
3+
compatibility_date = "2022-11-30"

0 commit comments

Comments
 (0)