Show Geo project displays the available datasets at https://www.europeandataportal.eu/en on a map.
This is done by querying the sparql enpoint of the portal, where it looks for the available spatial data. Since the available spatial data is in form of coordinates of a Polygon, it averages the latitude and longitude values to derive the center coordinate. At this coordinate a pin is placed on the map with the Urls of the respective datasets available (URI on hover). When clicked, the pin will open the list of all the datasets as hyperlinks available at this point. Dataset hyperlinks can be clicked to open the dataset webpage.
The user interface would look something like this:
You can zoom in and out of map using the mouse scroll. Also, you can move inside the map by dragging it. The data is loaded from the server cache. To refresh the data, please click the "Refresh Cache" button. An hourglass icon appears next to the "Refresh Cache" button when it is clicked. Cache is refreshed when the icon disappears.
Please Note: Refreshing the cache takes some time (around 15-20 seconds).
Please make sure to provide a Mapbox api access token here: map-comp.js#L14. Also, make sure that you have the following installed on your local system before proceeding to the next step:
First, clone the project in your local system by executing the following command on your command line: git clone https://github.com/nikit91/opal-hackathon.git
Local deployment is done in two parts:
- Rest Service Deployment
- User Interface Service Deployment
Change your current directory to show-geo-rest/
by executing cd show-geo-rest
. Then run the following commands:
mvn clean install
mvn spring-boot:run
As this program first fetches the data from the sparql endpoint, it might take 15-20 seconds to start. Please wait for the message Server Started Successfully
before proceeding to the next step.
Upon successful deployment the rest service would start listening to the port 8080
by default.
Change your directory to show-geo-react/
by executing cd show-geo-react
. Then run the following commands:
npm install
npm start
The application will open automatically on your default browser when the user interface is successfully deployed. By default the user interface listens to port 3000
.