wzone 0.2.4

Creator: bradpython12

Last updated:

Add to Cart

Description:

wzone 0.2.4

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.


Links

Website: https://github.com/kyosuke-kkt/wzone/
License: GPL-3
Releases: https://pypi.org/project/wzone/

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.