Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the map of the United States in the R language data map?

Shulou Source: shulou.com Published: 2022-06-01 22:16:43 10月02日 Update

This article introduces how the map of the United States in the R language data map is. The content is very detailed. Interested friends can refer to it for reference. I hope it can help you.

There was a period of time before, especially keen on data maps, but also shared a lot of tutorials on map making (involving various mapping software), but most of them were organized and pieced together, and not much was played by themselves.

Today's article mainly shares the drawing code of the map of the United States. It is also the code when we shared the world map and China map before (with minor changes in some places).

The geographical information data of the whole United States, which had not been found for a long time before, was finally found on a website. (Although there is a map of the United States available in the Map package of R language, I still like to do it in a custom way.)

Platform environment:

R x64 3.31/Rstudio 0.99.903/ggplot2 2.1.0

Yesterday's tutorial made it clear about package installation and loading updates.

Here are the code steps:

1. Load the environment package required for the code to run

library(ggplot2)

library(plyr)

library("maptools")

2. Read and convert geographic information data of all states in the United States (the data will be shared in QQ group of Rubik's Cube Academy)

American_map

Tags: Data maps United States code indicators information geography language business interests parameters available through geographic information methods formats environment two territory content tutorials Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Redmi Microsoft Linux Docker