12 Data Science Project yang Mudah Dicoba Pemula - Digital Skola
Financial Budget Analysis = Ide project data science selanjutnya adalah analisis financial budget menggunakan bahasa pemrograman Python.
dataset financial
Financial Budget Analysis = Ide project data science selanjutnya adalah analisis financial budget menggunakan bahasa pemrograman Python. Biasanya, setiap negara memiliki anggaran keuangan yang menggambarkan kapasitas belanja pemerintah di berbagai sektor perekonomian, kamu bisa mencoba menganalisis anggaran keuangan di suatu negara setiap tahunnya untuk bisa mendapatkan analisis terkait prioritas keuangan secara keseluruhan setiap tahunnya. Kamu bisa mencoba mengerjakan project ini menggunakan <anchor>dataset financial</anchor> .
Financial Budget Analysis with Python | Aman Kharwal
Financial Budget Analysis with Python \| Aman Kharwal[Skip to content](#main)

No results

- [Home](https://thecleverprogrammer.com/)
- [All Articles](https://thecleverprogrammer.com/machine-learning/)
- [Recommended Courses](https://thecleverprogrammer.com/recommended-courses/)

[Go to top](#main-container "Go to top")

[![thecleverprogrammer](https://i0.wp.com/thecleverprogrammer.com/wp-content/uploads/2022/12/thecleverprogrkammer.png?fit=1080%2C1080&ssl=1)](https://thecleverprogrammer.com/)

- [Home](https://thecleverprogrammer.com/)
- [All Articles](https://thecleverprogrammer.com/machine-learning/)
- [Recommended Courses](https://thecleverprogrammer.com/recommended-courses/)

Search

[![thecleverprogrammer](https://i0.wp.com/thecleverprogrammer.com/wp-content/uploads/2022/12/thecleverprogrkammer.png?fit=1080%2C1080&ssl=1)](https://thecleverprogrammer.com/)

# Financial Budget Analysis with Python

- [![Aman Kharwal](https://secure.gravatar.com/avatar/8be3cd61b437e9d5f7ad2e88f2af7c73?s=50&d=mm&r=g)](https://thecleverprogrammer.com/author/amankharwal/)[Aman Kharwal](https://thecleverprogrammer.com/author/amankharwal/ "Posts by Aman Kharwal")
- April 5, 2021
- [Machine Learning](https://thecleverprogrammer.com/category/by-aman-kharwal/)
- [2](https://thecleverprogrammer.com/2021/04/05/financial-budget-analysis-with-python/#comments)

Each country has a financial budget that describes the government’s spending capacity in different sectors of the economy. In this article, I will walk you through the task of financial budget analysis with Python.

## What is a Financial Budget?

There are so many Data Analysts today that come from a non-coding background. If you are from a commerce background then you may know what is a financial budget. In short, it is a detailed report on the income and expenditure of the government for a financial year.

You may get the task of analyzing a country’s financial budget every year if you are working as a data analyst in the media and communications field, as the media have to explain the government’s priorities for the complete financial year. In the section below, I will take you through a tutorial on how to perform the task of Financial Budget analysis with Python.

## Financial Budget Analysis with Python

I hope you now have understood what is a financial budget and when you may need to analyze it as a data analyst. Let’s see how we can perform the task of financial budget analysis with Python. I will start this task by importing the necessary Python libraries and a dataset that contains data about the financial budget of India for the year 2021:

[**_Dataset_**](https://raw.githubusercontent.com/amankharwal/Website-data/master/India_budget_2021.csv)

```
                   Department /Ministry  Fund allotted(in ₹crores)
0               MINISTRY OF AGRICULTURE                  131531.19
1           DEPARTMENT OF ATOMIC ENERGY                   18264.89
2            MINISTRY OF AYURVEDA, YOGA                    2970.30
3  MINISTRY OF CHEMICALS AND FERTILISER                   80714.94
4            MINISTRY OF CIVIL AVIATION                    3224.67
```

Let’s have a look at all the departments that are covered in this budget:

```
print(data)
```

```
                                 Department /Ministry  Fund allotted(in ₹crores)
0                             MINISTRY OF AGRICULTURE                  131531.19
1                         DEPARTMENT OF ATOMIC ENERGY                   18264.89
2                          MINISTRY OF AYURVEDA, YOGA                    2970.30
3                MINISTRY OF CHEMICALS AND FERTILISER                   80714.94
4                          MINISTRY OF CIVIL AVIATION                    3224.67
5                                    MINISTRY OF COAL                     534.88
6                   MINISTRY OF COMMERCE AND INDUSTRY                   12768.25
7                           MINISTRY OF COMMUNICATION                   75265.22
8                        MINISTRY OF CONSUMER AFFAIRS                  256948.40
9                       MINISTRY OF CORPORATE AFFAIRS                     712.13
10                                MINISTRY OF CULTURE                    2687.99
11                                MINISTRY OF DEFENCE                  478195.62
12    MINISTRY OF DEVELOPMENT OF NORTH EASTERN REGION                    2658.00
13                         MINISTRY OF EARTH SCIENCES                    1897.13
14                              MINISTRY OF EDUCATION                   93224.31
15  MINISTRY OF ELECTRONICS AND INFORMATION TECHNO...                    9720.66
16                    MINISTRY OF ENVIRONMENT, FOREST                    2869.93
17                       MINISTRY OF EXTERNAL AFFAIRS                   18154.73
18                                MINISTRY OF FINANCE                 1386273.30
19            MINISTRY OF FISHERIES, ANIMAL HUSBANDRY                    4322.82
20             MINISTRY OF FOOD PROCESSING INDUSTRIES                    1308.66
21              MINISTRY OF HEALTH AND FAMILY WELFARE                   73931.77
22                       MINISTRY OF HEAVY INDUSTRIES                    1017.08
23                           MINISTRY OF HOME AFFAIRS                  166546.94
24              MINISTRY OF HOUSING AND URBAN AFFAIRS                   54581.00
25           MINISTRY OF INFORMATION AND BROADCASTING                    4071.23
26                             MINISTRY OF JAL SHAKTI                   69053.02
27                  MINISTRY OF LABOUR AND EMPLOYMENT                   13306.50
28                        MINISTRY OF LAW AND JUSTICE                    3229.94
29    MINISTRY OF MICRO, SMALL AND MEDIUM ENTERPRISES                   15699.65
30                                  MINISTRY OF MINES                    1466.82
31                        MINISTRY OF MINORITY AFFAIR                    4810.77
32               MINISTRY OF NEW AND RENEWABLE ENERGY                    5753.00
33                         MINISTRY OF PANCHAYATI RAJ                     913.43
34                  MINISTRY OF PARLIAMENTARY AFFAIRS                      65.07
35           MINISTRY OF PERSONNEL, PUBLIC GRIEVANCES                    2097.24
36              MINISTRY OF PETROLEUM AND NATURAL GAS                   15943.78
37                               MINISTRY OF PLANNING                    1062.77
38                        MINISTRY OF PORTS, SHIPPING                    1702.35
39                                  MINISTRY OF POWER                   15322.00
40  THE PRESIDENT, PARLIAMENT, UNION PUBLIC SERVIC...                    1687.57
41                               MINISTRY OF RAILWAYS                  110054.64
42             MINISTRY OF ROAD TRANSPORT AND HIGHWAY                  118101.00
43                      MINISTRY OF RURAL DEVELOPMENT                  133689.50
44                 MINISTRY OF SCIENCE AND TECHNOLOGY                   14794.03
45                      MINISTRY OF SKILL DEVELOPMENT                    2785.23
46         MINISTRY OF SOCIAL JUSTICE AND EMPOWERMENT                   11689.39
47                                 DEPARMENT OF SPACE                   13949.09
48                             MINISTRY OF STATISTICS                    1409.13
49                                  MINISTRY OF STEEL                      39.25
50                               MINISTRY OF TEXTILES                    3631.64
51                                MINISTRY OF TOURISM                    2026.77
52                         MINISTRY OF TRIBAL AFFAIRS                    7524.87
53            MINISTRY OF WOMEN AND CHILD DEVELOPMENT                   24435.00
54               MINISTRY OF YOUTH AFFAIRS AND SPORTS                    2596.14
55                                                NaN                        NaN
56                                        GRAND TOTAL                 3483235.63
```

I can see a NaN value in this dataset, let’s remove the NaN values and continue with the task of financial budget analysis with Python:

```
data.dropna()
```

I can see that not all the departments that are covered in this dataset are the main departments, as some departments can be covered in the others category. So let’s prepare the data by only selecting the main departments and putting all the other departments in the other category:

```
                     Department /Ministry  Fund allotted(in ₹crores)
0                 MINISTRY OF AGRICULTURE                  131531.19
1            MINISTRY OF CONSUMER AFFAIRS                  256948.40
2                     MINISTRY OF DEFENCE                  478195.62
3                   MINISTRY OF EDUCATION                   93224.31
4                     MINISTRY OF FINANCE                 1386273.30
5                MINISTRY OF HOME AFFAIRS                  166546.94
6                    MINISTRY OF RAILWAYS                  110054.64
7  MINISTRY OF ROAD TRANSPORT AND HIGHWAY                  118101.00
8           MINISTRY OF RURAL DEVELOPMENT                  133689.50
9                                  OTHERS                  592971.08
```

Now let’s plot this data to have a look at the priorities of the government for the financial year:

```
data.plot.bar(x='Department /Ministry', y='Fund allotted(in ₹crores)')
```

![bar plot with pandas](https://i0.wp.com/thecleverprogrammer.com/wp-content/uploads/2021/04/image.png?resize=372%2C496&ssl=1)

We can see that the finance department is getting the most of the share from the total budget of the government. Now let’s plot this data into a donut plot to have a clear view of the distribution of funds among all the departments:

![Financial Budget Analysis](https://i0.wp.com/thecleverprogrammer.com/wp-content/uploads/2021/04/image-1.png?resize=704%2C415&ssl=1)

> **_[Also, Read – Python Projects with Source Code.](https://thecleverprogrammer.com/2021/01/14/python-projects-with-source-code/)_**

#### Conclusion

We can see that the finance department is getting 40% of the funds. So this is how we can analyze a dataset that contains data about the revenue and expenditure of the government for a financial year. I hope you liked this article on Financial Budget analysis with Python. Feel free to ask your valuable questions in the comments section below.

[Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fthecleverprogrammer.com%2F2021%2F04%2F05%2Ffinancial-budget-analysis-with-python%2F)[X (Twitter)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fthecleverprogrammer.com%2F2021%2F04%2F05%2Ffinancial-budget-analysis-with-python%2F&text=Financial%20Budget%20Analysis%20with%20Python)[LinkedIn](https://www.linkedin.com/shareArticle?url=https%3A%2F%2Fthecleverprogrammer.com%2F2021%2F04%2F05%2Ffinancial-budget-analysis-with-python%2F&title=Financial%20Budget%20Analysis%20with%20Python)[WhatsApp](whatsapp://send?text=https%3A%2F%2Fthecleverprogrammer.com%2F2021%2F04%2F05%2Ffinancial-budget-analysis-with-python%2F)

[![Aman Kharwal](https://secure.gravatar.com/avatar/8be3cd61b437e9d5f7ad2e88f2af7c73?s=120&d=mm&r=g)](https://thecleverprogrammer.com/author/amankharwal/)

##### Aman Kharwal

Data Strategist at Statso. My aim is to decode data science for the real world in the most simple words.

[Website icon](http://Thecleverprogrammer.com)[X (Twitter) icon](http://amankk_9)[Instagram icon](https://www.instagram.com/amankharwal.official/)[Medium icon](https://amankharwal.medium.com/)

[Articles: 1688](https://thecleverprogrammer.com/author/amankharwal/)

[![Real-time Machine Learning Projects](https://i0.wp.com/thecleverprogrammer.com/wp-content/uploads/2021/04/Real-time-Machine-Learning-Projects.png?fit=300%2C169&ssl=1)\
\
Previous Post\
Real-time Machine Learning Projects](https://thecleverprogrammer.com/2021/04/04/real-time-machine-learning-projects/) [Next Post\
What is a Jupyter Notebook in Data Science? \
![What is a Jupyter Notebook in Data Science?](https://i0.wp.com/thecleverprogrammer.com/wp-content/uploads/2021/04/What-are-Jupyter-Notebooks.png?fit=300%2C169&ssl=1)](https://thecleverprogrammer.com/2021/04/05/what-is-a-jupyter-notebook-in-data-science/)

### Recommended For You

[![Business Concepts Every Data Scientist Should Know](https://i0.wp.com/thecleverprogrammer.com/wp-content/uploads/2024/09/Business-Concepts-Every-Data-Scientist-Should-Know.png?fit=300%2C169&ssl=1)](https://thecleverprogrammer.com/2024/09/06/business-concepts-every-data-scientist-should-know/)

#### [Business Concepts Every Data Scientist Should Know](https://thecleverprogrammer.com/2024/09/06/business-concepts-every-data-scientist-should-know/)

- September 6, 2024
- [1 Comment](https://thecleverprogrammer.com/2024/09/06/business-concepts-every-data-scientist-should-know/#comments)

[![AI & ML Roadmap](https://i0.wp.com/thecleverprogrammer.com/wp-content/uploads/2024/09/AI-ML-Roadmap-with-Learning-Resources.png?fit=300%2C169&ssl=1)](https://thecleverprogrammer.com/2024/09/04/ai-ml-roadmap/)

#### [AI & ML Roadmap](https://thecleverprogrammer.com/2024/09/04/ai-ml-roadmap/)

- September 4, 2024

[![SQL Subqueries Guide](https://i0.wp.com/thecleverprogrammer.com/wp-content/uploads/2024/09/A-Guide-to-SQL-Subqueries-for-Data-Science.png?fit=300%2C169&ssl=1)](https://thecleverprogrammer.com/2024/09/03/sql-subqueries-guide/)

#### [SQL Subqueries Guide](https://thecleverprogrammer.com/2024/09/03/sql-subqueries-guide/)

- September 3, 2024

[![Web Scraping from Amazon with Python](https://i0.wp.com/thecleverprogrammer.com/wp-content/uploads/2024/09/Data-Collection-using-Web-Scraping-from-Amazon-with-Python.png?fit=300%2C169&ssl=1)](https://thecleverprogrammer.com/2024/09/02/web-scraping-from-amazon-with-python/)

#### [Web Scraping from Amazon with Python](https://thecleverprogrammer.com/2024/09/02/web-scraping-from-amazon-with-python/)

- September 2, 2024

### 2 Comments

1. ![Nicolas Perez Espilocin](https://secure.gravatar.com/avatar/fee4a4c785ec3b20bbfdcc861b5c0318?s=100&d=mm&r=g)

#### Nicolas Perez Espilocin



[March 17, 2022 / 8:29 am](https://thecleverprogrammer.com/2021/04/05/financial-budget-analysis-with-python/#comment-4625) [Reply](#comment-4625)





this is so amazing, thank you really for this



   - ![Aman Kharwal](https://secure.gravatar.com/avatar/8be3cd61b437e9d5f7ad2e88f2af7c73?s=100&d=mm&r=g)

     #### [Aman Kharwal](http://Thecleverprogrammer.com)



     [March 17, 2022 / 8:34 am](https://thecleverprogrammer.com/2021/04/05/financial-budget-analysis-with-python/#comment-4626) [Reply](#comment-4626)





     Thanks🤝 keep visiting 😀

### Leave a Reply[Cancel reply](/2021/04/05/financial-budget-analysis-with-python/\#respond)

[Facebook](https://www.facebook.com/amankharwalofficial/) [Instagram](https://www.instagram.com/amankharwal.official/) [Medium](https://medium.com/@amankharwal) [LinkedIn](https://www.linkedin.com/company/thecleverprogrammer/)

Copyright © Thecleverprogrammer.com 2024

## Discover more from thecleverprogrammer

Subscribe now to keep reading and get access to the full archive.

Type your email…

Subscribe

Continue reading

Loading Comments...

Write a Comment...

Email (Required)Name (Required)Website