-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.Rmd
63 lines (43 loc) · 3.5 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
output: github_document
resource_files:
vignettes/bib/mapspamc.bib
bibliography: vignettes/bib/mapspamc.bib
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# mapspamc
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
<!-- badges: end -->
The aim of the [`mapspamc` R package](https://github.com/michielvandijk/mapspamc) is to facilitate the creation of country level crop distribution maps. The model builds on the global version of the [Spatial Production Allocation model (SPAM)](http://www.mapspam.info) [@You2006; @You2009; @You2014a; @Yu2020], which uses a cross-entropy optimization approach to 'pixelate' national and subnational crop statistics on a spatial grid at a resolution of 5 arc minutes (~ 10 x 10 km). `mapspamc` provides the necessary infrastructure to run SPAM at the country level and makes it possible to incorporate national sources of information and potentially create maps at a higher resolution of 30 arc seconds (~ 1 x 1 km)[@VanDijk2022b].
The articles in the Background section provide general information on approaches to create [crop distribution maps](articles/crop_distribution_maps.html), the [model](articles/model_description.html), [input data](articles/input_data.html), [country examples](articles/country_examples.html) and an [appendix](articles/appendix.html) with additional information on specific topics.
## Installation
To install `mapspamc`:
``` r
install.packages("remotes")
remotes::install_github("michielvandijk/mapspamc")
```
Running `mapspamc` requires the installation of several other pieces of software, which are described in the [Installation](articles/installation.html) section.
## Preparation
It takes some preparation before the crop distribution maps can be generated. Most important and probably most time consuming is the collection of input data. `mapspamc` requires a large variety of input data, which can be grouped under three headers: (1) national crop statistics, (2) data to construct the priors/fitness scores and (3) data to determine the spatial constraints. The availability of data strongly affects the structure of the model, how it will be solved and how long it takes to solve. We highly recommend to start collecting input data before running the model. The articles in the Background section give an overview of the [input data](articles/input_data.html) that are required by the package and show were to download several [country examples](articles/country_examples.html).
## Run `mapspamc`
Running `mapspamc` can be divided into six major steps which are split into nine smaller steps in the Run mapspamc section.
- [Design and process flow](articles/design.html)
- [1. Model setup](articles/model_setup.html)
- [2.1. Pre-processing - Subnational statistics](articles/preprocessing_subnational_statistics.html)
- [2.2. Pre-processing - Spatial data](articles/preprocessing_spatial_data.html)
- [2.3. Pre-processing - cropland](articles/preprocessing_cropland.html)
- [2.4. Pre-processing - irrigated area](articles/preprocessing_irrigated_area.html)
- [3. Model preparation](articles/model_preparation.html)
- [4. Running the model](articles/run_model.html)
- [5. Post-processing](articles/postprocessing.html)
- [6. Model validation](articles/model_validation.html)
## References