Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 00e4dbd184a8eecfc8921431fcd1ecc2f966177e authored by Sanmisan on 13 October 2023, 20:18:23 UTC, committed by GitHub on 13 October 2023, 20:18:23 UTC
Update README.md
teaser img
1 parent b49b4e1
  • Files
  • Changes
  • ba30466
  • /
  • src
  • /
  • components
  • /
  • linterReport
  • /
  • normcheck.js
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:00e4dbd184a8eecfc8921431fcd1ecc2f966177e
directory badge
swh:1:dir:3a6001675a60a09dd3a2e8557c76d115d49d2e22
content badge
swh:1:cnt:cb1c82c8e9407a136f57cc5af0b2a1c5c7295348

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
normcheck.js
import React, {useEffect, useState} from "react";
import {Card, Typography, Space, Divider, Select, Upload, Button, Row, Col, Input} from 'antd';
import { UploadOutlined } from '@ant-design/icons';

import "../../styles/LinterReport.css"

export function Normcheck(props){
    const { Text, Title } = Typography;

    const handleClick = () => {
        props.onCaseSelection("state_shipment_norm");
    };

    return(
        <Card
            title={"Normalization Check"}
            size='small'
            className={"softRuleCard"}
        >
            <div style={{padding: 8}}>
                <Space direction="vertical">
                <Title level={5}>Please check the data normalization before generating the map.</Title>
                
                <div>
                    <Text><b>Option 1</b>. Select a properity from the dataset:</Text>
                    <Select 
                        size="small"
                        defaultValue="population"
                        style={{marginLeft: 10}}
                        options={[
                            {value: 'population', label: 'population'},
                            {value: 'shipment', label: 'shipment'},
                        ]}
                    />
                </div>

                <div>
                    <Text><b>Option 2</b>. Upload a new dataset with the property you want to normalize with:</Text>
                    <br/><Text italic>(Please use the same primary key (e.g. state name, id, or FIPS) with the map data to map the geographic locations)</Text>
                    <br/>
                    <Row style={{marginTop: 5}}>
                        <Col span={6}>
                        <Upload>
                            <Button size="small" icon={<UploadOutlined />}>Click to Upload</Button>
                        </Upload>
                        </Col>
                        <Col span={7}>
                        <Text>The primary key:</Text>
                        <Select 
                            size="small"
                            defaultValue="id"
                            style={{marginLeft: 10}}
                            options={[
                                {value: 'population', label: 'population'},
                                {value: 'id', label: 'id'},
                            ]}
                        />
                        </Col>
                        <Col span={11}>
                        <Text>Be normalized with:</Text>
                        <Select 
                            size="small"
                            defaultValue="population"
                            style={{marginLeft: 10}}
                            options={[
                                {value: 'population', label: 'population'},
                                {value: 'id', label: 'id'},
                            ]}
                        />
                        </Col>
                    </Row>    
                </div>
                </Space>
                
                <Divider />
                <Text strong>Enter the data units after normalization:</Text>
                <Input placeholder="e.g. per catipa, or percent (%)" />

                <Space wrap style={{marginLeft: 80, marginTop: 20}}>
                    <Button type="primary" onClick={handleClick}>Normalize the Data</Button>
                    <Button>Skip, Data has already been normalized</Button>
                </Space>
            </div>

        </Card>
    );
}
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API