The repository contains all code and base data used for Dashboard22a, and referenced within the submited manuscript notes to journal Data: Special Issue "Data-Driven Approach on Urban Planning and Smart Cities", under the title:
Basic input data for audiences’ geotargeting by destinations’ partial accessibility: Notes from Slovakia
The contains of the repo should be used only to the extent described within [manuscript](link will be added if published). Altering the purpose or extent that is not described, does not guarantee fuctionality.
- Minimum prerequisites: Python 3.7 or later version, PostgreSQL
- Purpose and Extent of usage:
Extract dataset cr3804mr: Occupancy of accommodation establishments – districts (countries) from API Open data SO SR for further processing in PostgreSQL. - Default settings (of variables):
- Administrative unit (list_of_nuts): SK0422_0425: Košice districts I - IV
- Year (year_id): 2021
- Months (list_of_months): all available
- Indicators: all available
- Incoming markets: all available
- Output data set name: inputCr3804mr
- Possible export formats at default: PostgreSQL, .xlsx, .csv
- Minimum prerequisites: Python 3.7 or later version, PostgreSQL
- API accessibility prerequisites: Facebook Developer Account with Page Access Token
- Purpose and Extent of usage: Extract selected daily metrics for given Facebook page (DMO) via Graph Api - Page Insights
- Default settings (of variables):
- Page name (page_name): none
- Page ID (page_id): none
- Page access token (page_access_token): none
- Indicators:
- Page fans per city [page_fans_city]
- Page fans per country [page_fans_country]
- Page impressions by country [page_impressions_by_country_unique]
- Page content activity by country [page_content_activity_by_country_unique]
- Page impressions by city [page_impressions_by_city_unique]
- Page impressions by content activity [page_content_activity_by_city_unique]
- Output data set name: fb_data_in
- Possible export formats at default: PostgreSQL, (.csv and .xlsx formats are not encouraged)
- Minimum prerequisites: Python 3.7 or later version, PostgreSQL, .xslx dumps for cities (folder name = GAcities) and countries (folder name = GAcountries) in two seperate folders.
- Purpose and Extent of usage: Import multiple .xlsx dumps of Google Analytics basic metrics. It is recommended to use only when one does not have an access token to the Google Analytics API.
- Default settings (of variables):
- Page name (page_name): None
- Indicators:
- per city, per country
- Users, Sessions, Average Session Duration
- Output data set name:
- ga_country_month
- ga_city_month
- Minimum prerequisites: Python 3.7 or later version, PostgreSQL
- Previous execution of with PostgreSql DB:
- Purpose and Extent of usage:: Executes createTempTables.sql that exports aggregated data for Figure 1 to Figure 10 and creates tables ga_city_sample, fb_city_sample (sampled cities for further processing) and ga_fb_geocoded_cities as inupt data for geocodeBatchSimple.py.
- Default settings (of variables):
- Incoming markets: Austria, Czechia, Hungary, Poland, Slovakia.
- Possible export formats at default: PostgreSQL.
- Minimum prerequisites: Python 3.7 or later version, PostgreSQL, openrouteservice API KEY.
- Previous execution of (with PostgreSql DB):
- Purpose and Extent of usage: Geocodes ga_fb_geocoded_cities (unique cities within Facebook a Google Analytics sample).
- Default settings: Due to API limits, geocoding 50 records at instance.
- Possible export formats at default: PostgreSQL.
- Minimum prerequisites: Python 3.7 or later version, PostgreSQL, openrouteservice API KEY.
- Previous execution of (with PostgreSql DB):
- Purpose and Extent of usage: Update variables distance_km and duration_min of ga_fb_geocoded_cities (unique cities within Facebook a Google Analytics sample).
- Default settings: Due to API limits, geocoding 50 records at instance.
- Default destination: Kosice, Slovakia.
- Possible export formats at default: PostgreSQL.
- Minimum prerequisites: Python 3.7 or later version, PostgreSQL, openrouteservice API KEY.
- Previous execution of (with PostgreSql DB):
- Purpose and Extent of usage: Executes durationBins.sql that exports aggregated data for Figure 11 to Figure 15
- Default settings: Set for 1 hour intervals, (max over 240min)
- Possible export formats at default: PostgreSQL, .xlsx.
- Minimum prerequisites: Python 3.7 or later version, PostgreSQL, openrouteservice API KEY.
- Previous execution of (with PostgreSql DB):
- Purpose and Extent of usage: Retrieves the duration of selected routes to selected airports and updates the relevant table containing all geocoded places.
- Default settings: Places initialy being over 240 min to Kosice with corresponding airports.
- Possible export formats at default: PostgreSQL.
- Minimum prerequisites: Python 3.7 or later version, PostgreSQL.
- Previous execution of (with PostgreSql DB):
- Purpose and Extent of usage: Executes airAggregates.sql that exports aggregated data for Figure 16
- Default settings: Set for 1 hour intervals, (max over 240min)
- Possible export formats at default: PostgreSQL, .xlsx.
- All graphics' source code may be found in the webData folder or online as a dashboard.