GithubHelp home page GithubHelp logo

lisa-stubert / premo Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 212.91 MB

Python package to calculate suitabilities of archaeological site locations and determine the underlying factors of their distribution

Python 100.00%
predictive-modeling prediction archeology species-distribution-modelling predictive-analysis geographical-information-system

premo's Introduction

PreMo - Predictive modelling Python package

This Python scripts were created and used to calculate predictive models for an archaeological study about viticulture in ancient Spain: Viticulture in the Laetanian Region (Spain) during the Roman Period: Predictive Modelling and Geomatic Analysis. The approach was to take a data set (point locations) of existing archeological sites and to determine the underlying factors of their distribution. Therefore the script predicts zones of high suitability that were associated with Roman viticulture, based on the location characteristics of the sites. As predictor variables different rasters (for example a digital elevation model and cost distances to ancient settlements) of the study area were used.

Licence and publication

License: CC BY-NC 4.0 Please cite the paper when using the code.

Stubert, L.; Martín i Oliveras, A.; Märker, M.; Schernthanner, H.; Vogel, S. Viticulture in the Laetanian Region (Spain) during the Roman Period: Predictive Modelling and Geomatic Analysis. Geosciences 2020, 10, 206.

What can this approach be used for

The script makes it possible to automate analyses that would otherwise have to be carried out in a classic GIS using many steps. The application of this predictive modelling algorithm is not limited to the specific field of archaeology. In contrast, this methodology may also be used in other scientific fields, such as ecology to model species distributions or in economic geography for production site analysis.

How it works

The functionality of the predictive modelling algorithm is described in the study "Viticulture in the Laetanian Region (Spain) during the Roman Empire: Predictive modelling and spatial analysis".

Usage

The script was written for usage with Python 3.6.7.

  • Download or clone the repository:
git clone https://github.com/lstubert/PreMo.git
  • Download all required packages (see Requirements).

  • Set your working directory in set_data_paths.py.

  • For testing the script with the provided test data, execute run_modelling.py. The output data of a suitability raster and statistical results is saved in the Results-Directory.

  • For usage with own data, save the data sets of buffered location points (as shapefiles, make sure to adopt the naming convention of the files) and the predictor rasters (as GeoTiffs) in the data-directory. Change the paths to the data in set_data_paths.py.

  • Set the parameters that should be used to calculate the predictive models in run_modelling.py.

# insert all combinations of predictor variables, used to calculate models
combinations = {
    "example": ['t_slope', 't_wind', 't_dir_in', 'c_rivers', 'c_coast', 'c_prim_set', 'c_sec_set', 'c_allroads'],
}

# set the size(s) of your buffered site location(s)
buffer_sizes = ['50','100'] 

# set the weighting(s) that should be used
weightings = ['w1','w2'] # w0 = no weighting, w1 = weighting with IQRnorm, w2 = weighting wE after Ejstrud, w3 = weighting after Saaty

# set thresholds if you want to calculate models by automated variable selection (if you want to calculate models by experts selection, set statistic threshold to 100 and correlation threshold to 1) 
statistic_thresholds = [3]
statistic_threshold_types = ['iqr_norm'] # w2 = selection by ranked wE after Ejstrud, iqr_norm = selection by ranked IQR norm
corr_thresholds = [1]

# set cross-validation on or off
test = False  # True or False

Documentation of modules

The documentation of the submoduls can be found here: https://premo.readthedocs.io/en/latest/

Requirements

Please feel free to contact me for bug reports, questions and comments.

premo's People

Contributors

lisa-stubert avatar lstubert avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.