five

Supplement 1. The Python source code to conduct the analyses of Harte et al.’s (2008, 2009) and Harte's (2011) model and compare it to alternative models, including both raw and calculated data.

收藏
DataCite Commons2020-09-03 更新2024-07-25 收录
下载链接:
https://wiley.figshare.com/articles/dataset/Supplement_1_The_Python_source_code_to_conduct_the_analyses_of_Harte_et_al_s_2008_2009_and_Harte_s_2011_model_and_compare_it_to_alternative_models_including_both_raw_and_calculated_data_/3553815/1
下载链接
链接失效反馈
官方服务:
资源简介:
File List mete_sads_data.py Python script that extracts data from the primary MySQL databases. <br> mete_sads.py Core python script for replicating the complete set of analyses in the paper. <br> mete.py Module containing the core functions for working with Harte et al.'s Maximum Entropy Theory of Ecology. <br> mete_distributions.py Module containing some distributions for use in analyses of Harte et al.'s Maximum Entropy Theory of Ecology. <br> macroecotools.py Module containing tools for conducting macroecological analyses. <br> macroeco_distributions.py Module containing some common macroecological distributions, including the Poisson log-normal used in this paper. <br> data.zip Intermediate data files from various phases of the analysis. Includes the raw data from the MySQL exports, and latitude and longitude information for mapping, for 4 of the 6 data sets (BBS, MCDB, FIA, and Gentry). The other two datasets were obtained under agreements restricting the publication of raw data. This file should be extracted in the same directory as the other files. Description The code and data in this supplement allow the analyses in the paper to be fully replicated for four of the six data sets BBS, MCDB, FIA, and Gentry). The other two data sets were obtained under agreements restricting the publication of raw data, but simulation results and figures can still be generated for these data sets. Requirements: Python 2.x and the following Python modules: numpy, scipy, matplotlib, and mpmath. Two additional modules, mpl_toolkits, and mpl_toolkits.basemap, are required for generating the figures. All files should be placed in a single directory and the data.zip file should be extracted into that directory. The analyses can then be replicated by running the following commands from the command line. Run all analyses and generate figures: python mete_sads.py ./data/ all Run portions of the analysis pipeline:<br> Empirical analyses: python mete_sads.py ./data/ empir<br> Simulation analyses: python mete_sads.py ./data/ sims<br> Figures: python mete_sads.py ./data/ figs On Windows ./data/ should be replaced with .\data\ to match the relevant path conventions. Please note that these analyses involve both a large amount of data and a lot of computational work and therefore take a long time to run. Expect the empirical analysis to take up to a day. Simulations may take up to several weeks on an 8-core server. This can be decreased to about a week by downloading the beta_lookup_table.pck file from the repository described below and placing it in the same folder as the other files. Generating figures takes about one hour due to the neighborhood calculations required for the color ramps on the observed-predicted plots. Version Control Repository: The full version control repository for this project (including post-publication improvements) is publicly available at https://github.com/weecology/white-et-al-2012. The code in this repository relies on two additional modules: https://github.com/weecology/METE and https://github.com/weecology/macroecotools. If you would like to use the code in this Supplement for your own analyses it is strongly suggested that you use the equivalent code in the repositories as this is the code that is being actively maintained and developed. If for some reason the repositories are moved, links will always be available at http://weecology.org. Data Use: Data is provided in this supplement for the purposes of replication and is not presented in such a way as to be generally useful for additional analyses. If you wish to use these data sets for additional research they should be obtained from relevant data providers. For BBS, MCDB, FIA, and Gentry this can be done automatically by using the EcoData Retriever (http://ecologicaldata.org/ecodata-retriever). Software License: All code is licensed using the standard MIT license. Copyright (c) 2011 Weecology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

