Skip to content

Commit

Permalink
fixed order of package load
Browse files Browse the repository at this point in the history
michaeldorman committed Dec 17, 2023
1 parent 838e547 commit 341b2b3
Showing 17 changed files with 1,934 additions and 93 deletions.
2 changes: 1 addition & 1 deletion 01-spatial-data.qmd
Original file line number Diff line number Diff line change
@@ -98,8 +98,8 @@ Before writing and running code for creating and working with geographic vector

```{python}
import pandas as pd
import geopandas as gpd
import shapely
import geopandas as gpd
```

We also limit the maximum number of printed rows to four, to save space, using the `'display.max_rows'` option of **pandas**.
4 changes: 2 additions & 2 deletions 02-attribute-operations.qmd
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@ jupyter: python3

```{python}
#| echo: false
import pandas as pd
import matplotlib.pyplot as plt
import pandas as pd
pd.options.display.max_rows = 6
pd.options.display.max_columns = 6
pd.options.display.max_colwidth = 35
@@ -23,8 +23,8 @@ This chapter requires importing the following packages:

```{python}
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import pandas as pd
import geopandas as gpd
import rasterio
```
10 changes: 5 additions & 5 deletions 03-spatial-operations.qmd
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ jupyter: python3

```{python}
#| echo: false
import pandas as pd
import matplotlib.pyplot as plt
import pandas as pd
pd.set_option('display.max_rows', 4)
pd.set_option('display.max_columns', 6)
pd.options.display.max_colwidth = 35
@@ -19,16 +19,16 @@ plt.rcParams['figure.figsize'] = (5, 5)
This chapter requires importing the following packages:

```{python}
import os
import numpy as np
import scipy.ndimage
import scipy.stats
import shapely
import geopandas as gpd
import numpy as np
import os
import rasterio
import rasterio.plot
import rasterio.merge
import rasterio.features
import scipy.ndimage
import scipy.stats
```

It also relies on the following data files:
6 changes: 3 additions & 3 deletions 04-geometry-operations.qmd
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ jupyter: python3

```{python}
#| echo: false
import pandas as pd
import matplotlib.pyplot as plt
import pandas as pd
pd.options.display.max_rows = 6
pd.options.display.max_columns = 6
pd.options.display.max_colwidth = 35
@@ -19,15 +19,15 @@ plt.rcParams['figure.figsize'] = (5, 5)
This chapter requires importing the following packages:

```{python}
import sys
import numpy as np
import shapely
import geopandas as gpd
import topojson as tp
import rasterio
import rasterio.warp
import rasterio.plot
import rasterio.warp
import rasterio.mask
import sys
```

It also relies on the following data files:
12 changes: 6 additions & 6 deletions 05-raster-vector.qmd
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ jupyter: python3

```{python}
#| echo: false
import pandas as pd
import matplotlib.pyplot as plt
import pandas as pd
pd.options.display.max_rows = 6
pd.options.display.max_columns = 6
pd.options.display.max_colwidth = 35
@@ -21,17 +21,17 @@ This chapter requires importing the following packages:
<!--md: yes, done-->

```{python}
import os
import math
import numpy as np
import shapely
import matplotlib.pyplot as plt
import shapely
import geopandas as gpd
import rasterio
import rasterio.mask
import rasterstats
import rasterio.plot
import rasterio.mask
import rasterio.features
import math
import os
import rasterstats
```

It also relies on the following data files:
29 changes: 15 additions & 14 deletions 06-reproj.qmd
Original file line number Diff line number Diff line change
@@ -6,33 +6,34 @@ jupyter: python3

## Prerequisites {.unnumbered}

```{python}
#| echo: false
import matplotlib.pyplot as plt
import pandas as pd
pd.options.display.max_rows = 6
pd.options.display.max_columns = 6
pd.options.display.max_colwidth = 35
plt.rcParams['figure.figsize'] = (5, 5)
```

This chapter requires importing the following packages:

```{python}
import matplotlib.pyplot as plt
import shutil
import math
import numpy as np
import matplotlib.pyplot as plt
import shapely
import pyproj
import geopandas as gpd
import rasterio
import rasterio.warp
import rasterio.plot
import pyproj
import shutil
import math
import rasterio.warp
```

<!-- jn: question -- cannot we just somehow set all of these pandas options globally (for the whole book), instead of repeating them in every chapter? -->
<!-- md: good idea, will try to check how -->

```{python}
#| echo: false
import pandas as pd
pd.options.display.max_rows = 6
pd.options.display.max_columns = 6
pd.options.display.max_colwidth = 35
plt.rcParams['figure.figsize'] = (5, 5)
```

It also relies on the following data files:

```{python}
Loading

0 comments on commit 341b2b3

Please sign in to comment.