```
Pkg: dulogpy
Purpose: Handle data retrived by the duolog bio-logging system (e.g. range and proximity data)
Author: Dr. Jesus R. Hernández Montero
Contact: jesus.hdezmontero@gmail.com
Last uptade: 2023.03.30
```
# dulogpy
This is a package with functions for handling files retrived by [dulog](https://dulog.net/). Dulog is a bio-logging system based on wireless sensors developed by [Niklas Duda](https://orcid.org/0000-0001-7846-353X). This bio-loging system delivers interactions among components in terms of proximity between them.
## Dulog components
The dulog bio-logging system has the following components (please refer to the developer's manual to read the details about each component):
* Ground Nodes
* Base Station (BS)
* Download Station (DS)
* Mobile Nodes (MN)
* Stationary Nodes (SN)
## Retrived data
The data retrived can be categorized into:
* **Range data**: this data is delivered by GN and indicates the detection of a mobile or stationary node within its detectin range. The tables are saved in the files named `"RANGE.CSV"`. BS as well DS deliver this data but tables have subtle differences.
* **Proximity data**: this data indicates the interaction between MN-MN, MN-SN and SN-SN. Both ground nodes can save this data in the file `"MN_DATA.CSV"`. This data have redundancy.
# `dulogpy` functions
The functions provide in this package are for loading the data (Range and Proximity)into your local environment ready to use for analysis. The functions are the following
### **`mn_range_loader()`**
This function is for load range data delivered by the BS and DS. The functions does the following:
1. Parse datetime columns
2. Transform datatypes
3. Sort records chronologically
4. Sets the date and time as an index
**Function arguments**:
* `path`: is the directory of the file where the "RANGE.CSV" file is stored.
* `is_ds`: indicates if the files comes from a Download Station or not. The default is `True`. If you are loading range data from a Base Station this parameter should be set `False`.
### **`mn_data_loader()`**
This function is for loading the proximity data delivered by ground nodes. The function does the following:
1. Parse datetime columns.
2. Transform datatypes.
3. Handle potential duplicates.
4. Sort records chronologically.
5. Sets the date and time as index.
**Function arguments**:
* `path`: is the directory of the file where the "MN_DATA.CSV" is stored.
### **`no_redundancy()`**
This functions deals with redundancy of the data between dyads. Since Node A meets B and node B meets A, this data is redundant. This function deliver pair-wise interactions of specified nodes. This function uses the output DataFrame delivered by the `mn_data_loader()` function to do the following:
1. Captures interactions between specified nodes (e.g. A-B and B-A).
2. Fill missing values where data is not redundant.
3. Get the maximum RSSI values between nodes (returned in the column `RSSI_max`).
4. Specify the dyad in string format in the colum `dyad`.
5. If specified, returns interactions between a time window.
**Function arguments**
* `df`: DataFrame where the output of the `mn_data_loader()` is stored.
* `Node1`: string of the first node of a given dyad (e.g. `'A'`)
* `Node2`: string of the second node of a given dyad (e.g. `'B'`)
* `start`: datetime string specifying the start of the observation window, it should be specified in the following format `YYYY-MM-DD HH:MM:SS`. Default value is `None`.
* `end`: datetime string specifying the end of the observation window, it should be specified in the following format `YYYY-MM-DD HH:MM:SS`. Default value is `None`.
### **`save_csv()`**
This is a basic function to store, into your working directory, DataFrames as .csv files delivered by `mn_range_loader()`, `mn_data_loader()` and `no_redundancy()`.
**Function arguments**:
* `df`: DataFrame to be saved as .csv
* `name`: name of the file, do not include '.csv' e.g. 'my_file'
* `index`: specify is the index should be saved as a column or kept as index. The default value is `True` saving the index as colum. Saving the index as column allows to use the output file in R.
Raw data
{
"_id": null,
"home_page": "https://github.com/jhdezmontero/dulogpy",
"name": "dulogpy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "",
"keywords": "dulog,range data,proximity data",
"author": "Jes\u00fas R. Hern\u00e1ndez Montero",
"author_email": "jesus.hdezmontero@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/bf/ff/34375f113cfe930b15336a3916e2f15adb49dde5e8b552b486e765fdace8/dulogpy-0.0.1.tar.gz",
"platform": null,
"description": "```\nPkg: dulogpy\nPurpose: Handle data retrived by the duolog bio-logging system (e.g. range and proximity data)\nAuthor: Dr. Jesus R. Hern\u00e1ndez Montero\nContact: jesus.hdezmontero@gmail.com\nLast uptade: 2023.03.30\n```\n\n# dulogpy\n\nThis is a package with functions for handling files retrived by [dulog](https://dulog.net/). Dulog is a bio-logging system based on wireless sensors developed by [Niklas Duda](https://orcid.org/0000-0001-7846-353X). This bio-loging system delivers interactions among components in terms of proximity between them.\n\n## Dulog components\nThe dulog bio-logging system has the following components (please refer to the developer's manual to read the details about each component):\n* Ground Nodes\n * Base Station (BS)\n * Download Station (DS)\n* Mobile Nodes (MN)\n* Stationary Nodes (SN)\n\n## Retrived data\nThe data retrived can be categorized into:\n\n* **Range data**: this data is delivered by GN and indicates the detection of a mobile or stationary node within its detectin range. The tables are saved in the files named `\"RANGE.CSV\"`. BS as well DS deliver this data but tables have subtle differences.\n\n* **Proximity data**: this data indicates the interaction between MN-MN, MN-SN and SN-SN. Both ground nodes can save this data in the file `\"MN_DATA.CSV\"`. This data have redundancy.\n\n# `dulogpy` functions\nThe functions provide in this package are for loading the data (Range and Proximity)into your local environment ready to use for analysis. The functions are the following\n\n### **`mn_range_loader()`**\nThis function is for load range data delivered by the BS and DS. The functions does the following:\n\n1. Parse datetime columns\n2. Transform datatypes\n3. Sort records chronologically\n4. Sets the date and time as an index\n\n**Function arguments**:\n* `path`: is the directory of the file where the \"RANGE.CSV\" file is stored.\n* `is_ds`: indicates if the files comes from a Download Station or not. The default is `True`. If you are loading range data from a Base Station this parameter should be set `False`.\n\n### **`mn_data_loader()`**\nThis function is for loading the proximity data delivered by ground nodes. The function does the following:\n\n1. Parse datetime columns.\n2. Transform datatypes.\n3. Handle potential duplicates.\n4. Sort records chronologically.\n5. Sets the date and time as index.\n\n**Function arguments**:\n* `path`: is the directory of the file where the \"MN_DATA.CSV\" is stored.\n\n### **`no_redundancy()`**\nThis functions deals with redundancy of the data between dyads. Since Node A meets B and node B meets A, this data is redundant. This function deliver pair-wise interactions of specified nodes. This function uses the output DataFrame delivered by the `mn_data_loader()` function to do the following:\n\n1. Captures interactions between specified nodes (e.g. A-B and B-A).\n2. Fill missing values where data is not redundant.\n3. Get the maximum RSSI values between nodes (returned in the column `RSSI_max`).\n4. Specify the dyad in string format in the colum `dyad`.\n5. If specified, returns interactions between a time window.\n\n**Function arguments**\n* `df`: DataFrame where the output of the `mn_data_loader()` is stored.\n* `Node1`: string of the first node of a given dyad (e.g. `'A'`)\n* `Node2`: string of the second node of a given dyad (e.g. `'B'`)\n* `start`: datetime string specifying the start of the observation window, it should be specified in the following format `YYYY-MM-DD HH:MM:SS`. Default value is `None`.\n* `end`: datetime string specifying the end of the observation window, it should be specified in the following format `YYYY-MM-DD HH:MM:SS`. Default value is `None`.\n\n### **`save_csv()`**\nThis is a basic function to store, into your working directory, DataFrames as .csv files delivered by `mn_range_loader()`, `mn_data_loader()` and `no_redundancy()`. \n\n**Function arguments**:\n* `df`: DataFrame to be saved as .csv\n* `name`: name of the file, do not include '.csv' e.g. 'my_file'\n* `index`: specify is the index should be saved as a column or kept as index. The default value is `True` saving the index as colum. Saving the index as column allows to use the output file in R.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Functions to handle data retrieved by the dulopg biologging system",
"version": "0.0.1",
"split_keywords": [
"dulog",
"range data",
"proximity data"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b04e09959ab8cdfb4391ab05fc4db6c7cfd829d1dee451e835bf1230002c5cb7",
"md5": "0270df7c5b9387c8f5d8ea1b782ee939",
"sha256": "5fc3adf2b6e8e3cc77049cb1a10ce0ffbd7c2cc592169916afc4842bf691b7ec"
},
"downloads": -1,
"filename": "dulogpy-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0270df7c5b9387c8f5d8ea1b782ee939",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 4752,
"upload_time": "2023-03-29T17:31:48",
"upload_time_iso_8601": "2023-03-29T17:31:48.271118Z",
"url": "https://files.pythonhosted.org/packages/b0/4e/09959ab8cdfb4391ab05fc4db6c7cfd829d1dee451e835bf1230002c5cb7/dulogpy-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bfff34375f113cfe930b15336a3916e2f15adb49dde5e8b552b486e765fdace8",
"md5": "916fd1d35580052ef22da63212b8bb93",
"sha256": "ede2ac278b53855318063ae61ffd9273653f3b66cf6617234ade6d55755db19b"
},
"downloads": -1,
"filename": "dulogpy-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "916fd1d35580052ef22da63212b8bb93",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 4219,
"upload_time": "2023-03-29T17:31:50",
"upload_time_iso_8601": "2023-03-29T17:31:50.037004Z",
"url": "https://files.pythonhosted.org/packages/bf/ff/34375f113cfe930b15336a3916e2f15adb49dde5e8b552b486e765fdace8/dulogpy-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-29 17:31:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "jhdezmontero",
"github_project": "dulogpy",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "dulogpy"
}