Skip to content

Match coordinates with NUTS3 regions

2 messages · Michele Molteni, Bede-Fazekas Ákos

#
Hi everyone,

I have a .dta file with coordinates (WGS 84) and I would like to match them
to NUTS3 regions. I followed indications from a previous post but I get no
match even though the coordinates fall within NUTS3 bboxes. Could you
please be so kind to help me understand what I am doing wrong? This is what
I have so far:
https://ec.europa.eu/eurostat/cache/GISCO/distribution/v2/nuts/download/ref-nuts-2013-60m.shp.zip",
temp)
trying URL '
https://ec.europa.eu/eurostat/cache/GISCO/distribution/v2/nuts/download/ref-nuts-2013-60m.shp.zip
'
Content type 'application/zip' length 2330060 bytes (2.2 MB)
downloaded 2.2 MB
paper/Shapefile", layer="NUTS_RG_60M_2013_4326_LEVL_3")
OGR data source with driver: ESRI Shapefile
Source: "C:\Users\User\Documents\TED_project\Replicating paper\Shapefile",
layer: "NUTS_RG_60M_2013_4326_LEVL_3"
with 1480 features
It has 5 fields
'CZ', 'DK', 'DE', 'EE', 'IE', 'EL', 'ES', 'FR', 'HR', 'IT', 'CY', 'LV',
'LT', 'LU', 'HU', 'MT', 'NL', 'AT', 'PL', 'PT', 'RO', 'SI', 'SK', 'FI',
'SE', 'UK', 'NO')), ]
paper/awards_with_coordinates_first2500.dta")
500[(1:2500),]
[1] "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"
_with_coordinates_first2500$g_lat))
_with_coordinates_first2500$g_lon))
+datum=WGS84")
that of EU_NUTS29
proj4string(EU_NUTS29))
NUTS_ID LEVL_CODE CNTR_CODE NUTS_NAME  FID
1      <NA>        NA      <NA>      <NA> <NA>
2      <NA>        NA      <NA>      <NA> <NA>

200    <NA>        NA      <NA>      <NA> <NA>
 [ reached 'max' / getOption("max.print") -- omitted 2300 rows ]
min      max
g_lat 34.794891 51.46780
g_lon -3.018564 33.63785
min    max
x -61.806 55.826
y -21.350 71.127
Thanks in advance.

Cheers,
Michele.
#
Dear Michele,
be sure that the order of the coordinates is? the same for the two objects.
proj4string(EU_NUTS29) is starting with "+proj=longlat" (long, then 
lat), while coordinates(awards_with_coordinates_first2500) is "~g_lat + 
g_lon" (lat, then lon).
HTH,
?kos Bede-Fazekas
Hungarian Academy of Sciences

2019.04.04. 1:47 keltez?ssel, Michele Molteni ?rta: