Skip to content

Commit fdbd430

Browse files
committed
ensure docs build locally (and beautifully)
1 parent 443f871 commit fdbd430

13 files changed

+7475
-3
lines changed

docs/_static/images/pysal_favicon.ico

31.3 KB
Binary file not shown.

docs/_static/images/pysal_logo.png

174 KB
Loading

docs/_static/images/pysal_logo.svg

Lines changed: 2516 additions & 0 deletions
Loading

docs/_static/images/pysal_nav_logo_2line.svg

Lines changed: 4793 additions & 0 deletions
Loading

docs/_static/pysal-styles.css

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
/* Make thumbnails with equal heights */
2+
@media only screen and (min-width : 500px) {
3+
.row.equal-height {
4+
display: flex;
5+
flex-wrap: wrap;
6+
}
7+
.row.equal-height > [class*='col-'] {
8+
display: flex;
9+
flex-direction: row, column;
10+
}
11+
.row.equal-height.row:after,
12+
.row.equal-height.row:before {
13+
display: flex;
14+
}
15+
16+
.row.equal-height > [class*='col-'] > .thumbnail,
17+
.row.equal-height > [class*='col-'] > .thumbnail > .caption {
18+
display: flex;
19+
flex: .9 .1 auto;
20+
flex-direction: column;
21+
}
22+
.row.equal-height > [class*='col-'] > .thumbnail > .caption > .flex-text {
23+
flex-grow: 1;
24+
}
25+
.row.equal-height > [class*='col-'] > .thumbnail > img {
26+
width: 400px;
27+
height: 100%; /* force image's height */
28+
29+
/* force image fit inside it's "box" */
30+
-webkit-object-fit: cover;
31+
-moz-object-fit: cover;
32+
-ms-object-fit: cover;
33+
-o-object-fit: cover;
34+
object-fit: cover;
35+
}
36+
}
37+
38+
.row.extra-bottom-padding{
39+
margin-bottom: 20px;
40+
}
41+
42+
43+
.topnavicons {
44+
margin-left: 10% !important;
45+
}
46+
47+
.topnavicons li {
48+
margin-left: 0px !important;
49+
min-width: 100px;
50+
text-align: center;
51+
}
52+
53+
.topnavicons .thumbnail {
54+
margin-right: 10px;
55+
border: none;
56+
box-shadow: none;
57+
text-align: center;
58+
font-size: 85%;
59+
font-weight: bold;
60+
line-height: 10px;
61+
height: 100px;
62+
}
63+
64+
.topnavicons .thumbnail img {
65+
display: block;
66+
margin-left: auto;
67+
margin-right: auto;
68+
}
69+
70+
71+
/* Table with a scrollbar */
72+
.bodycontainer { max-height: 800px; width: 100%; margin: 0; padding: 0; overflow-y: auto; }
73+
.table-scrollable { margin: 0; padding: 0; }
74+
75+
.label {
76+
color: #E74C3C;
77+
font-size: 100%;
78+
font-weight: bold;
79+
width: 100%;
80+
height: 100%;
81+
text-align: left;
82+
vertical-align: middle;
83+
padding: 6px;
84+
margin: 2px;
85+
overflow-x: auto;
86+
overflow-y: auto;
87+
}
88+
89+
div.body {
90+
max-width: 1080px;
91+
}
92+
93+
table.longtable.align-default{
94+
text-align: left;
95+
}

docs/_static/references.bib

Whitespace-only changes.

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040
"sphinx.ext.intersphinx",
4141
"numpydoc",
4242
"matplotlib.sphinxext.plot_directive",
43+
"nbsphinx",
4344
]
45+
bibtex_bibfiles = ["_static/references.bib"]
4446

4547

4648
# Add any paths that contain templates here, relative to this directory.
@@ -151,6 +153,7 @@
151153
# Navigation bar menu
152154
"navbar_links": [
153155
("Installation", "installation"),
156+
("Tutorials", "tutorials"),
154157
("API", "api"),
155158
("References", "references"),
156159
],

docs/index.rst

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
11
.. documentation master file
22
3-
Sparse generalize linear models (spglm)
3+
4+
`spglm`
5+
=======
6+
7+
**SP**\ arse **G**\ eneralized **L**\ inear **M**\ odels
8+
--------------------------------------------------------
9+
10+
This module is an adaptation of a portion of GLM functionality from the `Statsmodels`_ package, this it has been simplified and customized for the purposes of serving as the base for several other PySAL modules, namely SpInt and GWR. Currently, it supports the estimation of Gaussian, Poisson, and Logistic regression using only iteratively weighted least squares estimation (IWLS). One of the large differences this module and the functions avaialble in the Statsmodels package is that the custom IWLS routine is fully sparse compatible, which was necesary for the very sparse design matrices that arise in constrained spatial interaction models. The somewhat limited functionality and computation of only a subset of GLM diagnostics also decreases the computational overhead. Another difference is that this module also supports the estimation of QuasiPoisson models. One caveat is that this custom IWLS routine currently generates estimates by directly solves the least squares normal equations rather than using a more robust method like the pseudo inverse. For more robust estimation of ill conditioned data and a fuller GLM framework we suggest using the original GLM functionality from Statsmodels.
11+
12+
13+
Features
14+
--------
15+
16+
* Gaussian GLM
17+
* Poisson GLM
18+
* QuasiPoisson GLM
19+
* Logistic GLM
20+
* Selection of most common GLM diagnostics
21+
* Supports sparse design matrices
22+
23+
24+
.. raw:: html
25+
26+
<img
27+
src="_static/images/pysal_logo.svg"
28+
class="img-responsive center-block"
29+
alt="PySAL Logo"
30+
width="400"
31+
height="400"
32+
>
433

534

635
.. toctree::
@@ -9,8 +38,10 @@ Sparse generalize linear models (spglm)
938
:caption: Contents:
1039

1140
Installation <installation>
41+
Tutorials <tutorials>
1242
API <api>
1343
References <references>
1444

1545

1646
.. _PySAL: https://github.com/pysal/pysal
47+
.. _Statsmodels: https://github.com/statsmodels/statsmodels/blob/main/statsmodels/genmod/generalized_linear_model.py

docs/tutorials.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.. tutorials
2+
3+
4+
Tutorials
5+
=========
6+
7+
.. toctree::
8+
:maxdepth: 1
9+
:caption: Contents:
10+
11+
notebooks/Binomial_GLM.ipynb
12+
notebooks/Poisson_GLM.ipynb
13+
notebooks/Gaussian_GLM.ipynb

notebooks/Binomial_GLM.ipynb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# Binomial GLM"
8+
]
9+
},
310
{
411
"cell_type": "code",
512
"execution_count": 1,

0 commit comments

Comments
 (0)