Blog

Shelters in Aarhus

Embedded via Open Data Aarhus.

However it’s possible to download the json from the page: shelters.json. If you can import the json to Mapbox then … kaboom!

Mapbox cannot import the shelters.json file. Try to remove this line:

"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },

Save your file and bingo! Now you have a dataset.

  1. In mapbox import the file shelters.json
  2. Export the datalayer as a tile.
  3. In your map use the tile as a layer.
  4. That’s it.

Here’s thee result in the Mapbox studio:

Editing Shelters in Aarhus in Mapbox
Editing Shelters in Aarhus in Mapbox. Click to see the live sample.

Now you can embed the map in your CMS or on a web page. If you work in WordPress the next step could be a custom page or post with the image loading open data from Aarhus – or to create a plugin with a shortcode that will display your map. Follow the recipe here.

 

 

Open Streetmap API (embed)



View Larger Map

Here Open Street Maps is embedded via a simple i-frame – but it’s just a standard map. Not much Leaflet or Mapbox styling is possible when we use the OSM embed options. But at least you may add a marker via the OSM web page. As far as I can see the marker is made via Leaflet somehow.

Since the AUH is a behemoth building complex. But you can use the pointer in order to pinpoint an entrance or building.

ER-Diagram Symbols

Above you see the atomic building blocks of the ER-Diagram:

  • Entity
  • Attribute
  • Relation
  • Carninalities (Crow’s feet notation) one, zero-or-one, zero-or-many, one-or-many, many.

From Requrements to Deployment

Model inspired by Jukić et al.

ER-Diagram

This ER-Diagram is inspired by some of the tables in his sample database

 

Database Implementation

Here are Ben Forta’s tables in PhpMyAdmin “design viewW.

During implementation you will create the tables and structure.

Note that you have to design the data as integers, numbers, etc.:

  • cust_id = int(11)
  • cust_name = char(50)

The customers table in ER-diagram form.

Normalizing

 

In the diagram the cardinalities have to be normalized. Here are a few solutions to typical problems.

 

TIP: From ER-diagram to HTML form

Look at the attributes. Create an input for each field. Then use the INSERT keyword.