This is the repository for the city dashboards for Leuven, Antwerpen, Gent and Brussel.
Current address of the dashboard is http://lottehofstede.nl/Stage/.
This file simply redirects the visitor to the intro page where he/she must choose how to share his/her location.
The index-file in this folder is the html templates for the cities.
Not all cities use the same widgets (the dashboard parts), so loadWidgets.php generates the template file for each city.
#####widgets Contains the widget-template files that should populate the index.php file.
These are the css files used by the website.
There is a file for the desktop version and a file for the mobile version.
The detection of desktop/mobile is done by media queries.
This folder contains the scrapers, scripts, json files, … to get the data used by the dashboard.
- JSON file generators -> widgets get their data from the JSON files
- airquality
- bikes
- cambiocars
- events
- news
- parkings
- twitter trends and streams
- weather
- Real-time scrapers -> widgets get their data real-time from the scrapers
- busses
- cameras
- wikipedia
- Use MongoDB -> widgets get their data from your mongodb
- foursquare
Images used by the dashboard.
When a visitor starts or restarts a session, he will be redirected here the first time.
The users location is defined here, and the information is stored in de database.
A few important js files
Loads all the widgets into the index page using jQuery and adds a few click events.
Some php files/scripts used all over the dashboard.
- MongoDBHandler.php
- Handles all the MongoDB requests for reusability
All the required stuff for the weather-graph.
The pages that are loaded into the widgets (the dashboard parts) with jQuery.
- upload all the folders/files to your web host
- go to php/config.php and edit the $SITE_PATH so it's correct for you
- set up the database connections
- go to php/dbconnect.php and change the API key and database to yours
- eventually change the collection names ($COLLECTION) in the data folder for instagram, twitter and foursquare
- the visitor's info is stored in collection 'visitors', to change that, go to info/storeVisitor.php and change $COLLECTION there
- comments from the comment box are stored in collection 'comments', to change that, go to php/addCOmment and change $COLLECTION there
- set the cronjobs to update the JSON files on the webserver (check dropbox for cronjobs.txt)