The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Egypt » Egypt DHS District Data
Egypt DHS District Data [message #688] Sat, 17 August 2013 20:11 Go to next message
amira.elshal.1@city.ac.uk is currently offline  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 #746 is a reply to message #688] Fri, 06 September 2013 08:59 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3016
Registered: February 2013
Senior Member
Here is a response from one of our Senior Data Processing Specialists, Noureddine Abderrahim:

Egypt DHS 2008 did not collect the district codes in the questionnaire. You might want to check with the implementing agency, to see if they still have the districts of the enumeration areas that are included in the survey. The address of the implementing agency can be found in the final report of the survey which might be downloaded from the website.

Re: Egypt DHS District Data [message #1520 is a reply to message #746] Thu, 06 March 2014 17:01 Go to previous messageGo to next message
amira.elshal.1@city.ac.uk is currently offline  amira.elshal.1@city.ac.uk
Messages: 52
Registered: April 2013
Senior Member
Thank you for your kind reply.

Can I identify the district to which a questionned woman belong to using GPS data?

Thank you again.

Amira
Re: Egypt DHS District Data [message #1535 is a reply to message #1520] Mon, 10 March 2014 15:39 Go to previous messageGo to next message
user-rhs is currently offline  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 #1540 is a reply to message #1535] Tue, 11 March 2014 05:07 Go to previous messageGo to next message
amira.elshal.1@city.ac.uk is currently offline  amira.elshal.1@city.ac.uk
Messages: 52
Registered: April 2013
Senior Member
I cannot thank you enough for your prompt reply.

The problem is that it is the first time I use GPS data to join individuals to particular administrative divisions. So I need to be very carfeul.

Do you recommend any basic manuals to me to read? To teach me to import data to QGIS, etc?

Thank you again.

Amira
Re: Egypt DHS District Data [message #1547 is a reply to message #1540] Tue, 11 March 2014 10:26 Go to previous messageGo to next message
Josh-DHS is currently offline  Josh-DHS
Messages: 19
Registered: November 2013
Member
Dear Amira,

For guidance on how to carry out a spatial join in QGIS and for information on our QGIS curriculum, please see our response to your post on this forum thread http://userforum.dhsprogram.com/index.php?t=rview&goto=1 532#msg_1532 .

If this has not answered your question adequately, please reply.

Josh
Re: Egypt DHS District Data [message #1595 is a reply to message #1547] Sun, 16 March 2014 09:10 Go to previous messageGo to next message
amira.elshal.1@city.ac.uk is currently offline  amira.elshal.1@city.ac.uk
Messages: 52
Registered: April 2013
Senior Member
Dear Josh,

As I understand, I have to join the woman to the GPS data via the cluster variable (v001 in the individual recode file and DHSCLUST in the GPS data) before importing it into your QGIS.

I now know how to import data to and use QGIS, but I do not know how to first join the woman to the GPS data. I identified v001 in my .dta individual recode file and the DHSCLUST in the GPS file but I fail to join them.

Please advise.

Thank you.

Amira
Re: Egypt DHS District Data [message #1597 is a reply to message #1595] Sun, 16 March 2014 14:59 Go to previous messageGo to next message
user-rhs is currently offline  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:

index.php?t=getfile&id=133&private=0


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 #1600 is a reply to message #1597] Mon, 17 March 2014 07:37 Go to previous messageGo to next message
amira.elshal.1@city.ac.uk is currently offline  amira.elshal.1@city.ac.uk
Messages: 52
Registered: April 2013
Senior Member
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
Re: Egypt DHS District Data [message #1601 is a reply to message #1597] Mon, 17 March 2014 07:56 Go to previous messageGo to next message
amira.elshal.1@city.ac.uk is currently offline  amira.elshal.1@city.ac.uk
Messages: 52
Registered: April 2013
Senior Member
Dear RHS,

I have to (1) first spatially join GIS data in QGIS, i.e. join the shapefile from Egypt's GPS DHS folder AND the EGYPT GADM shapefile. Am I right?

The next step is to (2) import the output file of step (1) to STATA to merge it with the Egypt DHS Woman's recode file. Is that correct?

Thank you very much. And apologies for disturbing you.

Amira
Re: Egypt DHS District Data [message #1605 is a reply to message #1600] Mon, 17 March 2014 11:30 Go to previous messageGo to next message
user-rhs is currently offline  user-rhs
Messages: 132
Registered: December 2013
Senior Member
Amira,
That is correct. The data from your joined shapefile (the one that has the info from the DHS GIS file PLUS the district names) is in the file with extension DBF (you can open this in Excel).

You can get the DBF data into Stata following these steps: http://www.ats.ucla.edu/stat/stata/faq/odbc.htm or what is described here (the part about -insheet-): http://www.stata.com/statalist/archive/2010-05/msg01004.html

or you can do what I do and open DBF in Excel-->Select all-->Copy, open Stata, type edit in the command window and paste into the data editor window. It should ask you whether you want to treat the first row as variable names, in which case, you should choose that option.


Note: When you open the DBF file in Excel, make sure all of the rows have a value for DHSCLUST so you can merge it in Stata.



RHS
Re: Egypt DHS District Data [message #1606 is a reply to message #1600] Mon, 17 March 2014 14:13 Go to previous messageGo to next message
user-rhs is currently offline  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 #1624 is a reply to message #1605] Wed, 19 March 2014 09:36 Go to previous messageGo to next message
amira.elshal.1@city.ac.uk is currently offline  amira.elshal.1@city.ac.uk
Messages: 52
Registered: April 2013
Senior Member
One more question if you please: may you kindly advise on a reliable source from which I can obtain Egypt's district names?

Thank you again.

Amira
Re: Egypt DHS District Data [message #1626 is a reply to message #1624] Wed, 19 March 2014 10:30 Go to previous messageGo to next message
user-rhs is currently offline  user-rhs
Messages: 132
Registered: December 2013
Senior Member
Egypt's ministry of health, national statistics agency, your own university may have resources. You should check with your supervisors.
Re: Egypt DHS District Data [message #1647 is a reply to message #1626] Fri, 21 March 2014 11:34 Go to previous messageGo to next message
amira.elshal.1@city.ac.uk is currently offline  amira.elshal.1@city.ac.uk
Messages: 52
Registered: April 2013
Senior Member
Thank you very much.

The GIS polygon data of Egypt I imported from GADM only gives the governorate boundaries, not the district boundaries

I do have Egypt's district names, but not the district boundaries.

Please advise.

Amira
Re: Egypt DHS District Data [message #1651 is a reply to message #1647] Fri, 21 March 2014 17:50 Go to previous message
user-rhs is currently offline  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

Previous Topic: 2000 DHS: Anemia prevalence estimates for adolescents
Next Topic: Spatial Join in QGIS 2.2
Goto Forum:
  


Current Time: Thu Mar 28 08:04:46 Coordinated Universal Time 2024