Map the data
Create an interactive map of the data using geojson.io
Now for the next exciting step, to map QldShark_2017_Clean_v2
data via latitude and longitude points. You can use any spreadsheet tool to prepare a list of coordinate points.
GeoJSON is popular, open format for map data, and works across many tools. A GitHub repository can automatically display any GeoJSON files in a map view using Open Street Map.
GeoJSON data must follow a structured format, and the file name may end with either .geojson or .json. The GeoJSON structured format orders coordinates in longitude-latitude format, the same as X-Y coordinates in mathematics. (Dougherty, 2017)
We will create a map using geojson.io, an open source tool to make, change and publish maps.
Map data with GEOJSON
- Open http://geojson.io
- Select
Open
>File
- Find the
QldShark_2017_Clean_v2
file in your downloads andopen
- You can also
Drag the file
onto the map.
- You can also
- Zoom into the map to see the coastline of Queensland.
- Look at features on the right hand window – change
file view
fromJSON
totable
to see the data structured for the human eye. - Click on a
point
to show data - Untick
Show style properties
and save - Save file as GEOJSON file into downloads.
See how to map the data with GeoJSON.io in this video.
Display the map using Github
We now need a website to display the map. To do this we are going to upload our geoJSON file to the open source repository Github that can host and share files, code and much more.
Here is an example of an interactive map created using geoJSON and hosted by Github. Click on the points for information about the locations.
In this next activity learn how Github works and create a repository to host the map via Github’s tutorial. The first step is to register for an account.
Upload map to Github
- Go to https://github.com/
- Register for Github account or login if you have one already.
- Or you can use another hosting service you can embed into.
- Do Hello World tutorial https://guides.github.com/activities/hello-world/
- Go to your newly created
Hello World
repository - Select
Upload file
Drag and drop
your newly createdmap.geojson
file- Name it
Qld_Shark_Captures_2017
- Congratulations! You have just published in interactive map with data!
See the steps illustrated below.
Congratulations! You have finished the Advanced data wrangling lessons!