Skip to content

Commit

Permalink
Merge pull request keplergl#123 from EDiT/feature/BUBR-938-content-fo…
Browse files Browse the repository at this point in the history
…r-signco

[BUBR-938] Update content for signco
  • Loading branch information
Jef Braem (TOBANIA) authored and GitHub Enterprise committed Oct 10, 2022
2 parents d41b2c6 + bfbc7b2 commit f4a485e
Show file tree
Hide file tree
Showing 5 changed files with 269 additions and 98 deletions.
69 changes: 44 additions & 25 deletions src/components/AssetInventory/Detail.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable react/no-danger */
import React from 'react';
import ImageZoom from 'react-image-zooom';
import { useParams } from 'react-router-dom';
Expand Down Expand Up @@ -62,34 +63,52 @@ function AssetInventoryDetail({ assets }: Props) {
<dd>{asset.territory}</dd>
</div>
</dl>
<h3 className="mt-4 mb-2 text-xl font-bold">Intended use</h3>
<p className="mb-2">{asset.usecase.intended}</p>
<p className="mb-2">{asset.usecase.notIntended}</p>
<h3 className="mt-4 mb-2 text-xl font-bold">Data used</h3>
{asset.datasets.map((dataset) => (
<div className="mb-2">
{dataset.url ? (
<a
target="_blank"
className="text-lg font-bold hover:underline text-imec-primary hover:text-imec-secondary"
href={dataset.url}
rel="noreferrer"
>
{dataset.name}
</a>
) : (
<p className="text-lg font-bold">{dataset.name}</p>
)}
<p>{dataset.description}</p>
</div>
))}
<h3 className="mt-4 mb-2 text-xl font-bold">Caveats and recommendations</h3>
<p className="mb-2">{asset.caveatsRecommendations}</p>
{(asset.usecase.intended || asset.usecase.notIntended) && (
<>
<h3 className="mt-4 mb-2 text-xl font-bold">Intended use</h3>
{asset.usecase.intended && <div className="mb-2">{asset.usecase.intended()}</div>}
{asset.usecase.notIntended && <div className="mb-2">{asset.usecase.notIntended()}</div>}
</>
)}
{asset.factors && (
<>
<h3 className="mt-4 mb-2 text-xl font-bold">Factors</h3>
{asset.usecase.intended && <div className="mb-2">{asset.factors}</div>}
</>
)}
{asset.datasets && asset.datasets.length > 0 && (
<>
<h3 className="mt-4 mb-2 text-xl font-bold">Data used</h3>
{asset.datasets.map((dataset) => (
<div className="mb-2">
{dataset.url ? (
<a
target="_blank"
className="text-lg font-bold hover:underline text-imec-primary hover:text-imec-secondary"
href={dataset.url}
rel="noreferrer"
>
{dataset.name}
</a>
) : (
<p className="text-lg font-bold">{dataset.name}</p>
)}
<p>{dataset.description}</p>
</div>
))}
</>
)}
{asset.caveatsRecommendations && (
<>
<h3 className="mt-4 mb-2 text-xl font-bold">Caveats and recommendations</h3>
<p className="mb-2">{asset.caveatsRecommendations()}</p>
</>
)}
{asset.lineage && (
<>
<h3 className="mt-4 mb-2 text-xl font-bold">Data Lineage</h3>
<p className="mb-2">{asset.lineage.description}</p>
<ImageZoom src={asset.lineage.url} alt="data lineage diagram" />
{asset.lineage.description && <p className="mb-2">{asset.lineage.description()}</p>}
{asset.lineage.url && <ImageZoom src={asset.lineage.url} alt="data lineage diagram" />}
</>
)}
</article>
Expand Down
13 changes: 7 additions & 6 deletions src/models/Asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ export type Asset = {
};
territory: string;
usecase: {
intended?: string;
notIntended?: string;
intended?: () => JSX.Element | string;
notIntended?: () => JSX.Element | string;
};
caveatsRecommendations: string;
datasets: AssetDataset[];
factors?: string;
caveatsRecommendations: () => JSX.Element | string;
datasets?: AssetDataset[];
lineage?: {
description: string;
url: string;
description?: () => JSX.Element | string;
url?: string;
};
};
63 changes: 0 additions & 63 deletions src/pages/DataInventory/datasets.ts

This file was deleted.

214 changes: 214 additions & 0 deletions src/pages/DataInventory/datasets.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
import React from 'react';

import { Asset } from 'models/Asset';

