An interactive dashboard built with python that enables you to visualise how rent prices differ across Sweden.

Overview

sweden-rent-dashboard

An interactive dashboard built with python that enables you to visualise how rent prices differ across Sweden.

The dashboard/web-app generated from this project can be viewed by clicking here The dashboard was built to be highly interactive so please do feel free to interact with the figures, dialog buttons, sliders and text inputs. (Unfortunately, the web-app does not render well on mobile devices.)

Preview of the Dashboard Overview Page

SwedenDashBoard

Code and Resources Used

  • Python Version: 3.8
  • Packages Used: pandas, numpy, json, dash, plotly, BeautifulSoup, requests, urllib.request (Those that are required for hosting the web-app can be installed using: pip install -r requirements.txt after cloning the repo).
  • Statistical Data: Downloaded from Statistics Sweden. The median values were used instead of the means as the underlying distribution of each data set is unavailable.
  • Web scraping: Performed on various sites including wiki, Information Sverige and Open Street Map.
  • GeoJSON (Map) Data: Obtained from Open Street Map using their API. See section below for further details.

Repository Layout

Main folder

  • app.py: Used to generate the Plotly/Dash web-app. In order to run this you will need to have run all the below scripts in advance or use the files provided in the "assets" folder in this repo.

  • "get_kommun_county_info.py": This script web scrapes from both wiki and Information Sverige to:

    • Generate a dictionary that states what county ("län" in Swedish) each municipality ("kommun" in Swedish) belongs to.
    • Obtain a short bit of introductory text about each municipality.
    • Store the web address for each municipality's page on Information Sverige.
  • "prepare_rent_data.py": Takes the 4 Statistics Sweden excel files (these can be found in the "stats" folder) and cleans/reformats them. Outputs are saved as ".csv" files in the "assets" folder and are loaded into the web-app.

  • "get_geojson_data.py": This script first web scrapes relation numbers (like an i.d. number for a map file) for all counties ("län" in Swedish) and municipalities ("kommuner" in Swedish) in Sweden from Open Street Map. The relation numbers are then used to download GeoJSON files from the OSM database and merged to create maps of Sweden (with borders marked at both the county and municipality levels). The original map files generated from this process ("counties_map.json" and "kommuner_map.json") and they were then "simplified" (resolution decreased) using mapshaper to improve page loading times on the web-app.

Folder: stats

The four ".xlsx" files were obtained directly from Statistics Sweden and left unaltered. The file "sources.txt" provides additional information about how exactly these files were obtained.

Folder: assets

These are the resources read in and used by the Plotly/Dash web-app. These were all generated in advance using the scripts described in the main folder.

Issues/Comments/Questions

Please feel free to open an issue or pull request if you have any issues/comments/questions or notice something that could be improved.

Owner
Rory Crean
Postdoctoral Researcher in Computational Chemistry
Rory Crean
Painlessly create beautiful matplotlib plots.

Announcement Thank you to everyone who has used prettyplotlib and made it what it is today! Unfortunately, I no longer have the bandwidth to maintain

Olga Botvinnik 1.6k Jan 06, 2023
This is simply repo for line drawing rendering using freestyle in Blender.

blender_freestyle_line_drawing This is simply repo for line drawing rendering using freestyle in Blender. how to use blender2935 --background --python

MaxLin 3 Jul 02, 2022
A simple script that displays pixel-based animation on GitHub Activity

GitHub Activity Animator This project contains a simple Javascript snippet that produces an animation on your GitHub activity tracker. The project als

16 Nov 15, 2021
JSNAPY example: Validate NAT policies

JSNAPY example: Validate NAT policies Overview This example will show how to use JSNAPy to make sure the expected NAT policy matches are taking place.

Calvin Remsburg 1 Jan 07, 2022
Interactive plotting for Pandas using Vega-Lite

pdvega: Vega-Lite plotting for Pandas Dataframes pdvega is a library that allows you to quickly create interactive Vega-Lite plots from Pandas datafra

Altair 342 Oct 26, 2022
FURY - A software library for scientific visualization in Python

Free Unified Rendering in Python A software library for scientific visualization in Python. General Information • Key Features • Installation • How to

169 Dec 21, 2022
Wikipedia WordCloud App generate Wikipedia word cloud art created using python's streamlit, matplotlib, wikipedia and wordcloud packages

Wikipedia WordCloud App Wikipedia WordCloud App generate Wikipedia word cloud art created using python's streamlit, matplotlib, wikipedia and wordclou

Siva Prakash 5 Jan 02, 2022
Realtime Viewer Mandelbrot set with Python and Taichi (cpu, opengl, cuda, vulkan, metal)

Mandelbrot-set-Realtime-Viewer- Realtime Viewer Mandelbrot set with Python and Taichi (cpu, opengl, cuda, vulkan, metal) Control: "WASD" - movement, "

22 Oct 31, 2022
An interactive GUI for WhiteboxTools in a Jupyter-based environment

whiteboxgui An interactive GUI for WhiteboxTools in a Jupyter-based environment GitHub repo: https://github.com/giswqs/whiteboxgui Documentation: http

Qiusheng Wu 105 Dec 15, 2022
erdantic is a simple tool for drawing entity relationship diagrams (ERDs) for Python data model classes

erdantic is a simple tool for drawing entity relationship diagrams (ERDs) for Python data model classes. Diagrams are rendered using the venerable Graphviz library.

DrivenData 129 Jan 04, 2023
This is a learning tool and exploration app made using the Dash interactive Python framework developed by Plotly

Support Vector Machine (SVM) Explorer This app has been moved here. This repo is likely outdated and will not be updated. This is a learning tool and

Plotly 150 Nov 03, 2022
a python function to plot a geopandas dataframe

Pretty GeoDataFrame A minimum python function (~60 lines) to draw pretty geodataframe. Based on matplotlib, shapely, descartes. Installation just use

haoming 27 Dec 05, 2022
Simple spectra visualization tool for astronomers

SpecViewer A simple visualization tool for astronomers. Dependencies Python = 3.7.4 PyQt5 = 5.15.4 pyqtgraph == 0.10.0 numpy = 1.19.4 How to use py

5 Oct 07, 2021
Glue is a python project to link visualizations of scientific datasets across many files.

Glue Glue is a python project to link visualizations of scientific datasets across many files. Click on the image for a quick demo: Features Interacti

675 Dec 09, 2022
Data Visualizer Web-Application

Viz-It Data Visualizer Web-Application If I ask you where most of the data wrangler looses their time ? It is Data Overview and EDA. Presenting "Viz-I

Sagnik Roy 17 Nov 20, 2022
Dipto Chakrabarty 7 Sep 06, 2022
Small binja plugin to import header file to types

binja-import-header (v1.0.0) Author: matteyeux Import header file to Binary Ninja types view Description: Binary Ninja plugin to import types from C h

matteyeux 15 Dec 10, 2022
daily report of @arkinvest ETF activity + data collection

ark_invest daily weekday report of @arkinvest ETF activity + data collection This script was created to: Extract and save daily csv's from ARKInvest's

T D 27 Jan 02, 2023
Sparkling Pandas

SparklingPandas SparklingPandas aims to make it easy to use the distributed computing power of PySpark to scale your data analysis with Pandas. Sparkl

366 Oct 27, 2022