Plant Village Survey导出:Simple CLI

plantp的Python项目详细描述


plantpy:Plant Village调查导出简单CLI

DOIPyPI version ^{1}$ CI plantpy

这是一个从Plant Village surveys以编程方式导出调查结果的应用程序。该工具将扩展到包括多个调查和数据源,但目前它只导出蝗虫调查数据集。此工具访问将取决于您对plantvillage的访问。在

简单引文:

Samapriya Roy. (2020, May 24). samapriya/plantpy: plantpy: Plant Village Survey Simple Export CLI (Version 0.0.3). Zenodo.
http://doi.org/10.5281/zenodo.3842118

目录

安装

这假设您的系统中安装了本机python3&pip,您可以通过转到终端(或windows命令提示符)并尝试

python然后pip list

要安装Plant Village Simple CLI for Survey Access您可以使用两种方法进行安装。在

pip install plantpy

或者你也可以试试

^{pr2}$

对于Linux,使用sudo或尝试pip install plantpy --user。在

我建议在虚拟环境中安装。在

入门

与往常一样,要打印帮助:

plantpy -h
usage: plantpy [-h] {auth,locust,extract} ...

Plant Village Survey Export: Simple CLI

positional arguments:
  {auth,locust,extract}
    auth                Saves your username and password
    locust              Export locust survey data
    extract             Export and filter locust survey to geometry

optional arguments:
  -h, --help            show this help message and exit

要获得特定功能的帮助,只需使用help开关调用它,例如:plantpy auth -h。在

plantpy认证

目前,它将用户名和密码存储为一个JSON文件,这样就不需要用户反复输入身份验证详细信息。在

plantpy auth -h
usage: plantpy auth [-h]

optional arguments:
  -h, --help  show this help message and exit

plantpy_auth


刺槐

这允许您将基于国家、开始和结束日期的蝗虫报告导出到CSV文件中。使用“国家”作为“所有”以获取当前调查列表中所有国家的报告。它有一些固有的功能,它在现有的国家列表中查找您的国家,并将告诉您是否返回CSV为空。用法很简单

plantpy locust -h
usage: plantpy locust [-h] --start START --end END --country COUNTRY --report
                      REPORT

optional arguments:
  -h, --help         show this help message and exit

Required named arguments.:
  --start START      Start Date YYYY-MM-DD
  --end END          End date YYYY-MM-DD
  --country COUNTRY  Select country to get data or use 'all'
  --report REPORT    full path to CSV report file

plantpy_locust


植物提取物

此工具将允许您使用提取的CSV文件并生成一个点GeoJSON文件,其中包含测量报告的位置和属性。该工具还允许您传递一个geometry GeoJSON文件以按几何体进行过滤。在

plantpy extract -h
usage: plantpy extract [-h] --input INPUT --output OUTPUT
                       [--geometry GEOMETRY]

optional arguments:
  -h, --help           show this help message and exit

Required named arguments.:
  --input INPUT        Path to input CSV survey data file
  --output OUTPUT      Path to output GeoJSON file or Shapefile

Optional named arguments:
  --geometry GEOMETRY  Path to filter geometry as a GeoJSON file

pyplant_extract


变更日志

v0.0.4

  • 将CSV报告提取到GeoJSON或Shapefile。在

v0.0.3

  • 利用熊猫进行有效的报道。在
  • 提取并导出CSV报告到几何文件并按几何图形过滤。在

v0.0.2

  • 已添加版本自动发布通知检查。在
  • 现在向所有国家出口蝗虫报告。在
  • 处理国家名单和出口的一般改进。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
主类中的java访问方法   Javalog4j不读取它的log4j。属性文件   雅加达ee通过Java(web应用程序)使用iText/任何其他使用现成数据的库生成PDF报告   lua使用java阅读TeamSpeak 3消息   将日期转换为BST java   java Spring引用ProxyFactoryBean中带有ref的protoyype bean   如何使java只打印一条带有if语句的消息   java如何通过JavaMail从雅虎服务器发送电子邮件?   使用百分比和BigDecimal的java测试   java如何对字符串数组排序   java验证器+MVC+REST::更新问题   java如何阻止eclipse如此频繁地挂起?   java从AsyncTask(片段内)访问TextView   IDEJava:制作可调整大小和拖动的组件