const datasets: Asset[] = [
{
id: 'qweriu',
name: 'Qweriu',
description:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
updatedAt: '06/06/2022',
publisher: 'Qweriu',
category: 'Air quality',
license: {
info: 'This is a license',
url: 'https://opensource.org/licenses/MIT',
},
territory: 'Bruges',
usecase: {
intended: () => 'Intended to be used for...',
notIntended: () => 'Not suitable for... ',
},
caveatsRecommendations: () => 'Eg text from Bruges on how to measure, how to interpret the results,...',
datasets: [
{
name: 'celeb_a',
description: 'Was split in training set and evaluation set.',
url: 'https://www.tensorflow.org/datasets/catalog/celeb_a',
},
],
},
{
id: 'signco',
name: 'Signco',
description:
'Signco Serv is intelligent software that allows you to permanently consult, follow up or forward your measurements.',
updatedAt: '27/09/2022',
publisher: 'Signco',
category: 'Traffic',
license: {
info: 'Developed by researchers at Google and the University of Toronto, 2018, v1.',
},
territory: 'Bruges',
usecase: {
notIntended: () => {
return 'Intended to be used for traffic research. Mainly for traffic intensity and origin destination analysis.';
},
intended: () => {
return (
<>
<p>
Not suitable for traffic speed measurements since the devices used in Bruges are not calibrated for this.
</p>
<p>Studies are often temporary so there is no &quot;continuous&quot; data.</p>
<ul className="list-disc pl-6 mt-2">
<li>
Cordon-measurements → 4x a year over a period of several weeks, intensive measurements on different
locations scattered over the city
</li>
<li>
TS- measurements → ad hoc counts, for specific cases & investigations, shorter periods in time & often a
&apos;before & after study) - (bv. before & after the construction of a new bike-lane)
</li>
<li>
HB- measurements → “Herkomst-bestemming” or “origin destination analysis” counts with ANPR cameras
(often just for one specific day)
</li>
<li>
Others → Often done by ‘study agencies’ for a specific case e.g. construction of a new neighbourhood.
Counts are gathered offline & then uploaded to SignCo.
</li>
</ul>
</>
);
},
},
factors: 'Quality of the images (camera’s), correctness (broken tubes, stationary traffic, ...)',
caveatsRecommendations: () => (
<ul className="list-disc pl-6">
<li>Slow traffic can give false results</li>
<li>Bikes passing a tube simultaneously can give the false result of eg a truck passing by</li>
</ul>
),
lineage: {
description: () => (
<table className="border-collapse border border-slate-400 text-sm shadow-sm">
<thead className="bg-slate-50">
<tr>
<th className="border border-slate-300 font-semibold p-4">Measured by category by Signco</th>
<th className="border border-slate-300 font-semibold p-4">Modality in ODT</th>
</tr>
</thead>
<tbody>
<tr>
<td className="border border-slate-300 py-2 px-4">Bike_Adult</td>
<td className="border border-slate-300 py-2 px-4">(term) Bike</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Bike_Children</td>
<td className="border border-slate-300 py-2 px-4">(term) Bike</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Bike_Extended</td>
<td className="border border-slate-300 py-2 px-4">(term) Bike</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Bike_Moped</td>
<td className="border border-slate-300 py-2 px-4">(term) Bike</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Bike_Unknown</td>
<td className="border border-slate-300 py-2 px-4">(term) Bike</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Bike_Wheely</td>
<td className="border border-slate-300 py-2 px-4">(term) Bike</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Bike_Youth</td>
<td className="border border-slate-300 py-2 px-4">(term) Bike</td>
</tr>
{/** VANAF HIER */}
<tr>
<td className="border border-slate-300 py-2 px-4">Car_I_____I</td>
<td className="border border-slate-300 py-2 px-4">(term) Van</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_I_____II</td>
<td className="border border-slate-300 py-2 px-4">(term) Lorry</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_I__I</td>
<td className="border border-slate-300 py-2 px-4">(term) Car</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_I__I_____I</td>
<td className="border border-slate-300 py-2 px-4">(term) Truck</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_I__I___II</td>
<td className="border border-slate-300 py-2 px-4">(term) Truck</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_I__I__I</td>
<td className="border border-slate-300 py-2 px-4">(term) Car</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_I__I__III</td>
<td className="border border-slate-300 py-2 px-4">(term) Truck</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_I__I_I__I</td>
<td className="border border-slate-300 py-2 px-4">(term) Truck</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_I__I_I_II</td>
<td className="border border-slate-300 py-2 px-4">(term) Truck</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_I__II__II</td>
<td className="border border-slate-300 py-2 px-4">(term) Truck</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_I__IPI__I</td>
<td className="border border-slate-300 py-2 px-4">(term) Car</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_I_II___I</td>
<td className="border border-slate-300 py-2 px-4">(term) Truck</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_I_II__III</td>
<td className="border border-slate-300 py-2 px-4">(term) Truck</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_I_II_I__I</td>
<td className="border border-slate-300 py-2 px-4">(term) Truck</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_I_II_I_II</td>
<td className="border border-slate-300 py-2 px-4">(term) Truck</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_II_____II</td>
<td className="border border-slate-300 py-2 px-4">(term) Lorry</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_IIII</td>
<td className="border border-slate-300 py-2 px-4">(term) Lorry</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_IIIII</td>
<td className="border border-slate-300 py-2 px-4">(term) Lorry</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_IIIIII</td>
<td className="border border-slate-300 py-2 px-4">(term) Lorry</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Car_IIIIIII</td>
<td className="border border-slate-300 py-2 px-4">(term) Lorry</td>
</tr>
<tr>
<td className="border border-slate-300 py-2 px-4">Pedestrian</td>
<td className="border border-slate-300 py-2 px-4">(term) Pedestrian</td>
</tr>
</tbody>
</table>
),
},
},
];

export default datasets;

0 comments on commit f4a485e

Please sign in to comment.