0

I loaded ACLED-Data as delimited text data into QGIS to count the number of points in a multi-polygon. However, only a fraction (100- 200 points) of the imported data is displayed and processed by QGIS. More unintuitively, if I check the attribute table, the data looks fine.

To check if something is off with my data, I checked it via R and according to my test 6000+ points should actually be displayed in QGIS from which 1142 have a unique location, meaning the reason for my problem does not seem to bee that point are just overlaying...

Here is how I loaded and checked my code in R:

ACLED <- read.csv("ACLED_NEW.csv")
ACLED%>%
  filter(year > 2007, year < 2015)%>%
  distinct(latitude,longitude)%>%
  count()

The Data can be found here: https://drive.google.com/drive/folders/1V3fElBxXkjcDeU74Ypp0H5WAZNA1oUEg?usp=sharing

0

2 Answers 2

2

Something is clearly wrong with the Lat/Long coordinates. These numbers make no sense:

latitude longitude columns

Furthermore, to create a spatial points sf object from a csv file in R you would do something like:

library(sf) 
ACLED <- read.csv("ACLED_NEW.csv")
ACLED_sf <- st_as_sf(ACLED, coords = c("Longitude", "Latitude"), crs = xxxx)

but what is the coordinate reference system (crs = ??) of these coordinates. Looks like a mixture :-(

1
  • Thanks, I downloaded the data again and now it looks fine!
    – KC15
    Sep 14, 2022 at 7:02
1

From the data, it is understood that the issue is with your coordinates. You have probably taken a UTM zone and many of your points fall outside the zone. Hence they show negative values. Still, you should try

Right Click on the layer -> Zoom to layer

This zooms to all the data points in that layer. Still, you need to correct your coordinates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.