O IN L J IA AT SP Spatial Join Calculating Number of Physician per Population 2 GIS in Health and Planning 2 01 1/ 2012 Spring3/ Rutgers University by Wansoo Im, Ph.D.
Download census tract 2000 file-www.state.nj.us/dep/gisDownload Municipal boundaries-https://njgin.state.nj.us“doctor point location layer” (downlaod from Sakai )Census tract map/Municipality boundaries=>Add All Maps in Arc GIS
CENSUS TRACT : OPEN ATTRIBUTE TABLEIn order to see what kind of information it has
DOCTOR LOCATION LAYER : OPEN ATTRIBUTE TABLEIn order to see what kind of information it has
HOW TO JOIN LOCATIONAL DATA WITH DATA FROMANOTHER LAYER?Based on the location, we will join doctor’s location into Census tract layer.
CLICK “DATA FROM ANOTHER LAYER BASED ONSPATIAL LOCATION”
SELECT “THE LAYER(CENSUS TRACT)” WHICH YOUWANT TO JOIN WITH DOCTOR LOCATION
SET THE DIRECTORY(LOCATION TO SAVE YOURSHAPEFILE) -> CLICK “SHAPEFILE”
OPEN ATTRIBUTE TABLE TO CHECK IF NEWLAYER(DOCTOR CTR) IS SUCCESSFULLY JOINTBy opening attribute table, you can check if data from 2 original layers(doctor points/census tract information) are included into a newly-created shapefiles.
EXCEL – PIVOT TABLEObjectives :We are going to export data from maps into dbf.(dbf. File includes the information of table, therefore, all shapefiles including data in the table have dbf. file)Open dbf. File in ExcelBy using Pivot table, we will calculate the number of doctors by each census tract(the number of doctors belonging to each census tract)
OPEN ATTRIBUTE TABLE OF DOC_CTR LAYERClick the menu icon to export data from table.
WHY WE EXPORT DATA FROM TABLE?(DBF. FORMAT) Originally Doc_CTR shapefile already has one dbf.file, however, if we start to open it in the excel and modify, we can possibly affect the original map data as the table is directly linked to a map. Therefore, we would like to export data from the original table so as to create new dbf. File(so to speak, “copy” dbf. file). In this way, we can adjust data(by using a new dbf. File) in Excel regardless of affecting original data in the map.
CREATE NEW FIELD (FOR DOCTORS/POPULATION)->RIGHT CLICK TO DO “FIELD CALCULATING”
FIELD CALCULATORBut you will have 0 if denominator(total population2000=0) is 0Select the data which population 2000 is more than 0Use Field Calculator to use formula (number of doctors/population*100)
2 WAYS FOR SELECTION1. Select by Attribute select the layer “census 2000”, and select the field “population2000” put formulaPop2000>0 ->click apply2. Sorting Ascending in Attribute TableOpen Attribute table, sort the data regarding population 2000, and select data which is more than 0 in population 2000 field.
IF THERE’S NULL DATA => ERROR!!!Population should be over 0 ANDNumber of doctors shouldn’t be null dataTherefore, number of doctor is more than 0 and calculate it again(Assume that if there’s doctor, population is over 0)
YOU WILL GET NO.DOCTORS PER POPULATIONPERCENTAGE IN NEW FIELD YOU CREATED.