Skip to content

Jupyter notebooks and python scripts for performing the ViEWS monthly forecasts

License

Notifications You must be signed in to change notification settings

prio-data/viewsforecasting

Repository files navigation

README

This repository collects all source code and documentation of the fatalities model used by the Violence & Impacts Early-Warning System (VIEWS) to predict the number of fatalities in impending conflict.

  • The Documentation folder documents the models that inform the VIEWS forecasts.

    • The Ensemble_{type of violence} files provides an overview of the sub-models that inform the concerned ensemble models. They list the so-called feature- or querysets and the algorithms that inform each sub-model, a short descriptions of the sub-models, and the dependent/outcome variables for which the sub-models are trained to generate predictions.
    • The Model_ files, in turn, document the data variables that feed into each of the aforementioned feature- or querysets, i.e. the groups of related input variables that inform the sub-models.
      • The Model column specifies the concerned feature- or queryset. For clarity, it also contains a reference to the model ensemble for which it was created. Taken together, each entry is constructed as {model name}{model version}_{queryset name}.
      • Database variable name is constructed as {table in the VIEWS3 database}.{raw data variable}, where the latter refers to the raw data ingested from a given data provider, aggregated to the VIEWS levels of analysis where needed.
    • Transformations lists the transformation we apply to the raw data in the next step of our data processing. This includes filling in for missing data, adding log transformations, temporal decays, time- and space lags to capture effects on neighbouring areas, and so forth. To learn more about our transform operations, please see the VIEWS Transformations Library.
    • Included variable name lists the processed variables that ultimately inform our prediction models, generated by applying the listed transformations to the corresponding raw data variables.
  • The Intermediates folder is a storage space for rarely-updated files containing, e.g., genetic weights used in computing the ensembles and json files used in codebooks published on the API'.

  • MonthlyUpdates contain the high-level code required to produce the monthly updates of the VIEWS forecasts (the cm_futurepredictions and pgm_futurepredictions notebooks). It also contains a set of Jupyter notebooks that allow users to explore, visualize, and download data from the VIEWS database, such as our monthly prediction datasets, or sub-sets of input data.

  • SystemUpdates contain the high-level code required to train and evaluate our models.

  • Tools contains low-level code for defining ensembles, constituent models, and the querysets they rely upon, for import into the high-level notebooks.

Funding

The contents of this repository is the outcome of projects that have received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (Grant agreement No. 694640, ViEWS) and Horizon Europe (Grant agreement No. 101055176, ANTICIPATE; and No. 101069312, ViEWS (ERC-2022-POC1)), Riksbankens Jubileumsfond (Grant agreement No. M21-0002, Societies at Risk), Uppsala University, Peace Research Institute Oslo, the United Nations Economic and Social Commission for Western Asia (ViEWS-ESCWA), the United Kingdom Foreign, Commonwealth & Development Office (GSRA – Forecasting Fatalities in Armed Conflict), the Swedish Research Council (DEMSCORE), the Swedish Foundation for Strategic Environmental Research (MISTRA Geopolitics), the Norwegian MFA (Conflict Trends QZA-18/0227), and the United Nations High Commissioner for Refugees (the Sahel Predictive Analytics project).

Authors and contributors

Authors and contributors are acknowledged in the commit history of the repository. Pre-2021 contributions are credited in the pyproject.toml files.

Copyright

The Violence & Impacts Early-Warning System (VIEWS), 2017 -

How to cite

Please use the following references when using the resources in this repository:

Hegre, H. et al. (2022) ‘Forecasting fatalities’, Uppsala University, technical report. URN: urn:nbn:se:uu:diva-476476.

Hegre, H. et al. (2021) ‘ViEWS2020: Revising and evaluating the ViEWS political Violence Early-Warning System’, Journal of Peace Research, 58(3), pp. 599–611. doi: 10.1177/0022343320962157.

Further reading

To learn more about the VIEWS forecasts and methodology, please visit our website, see the introductory article and the special data feature on ViEWS2 in Journal of Peace Research:

Hegre, H. et al. (2021) ‘ViEWS2020: Revising and evaluating the ViEWS political Violence Early-Warning System’, Journal of Peace Research, 58(3), pp. 599–611. doi: 10.1177/0022343320962157.

Hegre, H. et al. (2019) ‘ViEWS: A political violence early-warning system’, Journal of Peace Research, 56(2), pp. 155–174. doi: 10.1177/0022343319823860.

To learn more about the conflict datasets informing the ViEWS forecasts, namely UCDP-GED and UCDP-Candidate, please see:

Hegre, H. et al. (2020) ‘Introducing the UCDP Candidate Events Dataset’, Research & Politics. doi: 10.1177/2053168020935257.

Pettersson, T. et al. (2021). Organized violence 1989-2020, with a special emphasis on Syria. Journal of Peace Research 58(4).

Sundberg, R. et al. (2013). Introducing the UCDP Georeferenced Event Dataset. Journal of Peace Research 50(4).

About

Jupyter notebooks and python scripts for performing the ViEWS monthly forecasts

Resources

License

Stars

Watchers

Forks

Packages

No packages published