Our first examples will examine creating a map of the United States. We will start with an example that loads the data and gets the map rendered, and then we will examine styling the map to make it more visible, followed by examples of modifying the projection used to render the content more effectively.
Our first map will render the United States. We will use a GeoJSON data file, us-states.json
, available at https://gist.githubusercontent.com/d3byex/65a128a9a499f7f0b37d/raw/176771c2f08dbd3431009ae27bef9b2f2fb56e36/us-states.json. The following are the first few lines of this file, and demonstrate how the shapes of the states are organized within the file:
{"type":"FeatureCollection","features":[ { "type": "Feature", "id": "01", "properties": { "name": "Alabama" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -87.359296, 35.00118 ], [ -85.606675, 34.984749...