Giter Site home page Giter Site logo

data-to-coup's Introduction

Data To Coup

Requirements: Python 2.7, Anaconda with following python libraries installed

  1. numpy
  2. pandas
  3. sklearn
  4. matplotlib
  5. patsy

Models used:

  • Random Forest
  • AdaBoost
  • Logistic Regression

Problem Statement: Considering social and political instabilities that have occurred in recent times, I want predict the likelihood of a coup d'etat within a country, given specific economic, political and social factors.

  • Economic factors: income per capita, growth rate
  • Social factors: accounts of ethnic violence, religious, linguistic, and ethnic fractionalization, fatalities from violence, urbanization
  • Political factors: polity score, length of stay for incumbent head of state

Data Dictionary:

Variable Description Data Type Variable Type
country Country Name Object Unique
coup 1 = Coup(successful and attempted), 0 = No coup Integer Binary
gdppercap GDP per capita Float Continuous
gdpgrowth GDP growth rate Float Continuous
urbanpop Percentage of urban population Float Continuous
gendeathmag Scaled annual number of deaths (range 0-5.0) Float Categorical Ordinal
revmagfight Scaled annual number of fatalities related to revolutionary fighting (range 0-4) Integer Categorical Ordinal
ethmagfatal Scaled annual number of fatalities related to ethnic fighting (range 0-4) Integer Categorical Ordinal
revmagfatal Scaled number of rebel combatants or activists in revolutionary war (range 0-4) Integer Categorical Ordinal
ethmagfight Scaled number of rebel combatants or activists in ethnic war (range 0-4) Integer Categorical Ordinal
polity2 Polity scale ranging from +10 (strongly democratic) to -10 (strongly autocratic) Integer Categorical Non-Ordinal
durable Regime durabilty: the number of years since the most recent regime Float Categorical Ordinal
yip Number of years head of state has been in power Integer Continuous
none No violence occured Float Binary
eth Indicates the occurence of an ethnic violence Float Binary
rev Indicates the occurence of a revolutionary violence Float Binary
gen Indicates the occurence of a genocide Float Binary
ethnic Ethnic Fractionalization Float Continuous
linguistic Linguistic Fractionalization Float Continuous
religious Religious Fractionalization Float Continuous

A more detailed explanation of this project can be found on my website

data-to-coup's People

Contributors

lasisioo 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.