diff --git a/.jupyter/deposit.ipynb b/.jupyter/deposit.ipynb index 0140f26da3e073dc49787ccd160b015eef7c1d0d..e70bd060e49ed9abb4eec88a0c3fb543d439cf4c 100644 --- a/.jupyter/deposit.ipynb +++ b/.jupyter/deposit.ipynb @@ -2,21 +2,24 @@ "cells": [ { "cell_type": "markdown", - "source": [ - "# Deposit\n", - "\n" - ], "metadata": { - "collapsed": false, "pycharm": { "name": "#%% md\n" } }, - "outputs": [] + "source": [ + "# Deposit\n", + "\n" + ] }, { "cell_type": "code", "execution_count": 1, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [], "source": [ "import re\n", @@ -25,52 +28,49 @@ "host = \"https://test.researchdata.tuwien.ac.at\"\n", "file = \"./resources/audio.wav\"\n", "token = \"kJTJMtRKzmA0S92A9Jks7Y1OQbtRWElzgUrldXehDbeXESxIGQ0BQ6JFEFyg\"" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + ] }, { "cell_type": "code", "execution_count": 2, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [], "source": [ "headers = {\n", " \"Authorization\": \"Bearer \" + token\n", "}\n", "filename = re.findall(\"([a-zA-z0-9_-]+\\\\.wav)\", file)[0]" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + ] }, { "cell_type": "markdown", - "source": [ - "Create Record" - ], "metadata": { - "collapsed": false, "pycharm": { "name": "#%% md\n" } - } + }, + "source": [ + "Create Record" + ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{'links': {'self': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft', 'self_html': 'https://test.researchdata.tuwien.ac.at/uploads/xksnz-cfg98', 'files': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft/files', 'record': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98', 'record_html': 'https://test.researchdata.tuwien.ac.at/records/xksnz-cfg98', 'publish': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft/actions/publish', 'review': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft/review', 'versions': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/versions', 'access_links': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/access/links', 'reserve_doi': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft/pids/doi'}, 'created': '2022-07-15T07:53:05.367485+00:00', 'is_draft': True, 'expires_at': '2022-07-15 07:53:05.367509', 'is_published': False, 'metadata': {'title': 'The SeFiRe field recording dataset', 'resource_type': {'title': {'de': 'Audio', 'en': 'Audio'}, 'id': 'sound'}, 'creators': [{'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Matija', 'name': 'Marolt, Matija', 'identifiers': [{'scheme': 'orcid', 'identifier': '0000-0002-0619-8789'}], 'type': 'personal', 'family_name': 'Marolt'}}, {'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Ciril', 'name': 'Bohak, Ciril', 'identifiers': [{'scheme': 'orcid', 'identifier': '0000-0002-9015-2897'}], 'type': 'personal', 'family_name': 'Bohak'}}, {'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Alenka', 'name': 'Kavčič, Alenka', 'type': 'personal', 'family_name': 'Kavčič'}}, {'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Matevž', 'name': 'Pesek, Matevž', 'identifiers': [{'scheme': 'orcid', 'identifier': '0000-0001-9101-0471'}], 'type': 'personal', 'family_name': 'Pesek'}}], 'publication_date': '2019-01-28'}, 'id': 'xksnz-cfg98', 'updated': '2022-07-15T07:53:05.385833+00:00', 'pids': {}, 'parent': {'communities': {}, 'id': 'r7wqx-mt922', 'access': {'links': [], 'owned_by': [{'user': 47}]}}, 'revision_id': 4, 'files': {'enabled': True, 'order': []}, 'versions': {'index': 1, 'is_latest': False, 'is_latest_draft': True}, 'access': {'files': 'public', 'record': 'public', 'embargo': {'reason': None, 'active': False}, 'status': 'metadata-only'}, 'errors': [{'field': 'access.embargo', 'messages': ['Field may not be null.']}]}\n" + "{'links': {'self': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft', 'self_html': 'https://test.researchdata.tuwien.ac.at/uploads/pqb7y-mtf49', 'files': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft/files', 'record': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49', 'record_html': 'https://test.researchdata.tuwien.ac.at/records/pqb7y-mtf49', 'publish': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft/actions/publish', 'review': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft/review', 'versions': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/versions', 'access_links': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/access/links', 'reserve_doi': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft/pids/doi'}, 'created': '2022-07-19T07:39:42.344631+00:00', 'is_draft': True, 'expires_at': '2022-07-19 07:39:42.344656', 'is_published': False, 'metadata': {'title': 'The SeFiRe field recording dataset', 'resource_type': {'title': {'de': 'Audio', 'en': 'Audio'}, 'id': 'sound'}, 'creators': [{'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Matija', 'name': 'Marolt, Matija', 'identifiers': [{'scheme': 'orcid', 'identifier': '0000-0002-0619-8789'}], 'type': 'personal', 'family_name': 'Marolt'}}, {'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Ciril', 'name': 'Bohak, Ciril', 'identifiers': [{'scheme': 'orcid', 'identifier': '0000-0002-9015-2897'}], 'type': 'personal', 'family_name': 'Bohak'}}, {'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Alenka', 'name': 'Kavčič, Alenka', 'type': 'personal', 'family_name': 'Kavčič'}}, {'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Matevž', 'name': 'Pesek, Matevž', 'identifiers': [{'scheme': 'orcid', 'identifier': '0000-0001-9101-0471'}], 'type': 'personal', 'family_name': 'Pesek'}}], 'publication_date': '2019-01-28'}, 'id': 'pqb7y-mtf49', 'updated': '2022-07-19T07:39:42.362952+00:00', 'pids': {}, 'parent': {'communities': {}, 'id': '3yzsn-zkn15', 'access': {'links': [], 'owned_by': [{'user': 47}]}}, 'revision_id': 4, 'files': {'enabled': True, 'order': []}, 'versions': {'index': 1, 'is_latest': False, 'is_latest_draft': True}, 'access': {'files': 'public', 'record': 'public', 'embargo': {'reason': None, 'active': False}, 'status': 'metadata-only'}, 'errors': [{'field': 'access.embargo', 'messages': ['Field may not be null.']}]}\n" ] } ], @@ -162,35 +162,33 @@ "}, headers=headers).json()\n", "print(response)\n", "record_id = response[\"id\"]" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + ] }, { "cell_type": "markdown", - "source": [ - "Announce" - ], "metadata": { - "collapsed": false, "pycharm": { "name": "#%% md\n" } - } + }, + "source": [ + "Announce" + ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{'enabled': True, 'links': {'self': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft/files'}, 'entries': [{'links': {'self': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft/files/audio.wav', 'content': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft/files/audio.wav/content', 'commit': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft/files/audio.wav/commit'}, 'created': '2022-07-15T07:53:06.580131+00:00', 'metadata': None, 'updated': '2022-07-15T07:53:06.581418+00:00', 'key': 'audio.wav', 'status': 'pending'}], 'default_preview': None, 'order': []}\n" + "{'enabled': True, 'links': {'self': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft/files'}, 'entries': [{'links': {'self': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft/files/audio.wav', 'content': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft/files/audio.wav/content', 'commit': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft/files/audio.wav/commit'}, 'created': '2022-07-19T07:39:48.031184+00:00', 'metadata': None, 'updated': '2022-07-19T07:39:48.032401+00:00', 'key': 'audio.wav', 'status': 'pending'}], 'default_preview': None, 'order': []}\n" ] } ], @@ -199,35 +197,33 @@ " \"key\": filename\n", "}], headers=headers).json()\n", "print(response)" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + ] }, { "cell_type": "markdown", - "source": [ - "Upload" - ], "metadata": { - "collapsed": false, "pycharm": { "name": "#%% md\n" } - } + }, + "source": [ + "Upload" + ] }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{'links': {'self': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft/files/audio.wav', 'content': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft/files/audio.wav/content', 'commit': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft/files/audio.wav/commit'}, 'created': '2022-07-15T07:53:06.580131+00:00', 'metadata': None, 'updated': '2022-07-15T07:53:06.581418+00:00', 'key': 'audio.wav', 'status': 'pending'}\n" + "{'links': {'self': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft/files/audio.wav', 'content': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft/files/audio.wav/content', 'commit': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft/files/audio.wav/commit'}, 'created': '2022-07-19T07:39:48.031184+00:00', 'metadata': None, 'updated': '2022-07-19T07:39:48.032401+00:00', 'key': 'audio.wav', 'status': 'pending'}\n" ] } ], @@ -236,126 +232,122 @@ " response = rq.put(host + \"/api/records/\" + record_id + \"/draft/files/\" + filename + \"/content\", data=f.read(),\n", " headers=headers).json()\n", "print(response)" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + ] }, { "cell_type": "markdown", - "source": [ - "Commit" - ], "metadata": { - "collapsed": false, "pycharm": { "name": "#%% md\n" } - } + }, + "source": [ + "Commit" + ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{'links': {'self': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft/files/audio.wav', 'content': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft/files/audio.wav/content', 'commit': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft/files/audio.wav/commit'}, 'created': '2022-07-15T07:53:06.580131+00:00', 'checksum': 'md5:1e9f213a91e95bc4c54eac7c9ea7564d', 'mimetype': 'audio/x-wav', 'metadata': None, 'storage_class': 'S', 'updated': '2022-07-15T07:53:09.611298+00:00', 'file_id': '73bc7ae9-f0dd-448d-aaed-c6f17e3dd4df', 'key': 'audio.wav', 'size': 1792556, 'version_id': '53523650-5e95-44c9-a768-95f4d52aaaf0', 'status': 'completed', 'bucket_id': '95a527be-90d7-4372-a55b-da813d118ae2'}\n" + "{'links': {'self': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft/files/audio.wav', 'content': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft/files/audio.wav/content', 'commit': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft/files/audio.wav/commit'}, 'created': '2022-07-19T07:39:48.031184+00:00', 'checksum': 'md5:1e9f213a91e95bc4c54eac7c9ea7564d', 'mimetype': 'audio/x-wav', 'metadata': None, 'storage_class': 'S', 'updated': '2022-07-19T07:40:02.377175+00:00', 'file_id': '06493a5d-548d-4f7e-a27a-fd6f554d7687', 'key': 'audio.wav', 'size': 1792556, 'version_id': '17721b99-107d-49f9-b186-28fcd38cb495', 'status': 'completed', 'bucket_id': 'a0478dfa-23b6-434f-b0dd-2cedc2691c69'}\n" ] } ], "source": [ "response = rq.post(host + \"/api/records/\" + record_id + \"/draft/files/\" + filename + \"/commit\", headers=headers).json()\n", "print(response)" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + ] }, { "cell_type": "markdown", - "source": [ - "Publish" - ], "metadata": { - "collapsed": false, "pycharm": { "name": "#%% md\n" } - } + }, + "source": [ + "Publish" + ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{'links': {'self': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98', 'self_html': 'https://test.researchdata.tuwien.ac.at/records/xksnz-cfg98', 'self_doi': 'https://test.researchdata.tuwien.ac.at/doi/10.70124/xksnz-cfg98', 'doi': 'https://doi.org/10.70124/xksnz-cfg98', 'files': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/files', 'latest': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/versions/latest', 'latest_html': 'https://test.researchdata.tuwien.ac.at/records/xksnz-cfg98/latest', 'draft': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft', 'versions': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/versions', 'access_links': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/access/links', 'reserve_doi': 'https://test.researchdata.tuwien.ac.at/api/records/xksnz-cfg98/draft/pids/doi'}, 'created': '2022-07-15T07:53:10.446914+00:00', 'is_draft': False, 'is_published': True, 'metadata': {'title': 'The SeFiRe field recording dataset', 'resource_type': {'title': {'de': 'Audio', 'en': 'Audio'}, 'id': 'sound'}, 'creators': [{'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Matija', 'name': 'Marolt, Matija', 'identifiers': [{'scheme': 'orcid', 'identifier': '0000-0002-0619-8789'}], 'type': 'personal', 'family_name': 'Marolt'}}, {'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Ciril', 'name': 'Bohak, Ciril', 'identifiers': [{'scheme': 'orcid', 'identifier': '0000-0002-9015-2897'}], 'type': 'personal', 'family_name': 'Bohak'}}, {'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Alenka', 'name': 'Kavčič, Alenka', 'type': 'personal', 'family_name': 'Kavčič'}}, {'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Matevž', 'name': 'Pesek, Matevž', 'identifiers': [{'scheme': 'orcid', 'identifier': '0000-0001-9101-0471'}], 'type': 'personal', 'family_name': 'Pesek'}}], 'publication_date': '2019-01-28'}, 'id': 'xksnz-cfg98', 'updated': '2022-07-15T07:53:10.493420+00:00', 'pids': {'oai': {'provider': 'oai', 'identifier': 'oai:test.researchdata.tuwien.ac.at:xksnz-cfg98'}, 'doi': {'client': 'datacite', 'provider': 'datacite', 'identifier': '10.70124/xksnz-cfg98'}}, 'parent': {'communities': {}, 'id': 'r7wqx-mt922', 'access': {'links': [], 'owned_by': [{'user': 47}]}}, 'revision_id': 3, 'files': {'enabled': True, 'order': []}, 'versions': {'index': 1, 'is_latest': True, 'is_latest_draft': True}, 'access': {'files': 'public', 'record': 'public', 'embargo': {'reason': None, 'active': False}, 'status': 'open'}}\n" + "{'links': {'self': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49', 'self_html': 'https://test.researchdata.tuwien.ac.at/records/pqb7y-mtf49', 'self_doi': 'https://test.researchdata.tuwien.ac.at/doi/10.70124/pqb7y-mtf49', 'doi': 'https://doi.org/10.70124/pqb7y-mtf49', 'files': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/files', 'latest': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/versions/latest', 'latest_html': 'https://test.researchdata.tuwien.ac.at/records/pqb7y-mtf49/latest', 'draft': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft', 'versions': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/versions', 'access_links': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/access/links', 'reserve_doi': 'https://test.researchdata.tuwien.ac.at/api/records/pqb7y-mtf49/draft/pids/doi'}, 'created': '2022-07-19T07:40:07.922234+00:00', 'is_draft': False, 'is_published': True, 'metadata': {'title': 'The SeFiRe field recording dataset', 'resource_type': {'title': {'de': 'Audio', 'en': 'Audio'}, 'id': 'sound'}, 'creators': [{'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Matija', 'name': 'Marolt, Matija', 'identifiers': [{'scheme': 'orcid', 'identifier': '0000-0002-0619-8789'}], 'type': 'personal', 'family_name': 'Marolt'}}, {'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Ciril', 'name': 'Bohak, Ciril', 'identifiers': [{'scheme': 'orcid', 'identifier': '0000-0002-9015-2897'}], 'type': 'personal', 'family_name': 'Bohak'}}, {'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Alenka', 'name': 'Kavčič, Alenka', 'type': 'personal', 'family_name': 'Kavčič'}}, {'affiliations': [{'name': 'University of Ljubljana'}], 'person_or_org': {'given_name': 'Matevž', 'name': 'Pesek, Matevž', 'identifiers': [{'scheme': 'orcid', 'identifier': '0000-0001-9101-0471'}], 'type': 'personal', 'family_name': 'Pesek'}}], 'publication_date': '2019-01-28'}, 'id': 'pqb7y-mtf49', 'updated': '2022-07-19T07:40:07.966322+00:00', 'pids': {'oai': {'provider': 'oai', 'identifier': 'oai:test.researchdata.tuwien.ac.at:pqb7y-mtf49'}, 'doi': {'client': 'datacite', 'provider': 'datacite', 'identifier': '10.70124/pqb7y-mtf49'}}, 'parent': {'communities': {}, 'id': '3yzsn-zkn15', 'access': {'links': [], 'owned_by': [{'user': 47}]}}, 'revision_id': 3, 'files': {'enabled': True, 'order': []}, 'versions': {'index': 1, 'is_latest': True, 'is_latest_draft': True}, 'access': {'files': 'public', 'record': 'public', 'embargo': {'reason': None, 'active': False}, 'status': 'open'}}\n" ] } ], "source": [ "response = rq.post(host + \"/api/records/\" + record_id + \"/draft/actions/publish\", headers=headers).json()\n", "print(response)" - ], + ] + }, + { + "cell_type": "code", + "execution_count": 9, "metadata": { - "collapsed": false, "pycharm": { "name": "#%%\n" } - } - }, - { - "cell_type": "code", - "execution_count": 8, + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "https://test.researchdata.tuwien.ac.at/doi/10.70124/xksnz-cfg98\n" + "https://test.researchdata.tuwien.ac.at/doi/10.70124/pqb7y-mtf49\n" ] } ], "source": [ "print(response[\"links\"][\"self_doi\"])" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", - "version": 2 + "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.6" + "pygments_lexer": "ipython3", + "version": "3.10.4" } }, "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file + "nbformat_minor": 1 +} diff --git a/.jupyter/feature_extract.ipynb b/.jupyter/feature_extract.ipynb index 904dae570346145222a45946873b702e556aa1c0..a4bd8ad724ba05135161e66790a21efe977db7a1 100644 --- a/.jupyter/feature_extract.ipynb +++ b/.jupyter/feature_extract.ipynb @@ -919,4 +919,4 @@ }, "nbformat": 4, "nbformat_minor": 1 -} +} \ No newline at end of file diff --git a/.jupyter/tuple_publish.ipynb b/.jupyter/tuple_publish.ipynb index 51a9d91bfecee2b07cc353eccaed95a953286ac7..034de3cd416642ce14184cee141a42c694064f8d 100644 --- a/.jupyter/tuple_publish.ipynb +++ b/.jupyter/tuple_publish.ipynb @@ -127,7 +127,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'created': datetime.datetime(2022, 7, 19, 0, 53, 4, 403000, tzinfo=tzutc()),\n", + "{'created': datetime.datetime(2022, 7, 19, 7, 46, 22, 831000, tzinfo=tzutc()),\n", " 'creator': {'authorities': None,\n", " 'containers': None,\n", " 'databases': None,\n", @@ -141,17 +141,17 @@ " 'titles_after': None,\n", " 'titles_before': None,\n", " 'username': 'user'},\n", - " 'hash': 'a4c12022ac6823c707e486b829ca553b6d46e4a9423c97f586f4475d0650def8',\n", - " 'id': 1,\n", - " 'internal_name': 'fda-userdb-airquality',\n", + " 'hash': '86ae2095f9cfac7303b6558661f3ba0bd28c06d5d7f762516a651267325ac920',\n", + " 'id': 2,\n", + " 'internal_name': 'fda-userdb-airquality2',\n", " 'is_public': None,\n", - " 'name': 'Airquality'}\n" + " 'name': 'Airquality2'}\n" ] } ], "source": [ "response = container.create1({\n", - " \"name\": \"Airquality\",\n", + " \"name\": \"Airquality2\",\n", " \"repository\": \"mariadb\",\n", " \"tag\": \"10.5\"\n", "})\n", @@ -172,7 +172,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'created': datetime.datetime(2022, 7, 19, 0, 53, 4, 403000, tzinfo=tzutc()),\n", + "{'created': datetime.datetime(2022, 7, 19, 7, 46, 22, 831000, tzinfo=tzutc()),\n", " 'creator': {'authorities': None,\n", " 'containers': None,\n", " 'databases': None,\n", @@ -186,11 +186,11 @@ " 'titles_after': None,\n", " 'titles_before': None,\n", " 'username': 'user'},\n", - " 'hash': 'a4c12022ac6823c707e486b829ca553b6d46e4a9423c97f586f4475d0650def8',\n", - " 'id': 1,\n", - " 'internal_name': 'fda-userdb-airquality',\n", + " 'hash': '86ae2095f9cfac7303b6558661f3ba0bd28c06d5d7f762516a651267325ac920',\n", + " 'id': 2,\n", + " 'internal_name': 'fda-userdb-airquality2',\n", " 'is_public': None,\n", - " 'name': 'Airquality'}\n" + " 'name': 'Airquality2'}\n" ] } ], @@ -216,42 +216,42 @@ "output_type": "stream", "text": [ "{'contact': None,\n", - " 'container': {'created': datetime.datetime(2022, 7, 19, 0, 53, 4, 403000, tzinfo=tzutc()),\n", + " 'container': {'created': datetime.datetime(2022, 7, 19, 7, 46, 22, 831000, tzinfo=tzutc()),\n", " 'databases': None,\n", - " 'hash': 'a4c12022ac6823c707e486b829ca553b6d46e4a9423c97f586f4475d0650def8',\n", - " 'id': 1,\n", + " 'hash': '86ae2095f9cfac7303b6558661f3ba0bd28c06d5d7f762516a651267325ac920',\n", + " 'id': 2,\n", " 'image': {'compiled': None,\n", - " 'date_formats': [{'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 2000, tzinfo=tzutc()),\n", + " 'date_formats': [{'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 587000, tzinfo=tzutc()),\n", " 'database_format': '%Y-%c-%d',\n", " 'example': '2022-01-30',\n", " 'has_time': False,\n", " 'id': 1,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 9000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 597000, tzinfo=tzutc()),\n", " 'database_format': '%d.%c.%Y',\n", " 'example': '30.01.2022',\n", " 'has_time': False,\n", " 'id': 2,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 12000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 601000, tzinfo=tzutc()),\n", " 'database_format': '%d.%c.%y',\n", " 'example': '30.01.22',\n", " 'has_time': False,\n", " 'id': 3,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 15000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 605000, tzinfo=tzutc()),\n", " 'database_format': '%c/%d/%Y',\n", " 'example': '01/30/2022',\n", " 'has_time': False,\n", " 'id': 4,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 18000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 608000, tzinfo=tzutc()),\n", " 'database_format': '%c/%d/%y',\n", " 'example': '01/30/22',\n", " 'has_time': False,\n", " 'id': 5,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 21000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 611000, tzinfo=tzutc()),\n", " 'database_format': '%Y-%c-%d '\n", " '%H:%i:%S.%f',\n", " 'example': '2022-01-30 13:44:25.0',\n", @@ -259,7 +259,7 @@ " 'id': 6,\n", " 'unix_format': 'yyyy-MM-dd '\n", " 'HH:mm:ss.SSSSSS'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 23000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 614000, tzinfo=tzutc()),\n", " 'database_format': '%Y-%c-%d '\n", " '%H:%i:%S',\n", " 'example': '2022-01-30 13:44:25',\n", @@ -267,7 +267,7 @@ " 'id': 7,\n", " 'unix_format': 'yyyy-MM-dd '\n", " 'HH:mm:ss'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 25000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 617000, tzinfo=tzutc()),\n", " 'database_format': '%d.%c.%Y '\n", " '%H:%i:%S',\n", " 'example': '30.01.2022 13:44:25',\n", @@ -301,13 +301,13 @@ " 'repository': 'mariadb',\n", " 'size': None,\n", " 'tag': '10.5'},\n", - " 'internal_name': 'fda-userdb-airquality',\n", + " 'internal_name': 'fda-userdb-airquality2',\n", " 'ip_address': None,\n", " 'is_public': None,\n", - " 'name': 'Airquality',\n", - " 'port': 27969,\n", + " 'name': 'Airquality2',\n", + " 'port': 34232,\n", " 'state': None},\n", - " 'created': datetime.datetime(2022, 7, 19, 0, 53, 11, 84000, tzinfo=tzutc()),\n", + " 'created': datetime.datetime(2022, 7, 19, 7, 46, 40, 66000, tzinfo=tzutc()),\n", " 'creator': {'authorities': None,\n", " 'containers': None,\n", " 'databases': None,\n", @@ -323,52 +323,52 @@ " 'username': 'user'},\n", " 'deleted': None,\n", " 'description': 'Airquality',\n", - " 'exchange': 'airquality',\n", - " 'id': 1,\n", + " 'exchange': 'airquality2',\n", + " 'id': 2,\n", " 'image': {'compiled': None,\n", - " 'date_formats': [{'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 2000, tzinfo=tzutc()),\n", + " 'date_formats': [{'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 587000, tzinfo=tzutc()),\n", " 'database_format': '%Y-%c-%d',\n", " 'example': '2022-01-30',\n", " 'has_time': False,\n", " 'id': 1,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 9000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 597000, tzinfo=tzutc()),\n", " 'database_format': '%d.%c.%Y',\n", " 'example': '30.01.2022',\n", " 'has_time': False,\n", " 'id': 2,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 12000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 601000, tzinfo=tzutc()),\n", " 'database_format': '%d.%c.%y',\n", " 'example': '30.01.22',\n", " 'has_time': False,\n", " 'id': 3,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 15000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 605000, tzinfo=tzutc()),\n", " 'database_format': '%c/%d/%Y',\n", " 'example': '01/30/2022',\n", " 'has_time': False,\n", " 'id': 4,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 18000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 608000, tzinfo=tzutc()),\n", " 'database_format': '%c/%d/%y',\n", " 'example': '01/30/22',\n", " 'has_time': False,\n", " 'id': 5,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 21000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 611000, tzinfo=tzutc()),\n", " 'database_format': '%Y-%c-%d %H:%i:%S.%f',\n", " 'example': '2022-01-30 13:44:25.0',\n", " 'has_time': True,\n", " 'id': 6,\n", " 'unix_format': 'yyyy-MM-dd HH:mm:ss.SSSSSS'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 23000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 614000, tzinfo=tzutc()),\n", " 'database_format': '%Y-%c-%d %H:%i:%S',\n", " 'example': '2022-01-30 13:44:25',\n", " 'has_time': True,\n", " 'id': 7,\n", " 'unix_format': 'yyyy-MM-dd HH:mm:ss'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 25000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 617000, tzinfo=tzutc()),\n", " 'database_format': '%d.%c.%Y %H:%i:%S',\n", " 'example': '30.01.2022 13:44:25',\n", " 'has_time': True,\n", @@ -400,11 +400,11 @@ " 'repository': 'mariadb',\n", " 'size': None,\n", " 'tag': '10.5'},\n", - " 'internal_name': 'airquality',\n", + " 'internal_name': 'airquality2',\n", " 'is_public': False,\n", " 'language': None,\n", " 'license': None,\n", - " 'name': 'Airquality',\n", + " 'name': 'Airquality2',\n", " 'publication': None,\n", " 'publisher': None,\n", " 'subjects': None,\n", @@ -414,7 +414,7 @@ ], "source": [ "response = database.create({\n", - " \"name\": \"Airquality\",\n", + " \"name\": \"Airquality2\",\n", " \"description\": \"Airquality\",\n", " \"is_public\": False\n", "}, container_id)\n", @@ -437,42 +437,42 @@ "output_type": "stream", "text": [ "{'contact': None,\n", - " 'container': {'created': datetime.datetime(2022, 7, 19, 0, 53, 4, 403000, tzinfo=tzutc()),\n", + " 'container': {'created': datetime.datetime(2022, 7, 19, 7, 46, 22, 831000, tzinfo=tzutc()),\n", " 'databases': None,\n", - " 'hash': 'a4c12022ac6823c707e486b829ca553b6d46e4a9423c97f586f4475d0650def8',\n", - " 'id': 1,\n", + " 'hash': '86ae2095f9cfac7303b6558661f3ba0bd28c06d5d7f762516a651267325ac920',\n", + " 'id': 2,\n", " 'image': {'compiled': None,\n", - " 'date_formats': [{'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 2000, tzinfo=tzutc()),\n", + " 'date_formats': [{'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 587000, tzinfo=tzutc()),\n", " 'database_format': '%Y-%c-%d',\n", " 'example': '2022-01-30',\n", " 'has_time': False,\n", " 'id': 1,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 9000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 597000, tzinfo=tzutc()),\n", " 'database_format': '%d.%c.%Y',\n", " 'example': '30.01.2022',\n", " 'has_time': False,\n", " 'id': 2,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 12000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 601000, tzinfo=tzutc()),\n", " 'database_format': '%d.%c.%y',\n", " 'example': '30.01.22',\n", " 'has_time': False,\n", " 'id': 3,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 15000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 605000, tzinfo=tzutc()),\n", " 'database_format': '%c/%d/%Y',\n", " 'example': '01/30/2022',\n", " 'has_time': False,\n", " 'id': 4,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 18000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 608000, tzinfo=tzutc()),\n", " 'database_format': '%c/%d/%y',\n", " 'example': '01/30/22',\n", " 'has_time': False,\n", " 'id': 5,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 21000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 611000, tzinfo=tzutc()),\n", " 'database_format': '%Y-%c-%d '\n", " '%H:%i:%S.%f',\n", " 'example': '2022-01-30 13:44:25.0',\n", @@ -480,7 +480,7 @@ " 'id': 6,\n", " 'unix_format': 'yyyy-MM-dd '\n", " 'HH:mm:ss.SSSSSS'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 23000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 614000, tzinfo=tzutc()),\n", " 'database_format': '%Y-%c-%d '\n", " '%H:%i:%S',\n", " 'example': '2022-01-30 13:44:25',\n", @@ -488,7 +488,7 @@ " 'id': 7,\n", " 'unix_format': 'yyyy-MM-dd '\n", " 'HH:mm:ss'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 25000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 617000, tzinfo=tzutc()),\n", " 'database_format': '%d.%c.%Y '\n", " '%H:%i:%S',\n", " 'example': '30.01.2022 13:44:25',\n", @@ -522,13 +522,13 @@ " 'repository': 'mariadb',\n", " 'size': None,\n", " 'tag': '10.5'},\n", - " 'internal_name': 'fda-userdb-airquality',\n", + " 'internal_name': 'fda-userdb-airquality2',\n", " 'ip_address': None,\n", " 'is_public': None,\n", - " 'name': 'Airquality',\n", - " 'port': 27969,\n", + " 'name': 'Airquality2',\n", + " 'port': 34232,\n", " 'state': None},\n", - " 'created': datetime.datetime(2022, 7, 19, 0, 53, 11, 84000, tzinfo=tzutc()),\n", + " 'created': datetime.datetime(2022, 7, 19, 7, 46, 40, 66000, tzinfo=tzutc()),\n", " 'creator': {'authorities': None,\n", " 'containers': None,\n", " 'databases': None,\n", @@ -553,52 +553,52 @@ " '(PN), provided that they are of sufficient quality. The '\n", " 'values of the completed day for the current year are updated '\n", " 'every 30 minutes after midnight (UTC+1).',\n", - " 'exchange': 'airquality',\n", - " 'id': 1,\n", + " 'exchange': 'airquality2',\n", + " 'id': 2,\n", " 'image': {'compiled': None,\n", - " 'date_formats': [{'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 2000, tzinfo=tzutc()),\n", + " 'date_formats': [{'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 587000, tzinfo=tzutc()),\n", " 'database_format': '%Y-%c-%d',\n", " 'example': '2022-01-30',\n", " 'has_time': False,\n", " 'id': 1,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 9000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 597000, tzinfo=tzutc()),\n", " 'database_format': '%d.%c.%Y',\n", " 'example': '30.01.2022',\n", " 'has_time': False,\n", " 'id': 2,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 12000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 601000, tzinfo=tzutc()),\n", " 'database_format': '%d.%c.%y',\n", " 'example': '30.01.22',\n", " 'has_time': False,\n", " 'id': 3,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 15000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 605000, tzinfo=tzutc()),\n", " 'database_format': '%c/%d/%Y',\n", " 'example': '01/30/2022',\n", " 'has_time': False,\n", " 'id': 4,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 18000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 608000, tzinfo=tzutc()),\n", " 'database_format': '%c/%d/%y',\n", " 'example': '01/30/22',\n", " 'has_time': False,\n", " 'id': 5,\n", " 'unix_format': 'yyyy-MM-dd'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 21000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 611000, tzinfo=tzutc()),\n", " 'database_format': '%Y-%c-%d %H:%i:%S.%f',\n", " 'example': '2022-01-30 13:44:25.0',\n", " 'has_time': True,\n", " 'id': 6,\n", " 'unix_format': 'yyyy-MM-dd HH:mm:ss.SSSSSS'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 23000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 614000, tzinfo=tzutc()),\n", " 'database_format': '%Y-%c-%d %H:%i:%S',\n", " 'example': '2022-01-30 13:44:25',\n", " 'has_time': True,\n", " 'id': 7,\n", " 'unix_format': 'yyyy-MM-dd HH:mm:ss'},\n", - " {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 25000, tzinfo=tzutc()),\n", + " {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 617000, tzinfo=tzutc()),\n", " 'database_format': '%d.%c.%Y %H:%i:%S',\n", " 'example': '30.01.2022 13:44:25',\n", " 'has_time': True,\n", @@ -630,12 +630,12 @@ " 'repository': 'mariadb',\n", " 'size': None,\n", " 'tag': '10.5'},\n", - " 'internal_name': 'airquality',\n", + " 'internal_name': 'airquality2',\n", " 'is_public': False,\n", " 'language': 'en',\n", " 'license': {'identifier': 'CC0-1.0',\n", " 'uri': 'https://creativecommons.org/publicdomain/zero/1.0/legalcode'},\n", - " 'name': 'Airquality',\n", + " 'name': 'Airquality2',\n", " 'publication': '2022-07-19',\n", " 'publisher': 'Technical University of Vienna',\n", " 'subjects': [],\n", @@ -671,13 +671,13 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'id': 1, 'internal_name': 'airquality', 'name': 'Airquality'}\n" + "{'id': 2, 'internal_name': 'airquality2', 'name': 'Airquality2'}\n" ] } ], "source": [ "response = table.create({\n", - " \"name\": \"Airquality\",\n", + " \"name\": \"Airquality2\",\n", " \"description\": \"Airquality in Zürich, Switzerland\",\n", " \"columns\": [{\n", " \"name\": \"Date\",\n", @@ -751,7 +751,7 @@ " 'decimal_digits_before': None,\n", " 'enum_values': [],\n", " 'foreign_key': None,\n", - " 'id': 1,\n", + " 'id': 9,\n", " 'internal_name': 'id',\n", " 'is_null_allowed': False,\n", " 'is_primary_key': True,\n", @@ -762,7 +762,7 @@ " 'check_expression': None,\n", " 'column_concept': None,\n", " 'column_type': 'DATE',\n", - " 'date_format': {'created_at': datetime.datetime(2022, 7, 19, 0, 51, 0, 2000, tzinfo=tzutc()),\n", + " 'date_format': {'created_at': datetime.datetime(2022, 7, 19, 7, 7, 9, 587000, tzinfo=tzutc()),\n", " 'database_format': '%Y-%c-%d',\n", " 'example': '2022-01-30',\n", " 'has_time': False,\n", @@ -772,7 +772,7 @@ " 'decimal_digits_before': None,\n", " 'enum_values': [],\n", " 'foreign_key': None,\n", - " 'id': 2,\n", + " 'id': 10,\n", " 'internal_name': 'date',\n", " 'is_null_allowed': True,\n", " 'is_primary_key': False,\n", @@ -788,7 +788,7 @@ " 'decimal_digits_before': None,\n", " 'enum_values': [],\n", " 'foreign_key': None,\n", - " 'id': 3,\n", + " 'id': 11,\n", " 'internal_name': 'location',\n", " 'is_null_allowed': True,\n", " 'is_primary_key': False,\n", @@ -804,7 +804,7 @@ " 'decimal_digits_before': None,\n", " 'enum_values': [],\n", " 'foreign_key': None,\n", - " 'id': 4,\n", + " 'id': 12,\n", " 'internal_name': 'parameter',\n", " 'is_null_allowed': True,\n", " 'is_primary_key': False,\n", @@ -820,7 +820,7 @@ " 'decimal_digits_before': None,\n", " 'enum_values': [],\n", " 'foreign_key': None,\n", - " 'id': 5,\n", + " 'id': 13,\n", " 'internal_name': 'interval',\n", " 'is_null_allowed': True,\n", " 'is_primary_key': False,\n", @@ -836,7 +836,7 @@ " 'decimal_digits_before': None,\n", " 'enum_values': [],\n", " 'foreign_key': None,\n", - " 'id': 6,\n", + " 'id': 14,\n", " 'internal_name': 'unit',\n", " 'is_null_allowed': True,\n", " 'is_primary_key': False,\n", @@ -852,7 +852,7 @@ " 'decimal_digits_before': None,\n", " 'enum_values': [],\n", " 'foreign_key': None,\n", - " 'id': 7,\n", + " 'id': 15,\n", " 'internal_name': 'value',\n", " 'is_null_allowed': True,\n", " 'is_primary_key': False,\n", @@ -868,19 +868,19 @@ " 'decimal_digits_before': None,\n", " 'enum_values': [],\n", " 'foreign_key': None,\n", - " 'id': 8,\n", + " 'id': 16,\n", " 'internal_name': 'status',\n", " 'is_null_allowed': True,\n", " 'is_primary_key': False,\n", " 'name': 'Status',\n", " 'references': None,\n", " 'unique': False}],\n", - " 'created': datetime.datetime(2022, 7, 19, 0, 53, 12, 898000, tzinfo=tzutc()),\n", + " 'created': datetime.datetime(2022, 7, 19, 7, 46, 46, 153000, tzinfo=tzutc()),\n", " 'description': 'Airquality in Zürich, Switzerland',\n", - " 'id': 1,\n", - " 'internal_name': 'airquality',\n", - " 'name': 'Airquality',\n", - " 'topic': 'airquality'}\n" + " 'id': 2,\n", + " 'internal_name': 'airquality2',\n", + " 'name': 'Airquality2',\n", + " 'topic': 'airquality2'}\n" ] } ], @@ -892,7 +892,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": { "pycharm": { "name": "#%%\n" @@ -924,32 +924,7 @@ "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'NOx', 'interval': 'h1', 'unit': 'ppb', 'value': '36.55', 'status': 'tentative'}\n", "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'NO', 'interval': 'h1', 'unit': 'µg/m3', 'value': '17.2', 'status': 'tentative'}\n", "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'NO2', 'interval': 'h1', 'unit': 'µg/m3', 'value': '43.51', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'O3', 'interval': 'h1', 'unit': 'µg/m3', 'value': '4.38', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'PM10', 'interval': 'h1', 'unit': 'µg/m3', 'value': '74.05', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'PM2.5', 'interval': 'h1', 'unit': 'µg/m3', 'value': '74.11', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'CO', 'interval': 'h1', 'unit': 'mg/m3', 'value': '0.4', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'SO2', 'interval': 'h1', 'unit': 'µg/m3', 'value': '5.02', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'NOx', 'interval': 'h1', 'unit': 'ppb', 'value': '35.47', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'NO', 'interval': 'h1', 'unit': 'µg/m3', 'value': '16.28', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'NO2', 'interval': 'h1', 'unit': 'µg/m3', 'value': '42.88', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'O3', 'interval': 'h1', 'unit': 'µg/m3', 'value': '5.34', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'PM10', 'interval': 'h1', 'unit': 'µg/m3', 'value': '140.15', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Stampfenbachstrasse', 'parameter': 'PM2.5', 'interval': 'h1', 'unit': 'µg/m3', 'value': '118.87', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Schimmelstrasse', 'parameter': 'NOx', 'interval': 'h1', 'unit': 'ppb', 'value': '39.43', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Schimmelstrasse', 'parameter': 'NO', 'interval': 'h1', 'unit': 'µg/m3', 'value': '20.8', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Schimmelstrasse', 'parameter': 'NO2', 'interval': 'h1', 'unit': 'µg/m3', 'value': '43.51', 'status': 'tentative'}\n", - "{'date': '2021-01-01', 'location': 'Schimmelstrasse', 'parameter': 'O3', 'interval': 'h1', 'unit': 'µg/m3', 'value': '6.93', 'status': 'tentative'}\n" - ] - }, - { - "ename": "KeyboardInterrupt", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001B[0;31m---------------------------------------------------------------------------\u001B[0m", - "\u001B[0;31mKeyboardInterrupt\u001B[0m Traceback (most recent call last)", - "Input \u001B[0;32mIn [10]\u001B[0m, in \u001B[0;36m<cell line: 3>\u001B[0;34m()\u001B[0m\n\u001B[1;32m 6\u001B[0m payload \u001B[38;5;241m=\u001B[39m {\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mdate\u001B[39m\u001B[38;5;124m'\u001B[39m: row[\u001B[38;5;241m0\u001B[39m], \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mlocation\u001B[39m\u001B[38;5;124m'\u001B[39m: row[\u001B[38;5;241m1\u001B[39m], \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mparameter\u001B[39m\u001B[38;5;124m'\u001B[39m: row[\u001B[38;5;241m2\u001B[39m], \u001B[38;5;124m'\u001B[39m\u001B[38;5;124minterval\u001B[39m\u001B[38;5;124m'\u001B[39m: row[\u001B[38;5;241m3\u001B[39m], \u001B[38;5;124m'\u001B[39m\u001B[38;5;124munit\u001B[39m\u001B[38;5;124m'\u001B[39m: row[\u001B[38;5;241m4\u001B[39m],\n\u001B[1;32m 7\u001B[0m \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mvalue\u001B[39m\u001B[38;5;124m'\u001B[39m: row[\u001B[38;5;241m5\u001B[39m], \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mstatus\u001B[39m\u001B[38;5;124m'\u001B[39m: row[\u001B[38;5;241m6\u001B[39m]}\n\u001B[1;32m 8\u001B[0m response \u001B[38;5;241m=\u001B[39m broker\u001B[38;5;241m.\u001B[39msend(payload)\n\u001B[0;32m----> 9\u001B[0m \u001B[43mtime\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43msleep\u001B[49m\u001B[43m(\u001B[49m\u001B[38;5;241;43m1\u001B[39;49m\u001B[43m)\u001B[49m\n\u001B[1;32m 10\u001B[0m \u001B[38;5;28mprint\u001B[39m(payload)\n", - "\u001B[0;31mKeyboardInterrupt\u001B[0m: " + "{'date': '2021-01-01', 'location': 'Rosengartenstrasse', 'parameter': 'O3', 'interval': 'h1', 'unit': 'µg/m3', 'value': '4.38', 'status': 'tentative'}\n" ] } ],