![]() ![]() This diversity is demonstrated in the subsequent code chunks, which show how to get data using three packages from Table 7.1.Ĭountry borders are often useful and these can be accessed with the ne_countries() function from the rnaturalearth package as follows: Tidycensus and tigris, which provide socio-demographic vector data for the USA and hddtools, which provides access to a range of hydrological datasets.Įach data package has its own syntax for accessing data. Other notable packages include GSODR, which provides Global Summary Daily Weather Data in R (see the package’s README for an overview of weather data sources) It should be emphasised that Table 7.1 represents only a small number of available geographic data packages. Imports National Oceanic and Atmospheric Administration (NOAA) climate data. ![]() GetData() imports administrative, elevation, WorldClim data.Īccess to Natural Earth vector and raster data. TABLE 7.1: Selected R packages for geographic data retrieval.ĭownload and import of OpenStreetMap data. These provide interfaces to one or more spatial libraries or geoportals and aim to make data access even quicker from the command line. Most geoportals provide a graphical interface allowing datasets to be queried based on characteristics such as spatial and temporal extent, the United States Geological Services’ EarthExplorer being a prime example.Įxploring datasets interactively on a browser is an effective way of understanding available layers.ĭownloading data is best done with code, however, from reproducibility and efficiency perspectives.ĭownloads can be initiated from the command line using a variety of techniques, primarily via URLs and APIs (see the Sentinel API for example).įiles hosted on static URLs can be downloaded with download.file(), as illustrated in the code chunk below which accesses US National Parks data from: /dataset/national-parks:Ī multitude of R packages have been developed for accessing geographic data, some of which are presented in Table 7.1. The GEOSS portal and the Copernicus Open Access Hub, for example, contain many raster datasets with global coverage.Ī wealth of vector datasets can be accessed from the National Aeronautics and Space Administration agency (NASA), SEDAC portal and the European Union’s INSPIRE geoportal, with global and regional coverage. Some global geoportals overcome this issue. Various ‘geoportals’ (web services providing geospatial datasets such as ) are a good place to start, providing a wide range of data but often only for specific locations (as illustrated in the updated Wikipedia page on the topic). In this context, it is vital to know where to look, so the first section covers some of the most important sources. In some ways there is now too much data, in the sense that there are often multiple places to access the same dataset. The final Section 7.8 demonstrates methods for saving visual outputs (maps), in preparation for Chapter 8 on visualization.Ī vast and ever-increasing amount of geographic data is available on the internet, much of which is free to access and use (with appropriate credit given to its providers). The process of actually reading and writing such file formats efficiently is not covered until Sections 7.6 and 7.7, respectively. There are many geographic file formats, each of which has pros and cons. To further ease data access, a number of packages for downloading geographic data have been developed. These topics are covered in Section 7.2, which describes various geoportals, which collectively contain many terabytes of data, and how to use them. It depends on knowing which datasets are available, where they can be found and how to retrieve them. Geographic data I/O is almost always part of a wider process. Taken together, we refer to these processes as I/O, short for input/output. Geographic data import is essential for geocomputation: real-world applications are impossible without data.įor others to benefit from the results of your work, data output is also vital. ![]() This chapter is about reading and writing geographic data. 11.5.2 Spatial tuning of machine-learning hyperparameters.11.4 Introduction to (spatial) cross-validation.11.3 Conventional modeling approach in R.11.2 Case study: Landslide susceptibility. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |