odkconvert


Nameodkconvert JSON
Version 0.1.1 PyPI version JSON
download
home_page
SummaryConvert CSV files from ODK Central to OSM format.
upload_time2023-03-29 12:29:53
maintainer
docs_urlNone
author
requires_python>=3.9
licenseGPL-3.0-only
keywords fmtm odk hot openstreetmap opendatakit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ODK Convert Project

ODKConvert is a project for processing data collection using
OpenDataKit into OpenStreetMap format. It includes several utility
programs that automate part of the data flow like creating satellite
imagery basemaps and data extracts from
[OpenStreetMap](https://www.openstreetmap.org) so they can be
used with [ODK Collect](https://www.getodk.org). Many of these steps
are currently a manual process.

All of the programs in odkconvert are designed to function as the
backend of a webpage, but to also work standalone and offline. The
standalone functionality are simple command line programs run in a
terminal. They were originally created for producing emergency
response maps in the Western United States, which is explained in this
talk from SOTM-US 2022 titled [OSM For
Firefighting](https://www.youtube.com/watch?v=qgk9al1rluE). Much of
the tech and usage is explained in these [tech
briefs](https://www.senecass.com/projects/Mapping/tech/). Currently
these are now part of the backend for the [Field Mapping Tasking Manager](
https://github.com/hotosm/fmtm/wiki) project at
[HOT](https://www.hotosm.org).

## Installation

To install odkconvert, you can use pip. Here are two options:


- Directly from the main branch:
  `pip install git+https://github.com/hotosm/odkconvert.git`

- Latest on PyPi:
  `pip install ODKConvert`

### Configure

ODKConvert can be configured using a simple config
($HOME/.odkconvert)file in your home directory, or using environment
variables.

#### Config file

The config file is uswd to store the credentials to access an ODK
Central server. You must have an account on the Central server of
course for this to work. That file looks like this:

	url=https://foo.org
	user=foo@bar.org
	passwd=arfood

#### Environment Variables

**LOG_LEVEL**
> If present, will change the log level. Defaults to DEBUG.

**ODK_CENTRAL_URL**
> The URL for an ODKCentral server to connect to.

**ODK_CENTRAL_USER**
> The user for ODKCentral.

**ODK_CENTRAL_PASSWD**
> The password for ODKCentral.

**ODK_CENTRAL_SECURE**
> If set to False, will allow insecure connections to the ODKCentral API. Else defaults to True.

# Utility Programs

These programs are more fully documented [in this](docs/programs.md)
file. This is just a short overview.

## CSVDump.py

This program converts the data collected from ODK Collect into
the proper OpenStreetMap tagging schema. The conversion is controled
by an
[YAML](https://github.com/hotosm/odkconvert/blob/main/odkconvert/xforms.yaml
file, so easy to modify for other projects. The output are two files,
one is suitable for OSM,and is in OSM XML format. The other
No converted data should ever be uploaded to OSM without validating
the conversion in JOSM. To do efficient conversion from ODK to OSM,
it's best to use the XLSForm library as templates, as everything is
designed to work together. 

## basemapper.py

This program creates basemaps of satellite imagery, and produces files
in mbtiles format for [ODK
Collect](https://docs.getodk.org/collect-intro/) and sqlitedb files
for [Osmand](https://osmand.net/). Imagery basemaps are very useful
when the map data is lacking.or in ODK Collect, selecting the corrent
location instead of where you are standing. The basemaps Osmand are
very useful of navigation where the map data is lacking. Imageruy
vanbe downloaded from
[ERSI](https://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9#!),
[Bing](https://www.arcgis.com/home/webmap/viewer.html?webmap=8651e4d585654f6b955564efe44d04e5#!),
[USGS Topo maps](https://apps.nationalmap.gov/datasets/), or [Open
Aerial Map](https://openaerialmap.org/)

## make_data_extract.py

This program makes data extracts from
[OpenStreetMap](https://www.openstreetmap.org) data. Multiple input
sources are supported, a local postgresql database, the HOT maintained
[Underpass](https://galaxy.hotosm.org/) database, or
[Overpass](https://overpass-turbo.eu). 

## odk2csv.py

This program is used when working offline for extended periods. This
converts the ODK XML format on your mobile device into the same CSV
format used for submissions downloaded from [ODK
Central](https://docs.getodk.org/central-intro/)

## odk_client.py

This program is a simple command line client to an ODK Central
server. This allows you to list projects, appusers, tasks, and
submissions. You can also delete projects, tasks, and appusers, but
this should only be [used by
developers](https://en.wikipedia.org/wiki/With_great_power_comes_great_responsibility)
as it does direct database access, and you could loose all your data.

## filter_data.py

This program is used to support humanitariam data models. It extracts
the tags and values from the [data models
document](odkconvert/data_models/Impact Areas - Data Models V1.1.xlsx)
developed by HOT, and compares those to the taginfo database to help
fine tune what data goes into OSM or the private output data. This is
to not flood OSM with obscure tags that aren't supported by the
community. It also filters data extracts so they work with ODK
Collect.

# Best Practices

To ensure the quality of your converted data, here are some best
practices to follow: 

- Always validate your conversion in JOSM before uploading to OpenStreetMap.

- Use the XLSForm library as templates to ensure that your ODK Collect
data is compatible with the conversion process. 

- If you're having trouble with the conversion process, try using the
utility programs included with ODKConvert to troubleshoot common
issues. 

By following these best practices and using the utility programs
included with ODKConvert, you can effectively process data collection
from OpenDataKit into OpenStreetMap format. However, please note that
while ODKConvert has been tested and used in various projects, it is
still in active development and may have limitations or issues that
need to be resolved.

## XLSForm library

In the XForms directory is a collection of XLSForms that support the
new HOT data models for humanitarian data collection. These cover
many categories like healthcare, waterpoints, waste distribution,
etc... All of these XLSForms are designed to have an efficient mapper
data flow, edit existing OSM data, and support the data models.

The data models specify the preferred tag values for each data item,
with a goal of both tag completeness and tag correctness. Each data item
is broken down into a basic and extended survey questions when
appropriate.

### What is an XLSForm?

An XLSForm is a spreadsheet-based form design tool that allows you to
create complex forms for data collection using a simple and intuitive
user interface. With XLSForms, you can easily design and test forms on
your computer, then deploy them to mobile devices for data collection
using ODK Collect or other data collection tools. XLSForms use a
simple and structured format, making it easy for you to share and
collaborate on form designs with your team or other organizations. 

### Using the XLSForm Library with ODKConvert
The XLSForms in the XForms directory of the XLSForm Library have been
designed to support the HOT data models and have an efficient mapper
data flow. These forms also allow for editing of existing OSM data and
support the data models, specifying the preferred tag values for each
data item with the goal of both tag completeness and tag correctness.

### Here are some examples of how to use the XLSForm Library with ODKConvert:

- Download an XLSForm from the XForms directory:

	wget https://github.com/hotosm/xlsform/raw/master/XForms/buildings.xls

- Convert the XLSForm to OSM XML using CSVDump:

- Use the resulting OSM XML file with JOSM or other OSM editors to
validate and edit the data before uploading it to OpenStreetMap. 

### Conclusion

The XLSForm Library is a valuable resource for organizations involved
in humanitarian data collection, as it provides a collection of
pre-designed forms that are optimized for efficient mapper data flow
and tag completeness/correctness. By using the XLSForm Library with
ODKConvert, you can streamline your data collection process and ensure
the quality of your data. 

ODKConvert is a powerful tool for processing data collection from
OpenDataKit into OpenStreetMap format. By following the best practices
outlined in this documentation and using the utility programs included
with ODKConvert, you can streamline your data collection process and
ensure the quality of your converted data. If you have any questions
or issues with ODKConvert, please consult the project's documentation
or seek support from the project's community.



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "odkconvert",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "fmtm,odk,hot,openstreetmap,opendatakit",
    "author": "",
    "author_email": "Rob Savoye <rob.savoye@hotosm.org>",
    "download_url": "https://files.pythonhosted.org/packages/f3/13/2722601d12e8577fc568f5176b582da4a6a49c9ac7fefec5f2c13e3fc141/ODKConvert-0.1.1.tar.gz",
    "platform": null,
    "description": "# ODK Convert Project\n\nODKConvert is a project for processing data collection using\nOpenDataKit into OpenStreetMap format. It includes several utility\nprograms that automate part of the data flow like creating satellite\nimagery basemaps and data extracts from\n[OpenStreetMap](https://www.openstreetmap.org) so they can be\nused with [ODK Collect](https://www.getodk.org). Many of these steps\nare currently a manual process.\n\nAll of the programs in odkconvert are designed to function as the\nbackend of a webpage, but to also work standalone and offline. The\nstandalone functionality are simple command line programs run in a\nterminal. They were originally created for producing emergency\nresponse maps in the Western United States, which is explained in this\ntalk from SOTM-US 2022 titled [OSM For\nFirefighting](https://www.youtube.com/watch?v=qgk9al1rluE). Much of\nthe tech and usage is explained in these [tech\nbriefs](https://www.senecass.com/projects/Mapping/tech/). Currently\nthese are now part of the backend for the [Field Mapping Tasking Manager](\nhttps://github.com/hotosm/fmtm/wiki) project at\n[HOT](https://www.hotosm.org).\n\n## Installation\n\nTo install odkconvert, you can use pip. Here are two options:\n\n\n- Directly from the main branch:\n  `pip install git+https://github.com/hotosm/odkconvert.git`\n\n- Latest on PyPi:\n  `pip install ODKConvert`\n\n### Configure\n\nODKConvert can be configured using a simple config\n($HOME/.odkconvert)file in your home directory, or using environment\nvariables.\n\n#### Config file\n\nThe config file is uswd to store the credentials to access an ODK\nCentral server. You must have an account on the Central server of\ncourse for this to work. That file looks like this:\n\n\turl=https://foo.org\n\tuser=foo@bar.org\n\tpasswd=arfood\n\n#### Environment Variables\n\n**LOG_LEVEL**\n> If present, will change the log level. Defaults to DEBUG.\n\n**ODK_CENTRAL_URL**\n> The URL for an ODKCentral server to connect to.\n\n**ODK_CENTRAL_USER**\n> The user for ODKCentral.\n\n**ODK_CENTRAL_PASSWD**\n> The password for ODKCentral.\n\n**ODK_CENTRAL_SECURE**\n> If set to False, will allow insecure connections to the ODKCentral API. Else defaults to True.\n\n# Utility Programs\n\nThese programs are more fully documented [in this](docs/programs.md)\nfile. This is just a short overview.\n\n## CSVDump.py\n\nThis program converts the data collected from ODK Collect into\nthe proper OpenStreetMap tagging schema. The conversion is controled\nby an\n[YAML](https://github.com/hotosm/odkconvert/blob/main/odkconvert/xforms.yaml\nfile, so easy to modify for other projects. The output are two files,\none is suitable for OSM,and is in OSM XML format. The other\nNo converted data should ever be uploaded to OSM without validating\nthe conversion in JOSM. To do efficient conversion from ODK to OSM,\nit's best to use the XLSForm library as templates, as everything is\ndesigned to work together. \n\n## basemapper.py\n\nThis program creates basemaps of satellite imagery, and produces files\nin mbtiles format for [ODK\nCollect](https://docs.getodk.org/collect-intro/) and sqlitedb files\nfor [Osmand](https://osmand.net/). Imagery basemaps are very useful\nwhen the map data is lacking.or in ODK Collect, selecting the corrent\nlocation instead of where you are standing. The basemaps Osmand are\nvery useful of navigation where the map data is lacking. Imageruy\nvanbe downloaded from\n[ERSI](https://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9#!),\n[Bing](https://www.arcgis.com/home/webmap/viewer.html?webmap=8651e4d585654f6b955564efe44d04e5#!),\n[USGS Topo maps](https://apps.nationalmap.gov/datasets/), or [Open\nAerial Map](https://openaerialmap.org/)\n\n## make_data_extract.py\n\nThis program makes data extracts from\n[OpenStreetMap](https://www.openstreetmap.org) data. Multiple input\nsources are supported, a local postgresql database, the HOT maintained\n[Underpass](https://galaxy.hotosm.org/) database, or\n[Overpass](https://overpass-turbo.eu). \n\n## odk2csv.py\n\nThis program is used when working offline for extended periods. This\nconverts the ODK XML format on your mobile device into the same CSV\nformat used for submissions downloaded from [ODK\nCentral](https://docs.getodk.org/central-intro/)\n\n## odk_client.py\n\nThis program is a simple command line client to an ODK Central\nserver. This allows you to list projects, appusers, tasks, and\nsubmissions. You can also delete projects, tasks, and appusers, but\nthis should only be [used by\ndevelopers](https://en.wikipedia.org/wiki/With_great_power_comes_great_responsibility)\nas it does direct database access, and you could loose all your data.\n\n## filter_data.py\n\nThis program is used to support humanitariam data models. It extracts\nthe tags and values from the [data models\ndocument](odkconvert/data_models/Impact Areas - Data Models V1.1.xlsx)\ndeveloped by HOT, and compares those to the taginfo database to help\nfine tune what data goes into OSM or the private output data. This is\nto not flood OSM with obscure tags that aren't supported by the\ncommunity. It also filters data extracts so they work with ODK\nCollect.\n\n# Best Practices\n\nTo ensure the quality of your converted data, here are some best\npractices to follow: \n\n- Always validate your conversion in JOSM before uploading to OpenStreetMap.\n\n- Use the XLSForm library as templates to ensure that your ODK Collect\ndata is compatible with the conversion process. \n\n- If you're having trouble with the conversion process, try using the\nutility programs included with ODKConvert to troubleshoot common\nissues. \n\nBy following these best practices and using the utility programs\nincluded with ODKConvert, you can effectively process data collection\nfrom OpenDataKit into OpenStreetMap format. However, please note that\nwhile ODKConvert has been tested and used in various projects, it is\nstill in active development and may have limitations or issues that\nneed to be resolved.\n\n## XLSForm library\n\nIn the XForms directory is a collection of XLSForms that support the\nnew HOT data models for humanitarian data collection. These cover\nmany categories like healthcare, waterpoints, waste distribution,\netc... All of these XLSForms are designed to have an efficient mapper\ndata flow, edit existing OSM data, and support the data models.\n\nThe data models specify the preferred tag values for each data item,\nwith a goal of both tag completeness and tag correctness. Each data item\nis broken down into a basic and extended survey questions when\nappropriate.\n\n### What is an XLSForm?\n\nAn XLSForm is a spreadsheet-based form design tool that allows you to\ncreate complex forms for data collection using a simple and intuitive\nuser interface. With XLSForms, you can easily design and test forms on\nyour computer, then deploy them to mobile devices for data collection\nusing ODK Collect or other data collection tools. XLSForms use a\nsimple and structured format, making it easy for you to share and\ncollaborate on form designs with your team or other organizations. \n\n### Using the XLSForm Library with ODKConvert\nThe XLSForms in the XForms directory of the XLSForm Library have been\ndesigned to support the HOT data models and have an efficient mapper\ndata flow. These forms also allow for editing of existing OSM data and\nsupport the data models, specifying the preferred tag values for each\ndata item with the goal of both tag completeness and tag correctness.\n\n### Here are some examples of how to use the XLSForm Library with ODKConvert:\n\n- Download an XLSForm from the XForms directory:\n\n\twget https://github.com/hotosm/xlsform/raw/master/XForms/buildings.xls\n\n- Convert the XLSForm to OSM XML using CSVDump:\n\n- Use the resulting OSM XML file with JOSM or other OSM editors to\nvalidate and edit the data before uploading it to OpenStreetMap. \n\n### Conclusion\n\nThe XLSForm Library is a valuable resource for organizations involved\nin humanitarian data collection, as it provides a collection of\npre-designed forms that are optimized for efficient mapper data flow\nand tag completeness/correctness. By using the XLSForm Library with\nODKConvert, you can streamline your data collection process and ensure\nthe quality of your data. \n\nODKConvert is a powerful tool for processing data collection from\nOpenDataKit into OpenStreetMap format. By following the best practices\noutlined in this documentation and using the utility programs included\nwith ODKConvert, you can streamline your data collection process and\nensure the quality of your converted data. If you have any questions\nor issues with ODKConvert, please consult the project's documentation\nor seek support from the project's community.\n\n\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "Convert CSV files from ODK Central to OSM format.",
    "version": "0.1.1",
    "split_keywords": [
        "fmtm",
        "odk",
        "hot",
        "openstreetmap",
        "opendatakit"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "54129433c6f45e758967b49ab916b61dc24b530c64f05ff04e38405547b3719d",
                "md5": "b5c4c4b88672ef0a91f63bcaa19e1d5b",
                "sha256": "22b9f81c829a0b49846dfbab3475330a11996b8d043359df20e31ef09858117d"
            },
            "downloads": -1,
            "filename": "ODKConvert-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b5c4c4b88672ef0a91f63bcaa19e1d5b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 878664,
            "upload_time": "2023-03-29T12:29:51",
            "upload_time_iso_8601": "2023-03-29T12:29:51.294047Z",
            "url": "https://files.pythonhosted.org/packages/54/12/9433c6f45e758967b49ab916b61dc24b530c64f05ff04e38405547b3719d/ODKConvert-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f3132722601d12e8577fc568f5176b582da4a6a49c9ac7fefec5f2c13e3fc141",
                "md5": "4af96dee3845f00cb61963c61e843e74",
                "sha256": "c08196175785488bdc583e9bfb8f6d1b0a17793fd3c8bf74939db613e47323c8"
            },
            "downloads": -1,
            "filename": "ODKConvert-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4af96dee3845f00cb61963c61e843e74",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 866910,
            "upload_time": "2023-03-29T12:29:53",
            "upload_time_iso_8601": "2023-03-29T12:29:53.259057Z",
            "url": "https://files.pythonhosted.org/packages/f3/13/2722601d12e8577fc568f5176b582da4a6a49c9ac7fefec5f2c13e3fc141/ODKConvert-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-29 12:29:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "odkconvert"
}
        
Elapsed time: 0.05256s