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
Open-source demos hosted on Dash Gallery

Dash Sample Apps This repository hosts the code for over 100 open-source Dash apps written in Python or R. They can serve as a starting point for your

Plotly 2.7k Jan 07, 2023
Backend app for visualizing CANedge log files in Grafana (directly from local disk or S3)

CANedge Grafana Backend - Visualize CAN/LIN Data in Dashboards This project enables easy dashboard visualization of log files from the CANedge CAN/LIN

13 Dec 15, 2022
Easily convert matplotlib plots from Python into interactive Leaflet web maps.

mplleaflet mplleaflet is a Python library that converts a matplotlib plot into a webpage containing a pannable, zoomable Leaflet map. It can also embe

Jacob Wasserman 502 Dec 28, 2022
Data-FX is an addon for Blender (2.9) that allows for the visualization of data with different charts

Data-FX Data-FX is an addon for Blender (2.9) that allows for the visualization of data with different charts Currently, there are only 2 chart option

Landon Ferguson 20 Nov 21, 2022
WebApp served by OAK PoE device to visualize various streams, metadata and AI results

DepthAI PoE WebApp | Bootstrap 4 & Vue.js SPA Dashboard Based on dashmin (https:

Luxonis 6 Apr 09, 2022
Small project to recursively calculate and plot each successive order of the Hilbert Curve

hilbert-curve Small project to recursively calculate and plot each successive order of the Hilbert Curve. After watching 3Blue1Brown's video on Hilber

Stefan Mejlgaard 2 Nov 15, 2021
An interactive UMAP visualization of the MNIST data set.

Code for an interactive UMAP visualization of the MNIST data set. Demo at https://grantcuster.github.io/umap-explorer/. You can read more about the de

grant 70 Dec 27, 2022
Sprint planner considering JIRA issues and google calendar meetings schedule.

Sprint planner Sprint planner is a Python script for planning your Jira tasks based on your calendar availability. Installation Use the package manage

Apptension 2 Dec 05, 2021
📊 Extensions for Matplotlib

📊 Extensions for Matplotlib

Nico Schlömer 519 Dec 30, 2022
Complex heatmaps are efficient to visualize associations between different sources of data sets and reveal potential patterns.

Make Complex Heatmaps Complex heatmaps are efficient to visualize associations between different sources of data sets and reveal potential patterns. H

Zuguang Gu 973 Jan 09, 2023
EPViz is a tool to aid researchers in developing, validating, and reporting their predictive modeling outputs.

EPViz (EEG Prediction Visualizer) EPViz is a tool to aid researchers in developing, validating, and reporting their predictive modeling outputs. A lig

Jeff 2 Oct 19, 2022
Fast scatter density plots for Matplotlib

About Plotting millions of points can be slow. Real slow... 😴 So why not use density maps? ⚡ The mpl-scatter-density mini-package provides functional

Thomas Robitaille 473 Dec 12, 2022
Color maps for POV-Ray v3.7 from the Plasma, Inferno, Magma and Viridis color maps in Python's Matplotlib

POV-Ray-color-maps Color maps for POV-Ray v3.7 from the Plasma, Inferno, Magma and Viridis color maps in Python's Matplotlib. The include file Color_M

Tor Olav Kristensen 1 Apr 05, 2022
This Crash Course will cover all you need to know to start using Plotly in your projects.

Plotly Crash Course This course was designed to help you get started using Plotly. If you ever felt like your data visualization skills could use an u

Fábio Neves 2 Aug 21, 2022
Attractors is a package for simulation and visualization of strange attractors.

attractors Attractors is a package for simulation and visualization of strange attractors. Installation The simplest way to install the module is via

Vignesh M 45 Jul 31, 2022
Chem: collection of mostly python code for molecular visualization, QM/MM, FEP, etc

chem: collection of mostly python code for molecular visualization, QM/MM, FEP,

5 Sep 02, 2022
Altair extension for saving charts in a variety of formats.

Altair Saver This packge provides extensions to Altair for saving charts to a variety of output types. Supported output formats are: .json/.vl.json: V

Altair 85 Dec 09, 2022
CPG represent!

CoolPandasGroup CPG represent! Arianna Brandon Enne Luan Tracie Project requirements: use Pandas to clean and format datasets use Jupyter Notebook to

Enne 3 Feb 07, 2022
`charts.css.py` brings `charts.css` to Python. Online documentation and samples is available at the link below.

charts.css.py charts.css.py provides a python API to convert your 2-dimension data lists into html snippet, which will be rendered into charts by CSS,

Ray Luo 3 Sep 23, 2021
PanGraphViewer -- show panenome graph in an easy way

PanGraphViewer -- show panenome graph in an easy way Table of Contents Versions and dependences Desktop-based panGraphViewer Library installation for

16 Dec 17, 2022