Adding EU/EEA jurisdiction extensions to DPV 2.1-dev

Adding extensions for each EU/EEA member in legal extensions for DPV 2.1-dev
published:
by Harshvardhan J. Pandit
is part of: Data Privacy Vocabulary (DPV)
DPV DPVCG semantic-web
  1. data collection
  • added concepts in the spreadsheet - each spreadsheet represents a distinct jurisdiction. We use ISO 3166-2 codes for countries with prefix ‘legal’, so Ireland becomes ‘legal-ie’.
  • in the spreadsheet, we add the concepts for laws and authorities - the columns/schema must match the other existing laws and authorities schema. Otherwise we will need to define and use a custom schema when parsing the CSV.
  1. add spreadsheets to 100.py script for downloading csv
  • identify which google sheets are new/relevant in DPV_FILES dictionary, in this case they are under ‘laws-authorities’. If this is a new google sheet, then we will need to create a new entry
  • add in the entries from the names of the spreadsheet e.g. ‘legal-ie’
  • run 100.py with arguments --ds=laws-authorities
  1. configure new extensions in vocab_management.py
  • in CSVFILES add in the entries for each spreadsheet, e.g. for Ireland
'legal-ie': {
    'ie': {
        'laws': f'{IMPORT_CSV_PATH}/legal-ie.csv',
    },
},
  • in RDF_VOCABS add the metadata for the vocabulary for each extension, e.g. for Ireland
'legal-ie': {
    'vocab': f'{IMPORT_PATH}/legal/ie/legal-ie.ttl', <--
    'template': 'template_legal_jurisdiction.jinja2',
    'export': f'{EXPORT_PATH}/legal/ie', <--
    'modules': {
        'legal': f'{IMPORT_PATH}/legal/ie/legal-ie.ttl', <--
    },
    'metadata': {
        "dct:title": "Legal Concepts for Ireland (IE)", <--
        "dct:description": "Extension to the Data Privacy Vocabulary (DPV) providing concepts for representing legal information for Ireland as jurisdiction", <--
        "dct:created": "2024-01-01",
        "dct:modified": DPV_PUBLISH_DATE,
        "dct:creator": "Harshvardhan J. Pandit",
        "schema:version": DPV_VERSION,
        "profile:isProfileOf": "dpv",
        'iri': 'https://w3id.org/dpv/legal/ie', <--
        "bibo:status": "published",
    },
},
  • in adding these, if there is a dependency between the entries, then the dependant ones must be later in the list - in this case the entry for Ireland and other EU/EEA member states are dependent on the entry for EU because they all refer to GDPR, therefore legal-eu must occur earlier than legal-ie and other EU/EEA entries in the list
  • in RDF_STRUCTURE add metadata regarding whether any modules are present and where to store them, e.g. for Ireland
'legal-ie': {
    'main': f'{EXPORT_RDF_PATH}/legal/ie', 
    'modules': f'{EXPORT_RDF_PATH}/legal/ie/modules', 
},
  • in RDF_COLLATIONS, add entries for each jurisdiction which will collate their laws and authorities in the ‘legal’ extension page, e.g. for Ireland
f'{EXPORT_RDF_PATH}/legal/ie/legal-ie.ttl',
  1. Generate RDF using 200.py

  2. Generate HTML using 300.py