数据检索器

retriever的Python项目详细描述


Retriever logo

Build StatusBuild Status (windows)Research software impactcodecov.ioDocumentation StatusLicenseJoin the chat at https://gitter.im/weecology/retrieverDOIJOSS PublicationAnaconda-Server BadgeVersion

找到数据是一回事。另一个方法是做好分析准备。获取, 清理、标准化和导入公共可用数据非常耗时 因为许多数据集缺乏机器可读的元数据,并且不符合 建立数据结构和格式。数据检索器自动执行第一个 下载、清理和标准化数据分析管道中的步骤 数据集,并将其导入关系数据库、平面文件或 编程语言。这个过程的自动化减少了 用户可以让大多数大型数据集按小时运行,在某些情况下按天运行。

安装当前版本

如果安装了python,则可以使用pip

pip install retriever

或者在加入conda-forge通道(conda config --add channels conda-forge)后conda

conda install retriever

根据您的系统配置,这可能需要sudo才能pip

sudo pip install retriever

预编译的二进制安装程序也可用于Windows、OS X和 上的ubuntu/debian 这是releases page。这些是真的 不需要安装python。下载用于操作的安装程序 系统并按照上的说明操作 这个download page

从源安装

要从源代码安装数据检索器,您需要安装以下软件包的Python2.7+或3.3+:

  • xlrd

以下包是与关联的 数据库管理系统:

  • pymysql(用于mysql)
  • sqlite3(用于sqlite)
  • psycopg2二进制文件(用于postgresql),以前是psycopg2。
  • PyODBC(用于MS Access-此选项仅在Windows上可用)
  • Microsoft Access驱动程序(ODBC for Windows)

从源安装

使用pip直接从github安装:

pip install git+https://git@github.com/weecology/retriever.git

或:

  1. 克隆存储库
  2. 在包含setup.py的目录中,运行以下命令:pip install .。您可能需要在 命令取决于您的系统(即sudo pip install .)。

对于那些对开发感兴趣的人,可以找到更广泛的文档here

使用命令行

安装后,运行retriever update下载所有可用的数据集脚本。 要查看命令行选项和数据集的完整列表,请运行retriever --help。 输出如下:

usage: retriever [-h][-v][-q]{download,install,defaults,update,new,new_json,edit_json,delete_json,ls,citation,reset,help}
                 ...

positional arguments:
  {download,install,defaults,update,new,new_json,edit_json,delete_json,ls,citation,reset,help}
                        sub-command help
    download            download raw data files for a dataset
    install             download and install dataset
    defaults            displays default options
    update              download updated versions of scripts
    new                 create a new sample retriever script
    new_json            CLI to create retriever datapackage.json script
    edit_json           CLI to edit retriever datapackage.json script
    delete_json         CLI to remove retriever datapackage.json script
    ls                  display a list all available dataset scripts
    citation            view citation
    reset               reset retriever: removes configuration settings,
                        scripts, and cached data
    help

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -q, --quiet           suppress command-line output

要安装数据集,请使用retriever install

usage: retriever install [-h][--compile][--debug]{mysql,postgres,sqlite,msaccess,csv,json,xml} ...

positional arguments:
  {mysql,postgres,sqlite,msaccess,csv,json,xml}
                        engine-specific help
    mysql               MySQL
    postgres            PostgreSQL
    sqlite              SQLite
    msaccess            Microsoft Access
    csv                 CSV
    json                JSON
    xml                 XML

optional arguments:
  -h, --help            show this help message and exit
  --compile             force re-compile of script before downloading
  --debug               run in debug mode

示例

这些示例使用Iris flower dataset。 更多的例子可以在数据检索器文档中找到。

使用安装

retriever install -h   (gives install options)

使用特定的数据库引擎,检索器安装{engine}

retriever install mysql -h     (gives install mysql options)
retriever install mysql --user myuser --password ******** --host localhost --port 8888 --database_name testdbase iris

将数据安装到名为iris.db的sqlite数据库中,您将使用:

retriever install sqlite iris -f iris.db

使用下载

retriever download -h    (gives you help options)
retriever download iris
retriever download iris --path C:\Users\Documents

使用引文

retriever citation   (citation of the retriever engine)
retriever citation iris  (citation for the iris data)

空间数据集安装

设置空间支持

请使用postgis为postgres设置空间支持 请参阅spatial set-up docs

retriever install postgres harvard-forest # Vector data
retriever install postgres bioclim # Raster data# Install only the data of USGS elevation in the given extent
retriever install postgres usgs-elevation -b -94.98704597353938 39.027001800158615 -94.3599408119917 40.69577051867074

网站

有关详细信息,请参见 Data Retriever website

致谢

这个软件的开发是由the Gordon and Betty Moore Foundation's Data-Driven Discovery Initiative通过 Grant GBMF4563致伊桑·怀特和 作为CAREER award to Ethan White的一部分的National Science Foundation

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

推荐PyPI第三方库


热门话题
java爬虫获取外部网站搜索结果   java Bluestack未连接到eclipse   java如何从ConstraintViolationException Hibernamte获取数据库字段名   HttpResponse HttpResponse=httpClient引发java运行时错误。执行(httpPost);   Jama中矩阵的java点积和叉积   java有什么方法可以唯一地识别可扩展设备吗?   java我需要用*来写我的名字,但我不断遇到一个错误,我对编码很陌生   java变量是在内部类中访问的。需要被宣布为最终决定。但我不想宣布最终结果   java如何缩短base64图像字符串,Android?   JavaSpringMVC:计划方法不自动触发   图形学习Java 2D API的好资源是什么?   如何在java中对方法进行排队   java JavaFX多行   java Selenium无法在[链接]上找到基于CSS元素的密码字段元素http://www.cartasi.it/gtwpages/index.jsp   Java中的equals()和hashCode()契约   软删除情况下的java Hibernate二级缓存   java为什么这段代码要两次调用这些方法?