A Data Science system to analyse the socio-economic state of The City of Westminster in London, United Kingdom. Consists of a data processing pipeline written in Python and a user interface and data visualization system written in Javascript. The system deals with resident census data, a places catalogue, population demographic distribution estimate models and supply & demand metrics.
In the delivered version of the project, the datasets in the data processing project are not present due to legal reasons. The user interface does have the datasets it requires to run, so the executions steps can be followed starting at step 6.
- Create a Google Cloud Console account.
- Create a Google Cloud project.
- Enable the Google Maps: Places, Javascript and Maps APIs. Instructions at https://developers.google.com/maps/documentation/javascript/places.
- Generate an API key for the project.
(Data processing pipeline)
- Create the file
data_processing/src/focused_data/api.pyand set its contents toapi_key = "[API_KEY]".
(User interface and visualization web application)
- Create the file
user_interface/website_ui/credentials/google_maps_api_credentials.jsand set its contents toconst apiKey = "[API_KEY]".
(Data processing pipeline)
- Ensure all the required raw data files are found in the appropriate subdirectories under
data_processing/raw_data. - Execute the
run_scrape_places.pyscript. - Execute the
run_focused.pyscript. - Execute the
run_processed.pyscript. - Execute the
copy_dataset_files.pyscript.
(User interface and visualization web application)
- Ensure all the required data files are found in the
user_interface/website_ui/datadirectory. - Launch the web application project.
For development, testing and demonstrations, it is sufficient to launch the app in a local development server. Many alternatives exist but a working procedure is detailed below:
- Download and install the Visual Studio Code (VSCode) code editor at https://code.visualstudio.com/.
- In the Extensions pane on the left hand side tool bar, install the Live Server extension. Can also be found at https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer.
- Open the project root
Spend-it-Locallywith VSCode. - Open the
index.htmlfile in the main code editing window. - Click on the Go Live button in the bottom right of the editor window.