carpiero / DataTown

Home Page:https://www.datatown.es/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🏑 DataTown

Image


πŸ“’ CESEL DASHBOARD

CESEL:

Effective Cost of the Services of the Local Entities(municipality) in Spain, which includes complete and disaggregated information on the number of services provided (measured based on a series of 85 indicators or physical units of reference) and their cost ( disaggregated into 43 municipal competencies or services), covering practically all of the existing municipal services.

This database is managed by the Ministry of Finance (SubdirecciΓ³n General de Estudios Financieros de Entidades Locales de la SecretarΓ­a General de FinanciaciΓ³n AutonΓ³mica y Local del Ministerio de Hacienda) and has its origin in the Law 27/2013, of December 27 that introduced article 116 ter, in the Law Regulating the Bases of the Local Regime of 1985 (Ley Reguladora de las Bases del RΓ©gimen Local de 1985).

The database extends to all the Spanish municipalities.

πŸ“ˆ URL

πŸ’Ύ Data:

There are 2 different datasource involved:

  • CESEL. Here you can find the main dataset.

  • INE. Here you can find the population of each municipality in Spain.

πŸ“° Insights:

Goal

The process known as β€œbenchmarking” (copying from the best) has been revealed as an important tool to improve results in the provision of public services. As its most important advantages have been pointed out (Philips, 2018):

β€’ Objectively evaluate the performance of the public sector

β€’ Reveal areas where improvement is needed

β€’ Identify the best performing regions, municipalities or suppliers and improve the dissemination and adoption of "best practices"

β€’ Check if pilot projects and certain technologies have been successful

β€’ Assist in the preparation of government budgets at the central and sub-central level

β€’ Hold governments and service providers accountable to citizens and establish a common yardstick that encourages competition

This process requires a series of phases (Phillips, 2018):

β€’ Capture information.

β€’ Generate meaningful comparisons or case studies.

β€’ Distribute information through a network of stakeholders, often across multiple levels of government.

The work tries to advance in the second phase (generate meaningful comparisons) by observing an interactive dashboard, based on the information contained in CESEL. The dashboard can serve as a guide so that municipalities can compare themselves with the average values of their population stratum, so that they can serve as β€œbenchmarking” in order to optimize the use of resources and check that they are in line with preferences of its citizens.

2018

85% municipalities in Spain have less than 5000 citizens and represent 12% of the population.

Average costs per inhabitant are U-shaped, with land in municipalities being 5,000 to 10,000 inhabitants.

Image

Therefore, this is in opposition to Law (Ley 27/2013 de RacionalizaciΓ³n y Sostenibilidad de la AdministraciΓ³n Local ), which established the figure of 20,000 citizens as the figure to be considered in order to promote the voluntary merger of municipalities. This aggregation measure would only save costs for municipalities with less than 2,000 and to a very small extent for municipalities with 2,000 to 5,000 citizens, only 2.5 million citizens.

Bibliography:

LEAH PHILLIPS. (2018) Improving the Performance of Sub-national Governments through Benchmarking and Performance Reporting. OECD Working Papers on Fiscal Federalism No. 22

πŸ™ˆ Usage

Getting Started

Running the app locally

First create a virtual environment with conda or venv inside a temp folder, then activate it.

virtualenv venv
# Windows
venv\Scripts\activate
# Or Linux
source venv/bin/activate

Clone the git repo, then install the requirements with pip

git clone https://github.com/carpiero/DataTown.git
cd /DataTown
pip install -r requirements.txt

Run the app

python app.py

Built With

  • Dash - Main server and interactive components
  • Plotly Python - Used to create the interactive plots

🎨 Screenshots

The following are screenshots for the app in this repo:

animated1

πŸ’» Technology stack

  • Python==3.7.3
  • pandas==1.0.3
  • geopandas==0.8.1
  • dash==1.13.4
  • numpy==1.18.1
  • plotly==4.8.2
  • gunicorn==20.0.4
  • pyarrow==0.17.1

πŸ“ Folder structure

└── DataTown
    β”œβ”€β”€ __trash__
    β”œβ”€β”€ assets
    β”‚    β”œβ”€β”€ github.svg
    β”‚    β”œβ”€β”€ readme.gif
    β”‚    β”œβ”€β”€ resizin_scrpt.js
    β”‚    β”œβ”€β”€ s1.css
    β”‚    β”œβ”€β”€ styles.css
    β”‚    β”œβ”€β”€ CM.jpg
    β”‚    └── Madrid.jpg
    β”œβ”€β”€ data
    β”‚    β”œβ”€β”€ main_processed
    β”‚    β”œβ”€β”€ main_raw
    β”‚    β”œβ”€β”€ main_raw_exce
    β”‚    └── main_temp
    β”œβ”€β”€ notebooks
    β”œβ”€β”€ o_raw_acquisition
    β”‚    β”œβ”€β”€ __init__.py
    β”‚    └── m_raw_acquisition.py
    β”œβ”€β”€ p_acquisition
    β”‚    β”œβ”€β”€ __init__.py
    β”‚    └── m_acquisition.py
    β”œβ”€β”€ p_graphic
    β”‚    β”œβ”€β”€ __init__.py
    β”‚    └── m_graphic.py
    β”œβ”€β”€ p_pivot_hard_load
    β”‚    β”œβ”€β”€ __init__.py
    β”‚    └── m_pivot_hard_load.py
    β”œβ”€β”€ .gitignore
    β”œβ”€β”€ app.py
    β”œβ”€β”€ controls.py
    β”œβ”€β”€ main_script.py
    β”œβ”€β”€ Procfile
    β”œβ”€β”€ README.md
    └── requeriments.txt
    
    

About

https://www.datatown.es/


Languages

Language:Python 88.8%Language:CSS 10.9%Language:JavaScript 0.2%