GithubHelp home page GithubHelp logo

dataviz-budget's Introduction

The National Budget

This data visualization is the result of a data sprint held at Dagbladet Information on November 27th, 2013. This code can be used to create your own zoomable sunburst diagrams based on available budget figures. An updated version of the visualization is available on Databloggen.

Sunburst

This interactive graph lets you explore the national budget from 2003 to 2015 using a zoomable sunburst diagram.

National Budget - Sunburst

Stacked bars

This interactive graph lets you explore the national budget from 2003 to 2015 using a stacked bar chart.

National Budget - Stacked Bars

Getting the data

All data is available from Finansministeriets Finanslovsdatabase.

To get data at a reasonable detail level, you will have to modify the report structure and add a couple of filters. First, let's modify the report structure:

National Budget - Report structure

  1. Click Vælg struktur to open the structure popup
  2. Under Kontoplan click Standardkonto to remove it from the report
  3. Under I rapporten vises select Alle niveauer på én gang to disable the drill-down mechanism
  4. Click OK to apply the new structure

Then, add a couple of filters:

National Budget - Report filters

  1. Click Vælg filter to open the filter popup
  2. Under Variabel select Finansår and then select the year(s) you're interested in from the select list on the right
  3. Under Variabel select Udgifts-/indtægtsbudget and select Indtægtsbudget, indtægt if you're interested in revenue or Udgiftsbudget, udgift if you're interested in expense
  4. Click OK to apply the filters

When you're happy with the structure and filtering of the data you can click the Download button to get a copy of the report in CSV format.

The files in the revenues folder have been created using the following filters:

Finansår=20xx
Udgifts-/indtægtsbudget=Indtægtsbudget, indtægt

The files in the expenses folder have been created using the following filters:

Finansår=20xx
Paragraf=[01-29]
Udgifts-/indtægtsbudget=Udgiftsbudget, udgift

The expense data files named *-all.csv omit the Paragraf filter.

For more information on the account numbers, please consult the chart of accounts (help index).

Notes

To test locally, you can use the following command to run a static HTTP server on your local machine:

python -m SimpleHTTPServer 8000

Based on the Zoomable Sunburst and Normalized Stacked Bar Chart diagrams by Mike Bostock.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.