[GRASSLIST:175] RE: calculating distances

Patton, Eric epatton at nrcan.gc.ca
Thu Mar 16 11:32:16 EST 2006


Scott,

Sounds very interesting. A couple of thoughts - if you have coordinates,
then these can be imported as vector points (v.in.ascii). Attribute tables
in dbf files can also be connected to the vector point geometry with
v.db.connect. Grass will also import MapInfo and ArcGIS format vectors
(v.in.ogr). If you also import the abortion provider sites as a separate
vector, you could then run v.distance to extract distances between
respondent and site either to another file, or upload the distances to one
of the input attribute tables.

http://grass.itc.it/grass61/manuals/html61_user/v.distance.html

I'm not sure about where to find coordinates of each county, but the US
gov't must have this data available somewhere. Have you checked the TIGER
database? I'm from Canada, so I never have the need to use these datasets.

--
Eric Patton 
epatton at nrcan.gc.ca

-----Original Message-----
From: Scott Cunningham [mailto:scunning at gmail.com] 
Sent: Thursday, March 16, 2006 11:03 AM
To: Patton, Eric
Subject: Re: [GRASSLIST:164] calculating distances


On Mar 16, 2006, at 9:46 AM, Patton, Eric wrote:

> If you have 2000 'girls' and 10 years of observations, with 2000 
> observations per year, then you have 2000 * 2000 * 10 = 40,000,000 
> 'observations'.

Sorry, that wasn't clear.  It's 2000 girls per year, for 10 years.   
Not 2000 observations on 2000 girls for 10 years.  The observation that I am
interested in, from the perspective of GRASS, is each girl's county
residence in each year.

> Can you explain more about the dataset? It's not clear what kind of 
> data you're using or how it's organized - like what does an 
> 'observation'
> measure? Does your data exist in a dbf or database? etc, etc...

My data is the National Longitudinal Survey of Youth (1997) with geographic
identifiers.  The NLYS97, as its called, started in 1997 and sampled a
representative sample of 12-17 (American) year olds, with oversampling of
African-Americans.  IT has followed those same roughly 9000 individuals
every year, with relatively small attrition in the survey.  One of my
projects is to estimate the effect of abortion restrictiveness on female
pregnancy risk - specifically, timing to sexual debut, timing to
non-contraceptive sexual debut, contemporaneous sexual frequency and
contemporaneous contraceptive use.  The theoretical motivation of the paper
is that increasing the costs of abortion access raises the total cost of
abortion, and therefore affects the probability that a female will become
pregnant.  This happen because, in the model, it is a sequential decision,
where contraception is costly and the pregnancy risk is made first in the
chain of events.  It is based on Levine and Staiger's 2002 NBER working
paper, "Abortion as Insurance."

Because adolescent girls living in a state with a parental involvement law
(ie, a law requiring an adolescent to get parental permission or simply to
notify them the abortion will take place) can migrate to a nearby state (ie,
one that does not have parental involvement laws) to acquire an abortion, I
have to control for each respondent's proximity to an abortion provider in a
state without a parental involvement law.  Currently, I have data on each
respondent's county, MSA and state of residence.  I also have a separate
dataset (currently en route) from an agency that collects data on abortion
access. This dataset has data on abortion providers at the county level over
the time period I'm interested in.  Not their physical address, but simply
an indicator variable indicating "1"  if the county has an abortion
provider, and "0" otherwise.

So, what I need to do is calculate annual distances to the nearest abortion
provider.  I think that I can do this without using GRASS, as I have found a
separate program that can do it, but to do so, I  
need the latitude and longitude of each county in the United States.   
 From there, I will need to calculate the distance between each county
centroid and the centroid of the county with an abortion provider.  I am
only interested in the counties in which NLSY97 respondents live.


sc




More information about the grass-user mailing list