{ "metadata": { "name": "department_analysis" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "import pandas as pd\n", "import os\n", "curdir = os.path.abspath('./..')" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "df = pd.read_csv(os.path.join(curdir, 'scraped_data', 'department_all.csv'))\n", "df" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
\n",
        "<class 'pandas.core.frame.DataFrame'>\n",
        "Int64Index: 500 entries, 0 to 499\n",
        "Data columns (total 77 columns):\n",
        "surplus                                              0  non-null values\n",
        "home_tax_rate                                        300  non-null values\n",
        "land_property_tax_cuts_on_deliberation               0  non-null values\n",
        "mandatory_contributions_and_stakes                   500  non-null values\n",
        "business_tax_cuts_on_deliberation                    0  non-null values\n",
        "property_tax_rate                                    500  non-null values\n",
        "subsidies_and_contingents                            500  non-null values\n",
        "financing_capacity                                   500  non-null values\n",
        "individual_aids                                      500  non-null values\n",
        "compensation_2010_rate                               100  non-null values\n",
        "operating_revenues                                   500  non-null values\n",
        "business_tax_value                                   200  non-null values\n",
        "property_tax_cuts_on_deliberation                    200  non-null values\n",
        "property_tax_value                                   500  non-null values\n",
        "land_property_tax_basis                              300  non-null values\n",
        "pch                                                  500  non-null values\n",
        "received_subsidies                                   500  non-null values\n",
        "business_network_tax_value                           200  non-null values\n",
        "net_profit                                           500  non-null values\n",
        "business_profit_contribution_basis                   200  non-null values\n",
        "home_tax_cuts_on_deliberation                        0  non-null values\n",
        "fctva                                                500  non-null values\n",
        "thirdparty_balance                                   500  non-null values\n",
        "advertisement_tax                                    500  non-null values\n",
        "paid_subsidies                                       500  non-null values\n",
        "business_tax_rate                                    200  non-null values\n",
        "population                                           500  non-null values\n",
        "name                                                 500  non-null values\n",
        "operating_real_revenues                              500  non-null values\n",
        "business_profit_contribution_cuts_on_deliberation    200  non-null values\n",
        "business_profit_contribution_value                   200  non-null values\n",
        "insee_code                                           500  non-null values\n",
        "direct_tax                                           500  non-null values\n",
        "compensation_2010_basis                              0  non-null values\n",
        "zone_type                                            500  non-null values\n",
        "refund_tax                                           500  non-null values\n",
        "land_property_tax_value                              300  non-null values\n",
        "investments_direct_costs                             500  non-null values\n",
        "staff_costs                                          500  non-null values\n",
        "investment_ressources                                500  non-null values\n",
        "financial_costs                                      500  non-null values\n",
        "subsidies                                            500  non-null values\n",
        "year                                                 500  non-null values\n",
        "compensation_2010_value                              100  non-null values\n",
        "operating_costs                                      500  non-null values\n",
        "debt_repayments                                      500  non-null values\n",
        "sold_fixed_assets                                    500  non-null values\n",
        "purchases_and_external_costs                         500  non-null values\n",
        "residual_financing_capacity                          500  non-null values\n",
        "training_and_learning_allocation                     0  non-null values\n",
        "apa                                                  500  non-null values\n",
        "debt_at_end_year                                     500  non-null values\n",
        "business_network_tax_cuts_on_deliberation            0  non-null values\n",
        "global_profit                                        500  non-null values\n",
        "business_tax_basis                                   200  non-null values\n",
        "compensation_2010_cuts_on_deliberation               0  non-null values\n",
        "property_tax_basis                                   500  non-null values\n",
        "business_profit_contribution_rate                    0  non-null values\n",
        "tipp                                                 500  non-null values\n",
        "operating_real_costs                                 500  non-null values\n",
        "other_tax                                            500  non-null values\n",
        "home_tax_basis                                       300  non-null values\n",
        "business_network_tax_rate                            0  non-null values\n",
        "allocation                                           500  non-null values\n",
        "home_tax_value                                       300  non-null values\n",
        "loans                                                500  non-null values\n",
        "realignment                                          500  non-null values\n",
        "investments_usage                                    500  non-null values\n",
        "self_financing_capacity                              500  non-null values\n",
        "land_property_tax_rate                               300  non-null values\n",
        "url                                                  500  non-null values\n",
        "debt_repayment_capacity                              0  non-null values\n",
        "debt_annual_costs                                    500  non-null values\n",
        "business_network_tax_basis                           0  non-null values\n",
        "rsa                                                  500  non-null values\n",
        "allocation_and_stake                                 500  non-null values\n",
        "accomodation_costs                                   500  non-null values\n",
        "dtypes: float64(71), int64(2), object(4)\n",
        "
" ], "output_type": "pyout", "prompt_number": 8, "text": [ "\n", "Int64Index: 500 entries, 0 to 499\n", "Data columns (total 77 columns):\n", "surplus 0 non-null values\n", "home_tax_rate 300 non-null values\n", "land_property_tax_cuts_on_deliberation 0 non-null values\n", "mandatory_contributions_and_stakes 500 non-null values\n", "business_tax_cuts_on_deliberation 0 non-null values\n", "property_tax_rate 500 non-null values\n", "subsidies_and_contingents 500 non-null values\n", "financing_capacity 500 non-null values\n", "individual_aids 500 non-null values\n", "compensation_2010_rate 100 non-null values\n", "operating_revenues 500 non-null values\n", "business_tax_value 200 non-null values\n", "property_tax_cuts_on_deliberation 200 non-null values\n", "property_tax_value 500 non-null values\n", "land_property_tax_basis 300 non-null values\n", "pch 500 non-null values\n", "received_subsidies 500 non-null values\n", "business_network_tax_value 200 non-null values\n", "net_profit 500 non-null values\n", "business_profit_contribution_basis 200 non-null values\n", "home_tax_cuts_on_deliberation 0 non-null values\n", "fctva 500 non-null values\n", "thirdparty_balance 500 non-null values\n", "advertisement_tax 500 non-null values\n", "paid_subsidies 500 non-null values\n", "business_tax_rate 200 non-null values\n", "population 500 non-null values\n", "name 500 non-null values\n", "operating_real_revenues 500 non-null values\n", "business_profit_contribution_cuts_on_deliberation 200 non-null values\n", "business_profit_contribution_value 200 non-null values\n", "insee_code 500 non-null values\n", "direct_tax 500 non-null values\n", "compensation_2010_basis 0 non-null values\n", "zone_type 500 non-null values\n", "refund_tax 500 non-null values\n", "land_property_tax_value 300 non-null values\n", "investments_direct_costs 500 non-null values\n", "staff_costs 500 non-null values\n", "investment_ressources 500 non-null values\n", "financial_costs 500 non-null values\n", "subsidies 500 non-null values\n", "year 500 non-null values\n", "compensation_2010_value 100 non-null values\n", "operating_costs 500 non-null values\n", "debt_repayments 500 non-null values\n", "sold_fixed_assets 500 non-null values\n", "purchases_and_external_costs 500 non-null values\n", "residual_financing_capacity 500 non-null values\n", "training_and_learning_allocation 0 non-null values\n", "apa 500 non-null values\n", "debt_at_end_year 500 non-null values\n", "business_network_tax_cuts_on_deliberation 0 non-null values\n", "global_profit 500 non-null values\n", "business_tax_basis 200 non-null values\n", "compensation_2010_cuts_on_deliberation 0 non-null values\n", "property_tax_basis 500 non-null values\n", "business_profit_contribution_rate 0 non-null values\n", "tipp 500 non-null values\n", "operating_real_costs 500 non-null values\n", "other_tax 500 non-null values\n", "home_tax_basis 300 non-null values\n", "business_network_tax_rate 0 non-null values\n", "allocation 500 non-null values\n", "home_tax_value 300 non-null values\n", "loans 500 non-null values\n", "realignment 500 non-null values\n", "investments_usage 500 non-null values\n", "self_financing_capacity 500 non-null values\n", "land_property_tax_rate 300 non-null values\n", "url 500 non-null values\n", "debt_repayment_capacity 0 non-null values\n", "debt_annual_costs 500 non-null values\n", "business_network_tax_basis 0 non-null values\n", "rsa 500 non-null values\n", "allocation_and_stake 500 non-null values\n", "accomodation_costs 500 non-null values\n", "dtypes: float64(71), int64(2), object(4)" ] } ], "prompt_number": 8 }, { "cell_type": "code", "collapsed": false, "input": [ "df[['name', 'year', 'net_profit', 'tipp', 'staff_costs', 'financial_costs', 'debt_repayments', 'allocation', 'rsa']].head(n=20)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
nameyearnet_profittippstaff_costsfinancial_costsdebt_repaymentsallocation
0 GUADELOUPE 2008 92829000 148570000 82705000 4175000 10907000 134943000
1 MARTINIQUE 2008 17369000 141085000 99253000 15389000 24974000 163628000
2 GUYANE 2008 22511000 53010000 69577000 2382000 10135000 45006000
3 REUNION 2008 2171000 330301000 179909000 20939000 51914000 366298000
4 PARIS 2008 93270000 239012000 189455000 0 0 26392000
5 VAL-D'OISE 2008 -591000 71890000 124553000 26568000 54426000 159029000
6 DU VAL-DE-MARNE 2008 60463000 100857000 299751000 13190000 13084000 227430000
7 SEINE-SAINT-DENIS 2008 66861000 201658000 306794000 34708000 83685000 276206000
8 HAUTS-DE-SEINE 2008 238981000 93241000 274342000 13971000 34482000 267202000
9 ESSONNE 2008 20779000 65077000 175881000 26518000 104511000 163354000
10 YVELINES 2008 140086000 49038000 144439000 0 0 144000000
11 SEINE-ET-MARNE 2008 75792000 51295000 174560000 34444000 50666000 157431000
12 MARNE 2008 73139000 33243000 68231000 7993000 30428000 82791000
13 AUBE 2008 32056000 21946000 45237000 2421000 2677000 62022000
14 ARDENNES 2008 19373000 25531000 57627000 6368000 11318000 72219000
15 HAUTE-MARNE 2008 13622000 10570000 36338000 549000 3072000 50506000
16 OISE 2008 51250000 42285000 111840000 10058000 18064000 143562000
17 SOMME 2008 40096000 43030000 91033000 10734000 23901000 114224000
18 AISNE 2008 29198000 31453000 77310000 9761000 14897000 109209000
19 EURE 2008 50988000 29860000 71345000 8603000 17716000 102709000
\n", "
" ], "output_type": "pyout", "prompt_number": 7, "text": [ " name year net_profit tipp staff_costs \\\n", "0 GUADELOUPE 2008 92829000 148570000 82705000 \n", "1 MARTINIQUE 2008 17369000 141085000 99253000 \n", "2 GUYANE 2008 22511000 53010000 69577000 \n", "3 REUNION 2008 2171000 330301000 179909000 \n", "4 PARIS 2008 93270000 239012000 189455000 \n", "5 VAL-D'OISE 2008 -591000 71890000 124553000 \n", "6 DU VAL-DE-MARNE 2008 60463000 100857000 299751000 \n", "7 SEINE-SAINT-DENIS 2008 66861000 201658000 306794000 \n", "8 HAUTS-DE-SEINE 2008 238981000 93241000 274342000 \n", "9 ESSONNE 2008 20779000 65077000 175881000 \n", "10 YVELINES 2008 140086000 49038000 144439000 \n", "11 SEINE-ET-MARNE 2008 75792000 51295000 174560000 \n", "12 MARNE 2008 73139000 33243000 68231000 \n", "13 AUBE 2008 32056000 21946000 45237000 \n", "14 ARDENNES 2008 19373000 25531000 57627000 \n", "15 HAUTE-MARNE 2008 13622000 10570000 36338000 \n", "16 OISE 2008 51250000 42285000 111840000 \n", "17 SOMME 2008 40096000 43030000 91033000 \n", "18 AISNE 2008 29198000 31453000 77310000 \n", "19 EURE 2008 50988000 29860000 71345000 \n", "\n", " financial_costs debt_repayments allocation \n", "0 4175000 10907000 134943000 \n", "1 15389000 24974000 163628000 \n", "2 2382000 10135000 45006000 \n", "3 20939000 51914000 366298000 \n", "4 0 0 26392000 \n", "5 26568000 54426000 159029000 \n", "6 13190000 13084000 227430000 \n", "7 34708000 83685000 276206000 \n", "8 13971000 34482000 267202000 \n", "9 26518000 104511000 163354000 \n", "10 0 0 144000000 \n", "11 34444000 50666000 157431000 \n", "12 7993000 30428000 82791000 \n", "13 2421000 2677000 62022000 \n", "14 6368000 11318000 72219000 \n", "15 549000 3072000 50506000 \n", "16 10058000 18064000 143562000 \n", "17 10734000 23901000 114224000 \n", "18 9761000 14897000 109209000 \n", "19 8603000 17716000 102709000 " ] } ], "prompt_number": 7 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }