Skip to content

Commit 05d19fc

Browse files
committed
Autofix all notebook linting errors
1 parent 98ef2b4 commit 05d19fc

12 files changed

+20
-8
lines changed

examples/02a_tabular_read_write.ipynb

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"import os\n",
5151
"\n",
5252
"import pandas as pd\n",
53+
"\n",
5354
"from pam import read"
5455
]
5556
},

examples/03_read_modify_write.ipynb

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"import geopandas as gp\n",
4747
"import pandas as pd\n",
4848
"from matplotlib import pyplot as plt\n",
49+
"\n",
4950
"from pam import policy, read\n",
5051
"from pam.policy import apply_policies\n",
5152
"\n",

examples/04_point_sampling.ipynb

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"import geopandas as gp\n",
3535
"import pandas as pd\n",
3636
"from matplotlib import pyplot as plt\n",
37+
"\n",
3738
"from pam import read\n",
3839
"from pam.samplers.spatial import RandomPointSampler"
3940
]

examples/05_activity_plots.ipynb

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"import os\n",
4646
"\n",
4747
"import pandas as pd\n",
48+
"\n",
4849
"from pam import read\n",
4950
"from pam.plot.stats import plot_activity_times, plot_leg_times"
5051
]

examples/07_travel_survey_to_matsim.ipynb

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"\n",
5050
"import geopandas as gp\n",
5151
"import pandas as pd\n",
52+
"\n",
5253
"from pam import read, write\n",
5354
"from pam.core import Population\n",
5455
"from pam.plot.stats import plot_activity_times, plot_leg_times\n",

examples/08_toy_matsim_population.ipynb

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"import matplotlib.pyplot as plt\n",
6565
"import numpy as np\n",
6666
"import pandas as pd\n",
67+
"\n",
6768
"from pam.activity import Activity, Leg\n",
6869
"from pam.core import Household, Person, Population\n",
6970
"from pam.plot.stats import plot_activity_times\n",

examples/10_advanced_spatial_sampling.ipynb

+4-3
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,14 @@
7575
"import geopandas as gp\n",
7676
"import matplotlib.pyplot as plt\n",
7777
"import numpy as np\n",
78-
"import pam\n",
7978
"import pandas as pd\n",
79+
"from shapely.geometry import Point, Polygon\n",
80+
"\n",
81+
"import pam\n",
8082
"from pam.activity import Activity, Leg\n",
8183
"from pam.core import Household, Person, Population\n",
8284
"from pam.samplers import facility\n",
83-
"from pam.utils import minutes_to_datetime\n",
84-
"from shapely.geometry import Point, Polygon"
85+
"from pam.utils import minutes_to_datetime"
8586
]
8687
},
8788
{

examples/13_Advanced_Freight_Synthesis.ipynb

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"import numpy as np\n",
4141
"import pandas as pd\n",
4242
"from matplotlib import pyplot as plt\n",
43+
"\n",
4344
"from pam.core import Household, Person, Population\n",
4445
"from pam.samplers import tour\n",
4546
"from pam.samplers.facility import FacilitySampler\n",

examples/14_Advanced_Plan_Cropping.ipynb

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@
3838
"\n",
3939
"import geopandas as gp\n",
4040
"import matplotlib.pyplot as plt\n",
41+
"from shapely.geometry import Point, Polygon\n",
42+
"\n",
4143
"from pam.activity import Activity, Leg, Plan\n",
4244
"from pam.core import Household, Person, Population\n",
4345
"from pam.operations import cropping\n",
4446
"from pam.utils import minutes_to_datetime as mtdt\n",
45-
"from pam.variables import END_OF_DAY\n",
46-
"from shapely.geometry import Point, Polygon"
47+
"from pam.variables import END_OF_DAY"
4748
]
4849
},
4950
{

examples/15_advanced_choice_modelling.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,12 @@
5757
"\n",
5858
"import numpy as np\n",
5959
"import pandas as pd\n",
60+
"from prettytable import PrettyTable\n",
61+
"\n",
6062
"from pam.operations.cropping import link_population\n",
6163
"from pam.planner import choice_location as choice\n",
6264
"from pam.planner.od import ODFactory, ODMatrix\n",
6365
"from pam.read import read_matsim\n",
64-
"from prettytable import PrettyTable\n",
6566
"\n",
6667
"logging.basicConfig(level=logging.DEBUG)\n",
6768
"random.seed(0)"

examples/17_advanced_discretionary_locations.ipynb

+3-2
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,16 @@
5555
"\n",
5656
"import numpy as np\n",
5757
"import pandas as pd\n",
58+
"from prettytable import PrettyTable\n",
59+
"from shapely.geometry import Point\n",
60+
"\n",
5861
"from pam.activity import Activity, Leg, Plan\n",
5962
"from pam.location import Location\n",
6063
"from pam.planner.choice_location import DiscretionaryTripOD, DiscretionaryTrips\n",
6164
"from pam.planner.od import ODFactory, ODMatrix\n",
6265
"from pam.planner.utils_planner import get_trip_chains_either_anchor\n",
6366
"from pam.utils import minutes_to_datetime as mtdt\n",
6467
"from pam.variables import END_OF_DAY\n",
65-
"from prettytable import PrettyTable\n",
66-
"from shapely.geometry import Point\n",
6768
"\n",
6869
"logging.getLogger(\"pam\").setLevel(logging.DEBUG)\n",
6970
"random.seed(0)"

examples/18_advanced_ipf.ipynb

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"import itertools\n",
5151
"\n",
5252
"import pandas as pd\n",
53+
"\n",
5354
"from pam.core import Person, Population\n",
5455
"from pam.planner import ipf"
5556
]

0 commit comments

Comments
 (0)