Platform that provides some examples on how to access and manipulate data from the API that the PASMO project provides.
Explore the API documentation
View Demo · Report Bug · Request Feature
The main goal of PASMO is to provide an open platform where researchers can test technologies and develop their ideas.
This GitHub provides examples on how to use data provided by the PASMO project, and how to access the REST API that gives this data.
The examples provided do not use all the calls available in the API, so to further investigate visit the documentation page.
These examples are only a way to show how the data can be handled, other libraries can be used to build charts and maps.
Several libraries were used to help build the structure of the demonstrations, charts and maps.
Some were downloaded and used locally such as:
Others are delivered by Content Delivery Network(CDN):
The examples provided can be cloned and used, all the libraries are installed. To view the google maps, an API key is necessary and can be retrieved here.
After getting the API key, place it nearly the end of the index.html, replacing "YOUR-KEY-HERE".
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR-KEY-HERE&callback=parkingMap"></script>The demonstration is written in JavaScript, so this means that it can be viewed simply by opening index.html.
On the first page, where the traffic flow is shown, a chart was built using the request that gives information about the events in different regions. Get number of cars entering Barra, per hour on the 20th of April 2020
https://pasmo.es.av.it.pt/api/radars/events/barra/cars_in?initialDate=2020-04-20T00:00:00Z&finalDate=2020-04-20T23:59:59Z&groupby=3600
On the second page, where the map is displayed, two different requests were used, one to provide the location of the parking sensors, and other to provide the state of the parking lot, i.e., if it is free or occupied.
Get all sensor location
https://pasmo.es.av.it.pt/api/parking/availableSensors?state=available
Get recent state of the sensors
https://pasmo.es.av.it.pt/api/parking/latestValues
The data is then merged to build a map with the parking sensors location and change the color of the icons, depending on their state(green if they are free and red if they are occupied). Because it is built on top of google maps, it is possible to go to street view and see where exactly are the parking lots.
Project Link: http://pasmo.pt

