Hello,

I'm working on a research paper in which I'm examining the relationship between sea surface temperature and lobster landings in the Gulf of Maine from 2000 - 2021. I've isolated three regions of ocean off the coast of Maine and designated them areas 1, 2, and 3, as seen below. I then found the average temperature by year for each separate region.

replace area = 1 if (lat>40 & lat<45) & (lon<-69.2 & lon>-71)
replace area = 2 if (lat>40 & lat<45) & (lon<-68.25 & lon>-69.2)
replace area = 3 if (lat>40 & lat<45) & (lon<-67 & lon>-68.25)

keep if (area==1) | (area==2) | (area==3)

bys year: egen mean_temp1 = mean(v) if (area==1)
bys year: egen mean_temp2 = mean(v) if (area==2)
bys year: egen mean_temp3 = mean(v) if (area==3)

My data appears in Stata as seen below.

Year month lat lon v(temp) area mean_temp1 mean_temp2 mean_temp3
2003 1 40.5 -70.5 9.07 1 11.03568
2003 1 40.5 -69.5 7.32 1 11.03568
2003 1 40.5 -68.5 9.94 2 10.59574
2003 1 40.5 -67.5 10.67 3 10.34583
2003 1 41.5 -70.5 5.28 1 11.03568
2003 1 41.5 -69.5 6.89 1 11.03568


Now, I'm attempting to import county level landings data to find a correlation between sea surface temperature and landings from year to year. I'm examining 7 counties (Cumberland, Hancock, Knox, Lincoln, Sagadahoc, Washington, and York). Due to my limited experience in Stata, I'm having two issues:

1.What's the best way to import the county data? I have each county's data in a separate CSV file within which the data is presented as seen below (2000-2021). How can I import the data so that the landings (pounds/value) is arranged next to the years already in my dataset (to make for smooth regressions)?
Year Pounds Value
2000 9,519,281 $30,514,219
2001 6,520,260 $19,803,951
2002 9,591,508 $31,220,418
2003 5,595,642 $20,519,959
2004 9,255,280 $36,591,790
2. Once each county's dataset is imported, what command do I use to assign counties to each of the three temperature areas (1,2,3) that I described above? For context, I'm trying to show that counties with ports in region 3, which has the coldest sea surface temperatures, have experienced the most growth in lobster landings over the past 20 years.


Apologies if this was a confusing explanation of my questions-- I have limited experience doing research in Stata and any advice is appreciated. Happy to answer any clarifying questions. Thank you.