Skip to main content

Package for making zones of armed conflicts.

Project description

Wzone is a package for generating zones of armed conflicts. The package contains functionalities for querying and creating conflict zones in the ESRI ASCII raster format. The methodological details can be found here (TBD). The package greatly relies on the UCDPGED (version 17.1) compiled by the Uppsala Conflict Data Program.

Installing

Install and update using pip:

pip install wzone

An Example

import wzone
import tempfile

# list of UCDPGED conflict IDs relevant to state-based violence in Somalia
somalia_ids = wzone.find_ids(country='Somalia', type_of_violence=1)   ### [329, 337, 418, 13646]

# Yearly sequence of dates from the first to the last events for each conflict
somalia_dates = wzone.find_dates(ids=somalia_ids, interval='year')   ### somalia_dates[1][0] == '1989-01-01'

# select a test case
test_id = 337
test_date = '2010-01-01'

# create war zones
tmp_dir = tempfile.mkdtemp()
somalia_path = wzone.gen_wzones(dates=test_date, ids=test_id, out_dir=tmp_dir)
print somalia_path

# You can continue this example with a variety of functions in other GIS packages.
### For arcpy users, refer to arcpy.ASCIIToRaster_conversion function.
### For gdal users, refer to gdal.Open function.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wzone-0.2.4.tar.gz (9.1 kB view hashes)

Uploaded Source

Built Distribution

wzone-0.2.4-py2-none-any.whl (8.4 MB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page