ipeaGIT / aopdata

Download data from the Access to Opportunities Project (AOP)
https://ipeagit.github.io/aopdata/
13 stars 4 forks source link

Landuse database is duplicated when year is 2017 or 2018 #45

Closed kauebraga closed 2 years ago

kauebraga commented 2 years ago

The landuse database (from read_landuse) is coming duplicated when the chosen year is 2017 or 2018:

> landuse_2017 <- aopdata::read_landuse(city = c("for"), 
                                       year = 2017,
                                       geometry = FALSE)

> table(landuse_2017$year)

2017 2019 
2562 2562 

Also, all the population observations from 2017 or 2018 are NA for that year:

> a <- landuse_2017[year == 2017]
> summary(a$P001)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
     NA      NA      NA     NaN      NA      NA    2562 

The issue may be here, where the year column from the aop_population dataset is always equal to 2019. When merging the two datasets with all = TRUE and year = 2017|2018 from the landuse, the two datasets are rbinded. https://github.com/ipeaGIT/aopdata/blob/e564f09739954a06396fab8861e5408c015030d0/r-package/R/read_landuse.R#L127

kauebraga commented 2 years ago

The same happens with accessibility data:

> acess_20171 <- aopdata::read_access(city = "all", 
+                                    mode = c("walk"), 
+                                    year = 2017)
Using mode walk

> table(acess_20171$year)

  2017   2019 
372079 390030 
rafapereirabr commented 2 years ago

fixed