Home » Countries » Egypt » Egypt DHS District Data
Egypt DHS District Data [message #688] |
Sat, 17 August 2013 20:11 |
amira.elshal.1@city.ac.uk
Messages: 52 Registered: April 2013
|
Senior Member |
|
|
Dear Sirs,
In the results of Egypt's ever-married questionnaire of DHS 2008, how can I know to which district an interviewed woman belong? I can check the governorate, but I cannot find the district. I need to compare between reformed and non-reformed districts.
Thank you.
Sincerely,
Amira
|
|
|
|
|
Re: Egypt DHS District Data [message #1535 is a reply to message #1520] |
Mon, 10 March 2014 15:39 |
|
user-rhs
Messages: 132 Registered: December 2013
|
Senior Member |
|
|
Dear Amira,
You can join the woman to the GPS data via the cluster variable (v001 in the individual recode file, and DHSCLUST in the GPS data--I think). Once you have joined the dataset, import it into your GIS software of choice, and you can spatially merge the DHS cluster location points to whatever administrative boundary layer(s) you have in GIS. Note, though, as previously discussed on this forum, the DHS cluster centroid points are only "guaranteed" to land on the correct DHS REGION (variable v024) and not administrative levels below the region (i.e. district, subdistrict, etc.), because these points are randomly displaced. However, the documentation says the bias is quite small. I will post a link to the previous thread when I find it.
HTH,
RHS
UPDATE: Here's a previous thread about district names and confidentiality: http://userforum.dhsprogram.com/index.php?t=msg&th=36&am p;goto=96&S=54389fca305f588b8b76cb6f5059eedf#msg_96
Here's another one that talks about displacement generally http://userforum.dhsprogram.com/index.php?t=msg&th=19&am p;goto=30&S=54389fca305f588b8b76cb6f5059eedf#msg_30
[Updated on: Mon, 10 March 2014 15:43] Report message to a moderator
|
|
|
|
|
|
Re: Egypt DHS District Data [message #1597 is a reply to message #1595] |
Sun, 16 March 2014 14:59 |
|
user-rhs
Messages: 132 Registered: December 2013
|
Senior Member |
|
|
Amira,
I'm not a QGIS user, so my explanation is how to do the join in ArcGIS. I imagine the steps are translatable to QGIS. If you do not know how to do them in QGIS, consult the user manual or help file for QGIS (http://www.qgis.org/en/docs/).
The way I would do it is to spatially join GIS data first in QGIS, and THEN once I have the district info (from the spatial join), I would join with the rest of the DHS woman's recode file in my statistical software.
To do this:
1. Join the GIS data spatially in QGIS. When you download the GIS file from the DHS site, unzip the entire folder into its own folder in the working directory. It is crucial that your working folder has all of the files in that zip file in there (file extensions DBF, PRJ, SBN, SBX, SHP, etc.), because those files are what will allow you to plot the cluster centroids on your map. Here's a screenshot of where I unzipped some Ethiopia DHS GIS files so I can spatially merge it with a layer that contains Woreda boundaries:
2. Open QGIS, and add the Egypt administrative boundary layers (province, district, etc.) that you want to join to the DHS data.
3. Then import the data points into QGIS.
4. Spatially join the data points with the district layer. You do a spatial join because there is no identifier that is common to the district layer and your DHSGIS file that would allow you to join by variable.
5. If you have the option of exporting the joined layer as a new layer or new shapefile, select that option. Make note of where the file will be saved, as the software will create all of the files necessary to map that layer the next time you open it in QGIS.
The next steps assume that QGIS creates a DBF file when you export a joined layer. DBF is basically where the data are stored. This DBF file will contain the original variables in the DHSGIS file in addition to the data from the boundary layer, namely, the district names you are interested in.
6. Take the DBF (or however QGIS stores the data from the spatial join) and import it into your statistical package (SAS, Stata, SPSS, etc.). Rename DHSCLUST into v001 and sort by v001. Join with the DHS woman's recode file using the v001 variable, taking care to sort the woman's recode file by v001 before joining w/ the DHS file.
Opening the joined file in different packages:If you are a SAS user, you can import the DBF directly using
proc import out= dhs_geoc
datafile= "&loc.\JOINED FILE LOCATION\joined_file_name.dbf"
dbms=dbf replace;
run;
If you are a Stata user, you should open the DBF in Excel, select the entire sheet, copy, and then manually paste into a Stata data editor window.
Since I don't work in SPSS unless I really have to, I can't tell you the exact steps, but I assume it's fairly straightforward to open DBFs (file->open->change file type to "all", etc.). Stata is the stubborn one when it comes to opening files that are not "stata data file" format.
hth,
RHS
[Updated on: Sun, 16 March 2014 15:02] Report message to a moderator
|
|
|
|
|
|
Re: Egypt DHS District Data [message #1606 is a reply to message #1600] |
Mon, 17 March 2014 14:13 |
|
user-rhs
Messages: 132 Registered: December 2013
|
Senior Member |
|
|
Quote:Dear RHS,
To spatially join GIS data first in QGIS, I first downloaded the GIS file from the DHS website and unzipped the entire folder into its own folder in the working directory.
I then opened QGIS, pressed "ADD VECTOR LAYER", browsed to my GPS DHS 2008 folder, selected EGGE5DFL.shp, then pressed open.
There appeared something like a map.
I then clicked Vector > Data Management Tools> Join attributes by location.
I am now supposed to set Target vector layer field to Cities_Settlements_0000 and set Join vector layer to DHS_Regions. (See Attached File), but I could not. Both the target and the join vector layer fields can only be set to EGGE5DFL.
Please advise.
Thank you.
Amira
Amira, is "Cities_Settlements_0000" what you have named the layer with district boundaries? If you have both layers in there, you should be able to make the join.
RHS
|
|
|
|
|
|
Re: Egypt DHS District Data [message #1651 is a reply to message #1647] |
Fri, 21 March 2014 17:50 |
|
user-rhs
Messages: 132 Registered: December 2013
|
Senior Member |
|
|
E-mail your university's geography department professors, development economics professors, public health professors, etc. or do a Google search for Egypt district shapefiles. That's what I would do if I were in your situation. Take advantage of the fact that you are still at university and ask within your faculty.
It's also probably a good idea to schedule an appointment with someone in your university that can show you how to get started using QGIS. Good luck.
[Updated on: Fri, 21 March 2014 17:50] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon Oct 7 14:36:31 Coordinated Universal Time 2024
|