% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check_data_exist.R
\name{check_data_exist}
\alias{check_data_exist}
\title{check whether the requested data exist on Natural Earth}
\usage{
check_data_exist(
  type,
  scale = 110L,
  category = c("cultural", "physical", "raster")
)
}
\arguments{
\item{type}{type of natural earth file to download one of 'countries',
'map_units', 'map_subunits', 'sovereignty', 'states' OR the portion of any
natural earth vector url after the scale and before the . e.g. for
'ne_50m_urban_areas.zip' this would be 'urban_areas' OR the raster
filename e.g. for 'MSR_50M.zip' this would be 'MSR_50M'}

\item{scale}{The scale of map to return, one of `110`, `50`, `10` or `small`,
`medium`, `large`.}

\item{category}{one of natural earth categories : 'cultural', 'physical',
'raster'}
}
\value{
TRUE or FALSE
}
\description{
checks from a list dependent on type, category and scale. If it returns FALSE
the data may still exist on the website. Doesn't yet do checking on raster
names because I found the naming convention too tricky.
}
\details{
Note that the filename of the requested object will be returned if
`load = FALSE`.

If the data is to be loaded into memory (`load = TRUE`), the download will
be handled using the GDAL virtual file system, allowing direct access to the
data without writing it to disk.
}
\examples{
check_data_exist(type = "countries", scale = 110, category = "cultural")

# Type not in list for this category
check_data_exist(type = "airports", scale = 110, category = "physical")

# Type in list but scale shows FALSE
check_data_exist(type = "airports", scale = 110, category = "cultural")

}
\seealso{
\code{\link{ne_load}}, pre-downloaded data are available using
  \code{\link{ne_countries}}, \code{\link{ne_states}}. Other geographic data
  are available in the raster package : \code{\link[raster]{getData}}.
}