文件清单: mete_sads_data.py:用于从主MySQL数据库中提取数据的Python脚本。 mete_sads.py:用于复现论文中全套分析流程的核心Python脚本。 mete.py:包含用于处理Harte等人提出的生态学最大熵理论(Maximum Entropy Theory of Ecology, METE)的核心函数的模块。 mete_distributions.py:包含用于Harte等人生态学最大熵理论分析的部分分布函数的模块。 macroecotools.py:包含用于开展宏观生态学分析工具的模块。 macroeco_distributions.py:包含本文中使用的常见宏观生态分布(包括本文所用的泊松对数正态分布)的模块。 data.zip:包含分析各阶段生成的中间数据文件,涵盖6个数据集里4个数据集(BBS、MCDB、FIA和Gentry)的MySQL导出原始数据及用于绘图的经纬度信息。剩余2个数据集因数据发布限制协议无法公开原始数据。该压缩包需解压至与其他文件相同的目录下。 补充说明:本补充材料中的代码与数据可完整复现论文中针对6个数据集里4个数据集(BBS、MCDB、FIA及Gentry)的分析流程。剩余2个数据集因数据发布限制协议无法公开原始数据,但仍可基于这些数据集生成模拟结果与可视化图件。 运行要求:需使用Python 2.x环境,并依赖以下Python库:numpy、scipy、matplotlib及mpmath。生成可视化图件还需额外依赖mpl_toolkits及mpl_toolkits.basemap模块。所有文件需放置于同一目录下,并将data.zip解压至该目录。随后可通过命令行执行以下命令复现分析流程: 1. 运行全部分析并生成图件:python mete_sads.py ./data/ all 2. 运行部分分析流程: - 实证分析:python mete_sads.py ./data/ empir - 模拟分析:python mete_sads.py ./data/ sims - 生成图件:python mete_sads.py ./data/ figs 在Windows系统中,需将./data/替换为.data以符合Windows路径规范。请注意,本分析涉及大量数据与复杂计算,运行耗时较长:实证分析单此一项最多耗时可达1天;在8核服务器上,模拟分析可能耗时数周,若从下述代码仓库下载beta_lookup_table.pck文件并放置于同一目录下,可将耗时缩短至约1周。生成图件约需1小时,这是由于观测-预测图的色阶绘制需进行邻域计算。 版本控制仓库:本项目(包含出版后的更新内容)的完整版本控制仓库可公开访问,地址为https://github.com/weecology/white-et-al-2012。该仓库中的代码依赖两个额外模块:https://github.com/weecology/METE与https://github.com/weecology/macroecotools。若您希望使用本补充材料中的代码开展自主分析,强烈建议使用上述仓库中的对应代码,因其为当前处于活跃维护与开发中的版本。若仓库发生迁移,相关链接将始终可通过http://weecology.org获取。 数据使用说明:本补充材料中提供的数据仅用于复现论文分析,并非为通用扩展分析场景设计。若您希望将这些数据集用于其他研究,需从相应的数据提供方获取授权或原始数据。针对BBS、MCDB、FIA及Gentry这四个数据集,可通过EcoData Retriever工具(http://ecologicaldata.org/ecodata-retriever)自动完成数据获取。 软件许可:所有代码采用标准MIT许可证进行授权。版权所有©2011 Weecology。特此免费授予任何获得本软件及相关文档文件(以下简称"软件")的个人无限制使用软件的权利,包括但不限于使用、复制、修改、合并、发布、分发、再许可及销售软件副本的权利,并允许向其提供软件的人员在符合以下条件的前提下使用上述权利:上述版权声明与本许可声明应包含在所有软件副本或其主要部分中。本软件按"原样"提供,不附带任何明示或暗示的担保,包括但不限于适销性、特定用途适用性及非侵权的担保。在任何情况下,作者或版权持有人均不对因本软件或本软件的使用或其他交易而产生的任何索赔、损害赔偿或其他责任负责,无论该责任是基于合同、侵权还是其他形式的法律关系。
提供机构:
Wiley
创建时间:
2016-08-09
二维码
社区交流群
二维码
科研交流群
商业服务