Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WEB: Adding new pandas website #28014

Merged
merged 37 commits into from
Sep 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
192df97
Adding new pandas website
Aug 19, 2019
14a606f
Fixing CI
Aug 19, 2019
b682dfe
Adding Tidelift to partners
Aug 20, 2019
541d26d
Fixing Wes book link and changing image to the 2nd edition
Aug 20, 2019
b6de1d4
Updated link to Wes book with Amazon affiliate link
Aug 20, 2019
507eb7e
Removing carousel and self-hosted juniper.js, replaced Ursa Labs logo…
Aug 29, 2019
711fc8c
Merge remote-tracking branch 'upstream/master' into pandas_web
Aug 29, 2019
617cfb9
Merge remote-tracking branch 'upstream/master' into pandas_web
Sep 10, 2019
aa54548
Updating feeds with pandas only posts (Wes and Marc)
Sep 10, 2019
8ae611d
Merge remote-tracking branch 'upstream/master' into pandas_web
Sep 12, 2019
e322c03
Renaming the pandas builder, since for now doesn't seem like any othe…
Sep 12, 2019
6063061
Making the website responsive (adding viewport meta)
Sep 12, 2019
d163d73
Improving styles, and temporary removing the blog and the try/binder …
Sep 12, 2019
cdc6a25
Merge remote-tracking branch 'upstream/master' into pandas_web
datapythonista Sep 13, 2019
418ca78
Adding NumFOCUS pandas posts to the feed
datapythonista Sep 13, 2019
1003e57
Fixing style/layout of team members
datapythonista Sep 13, 2019
0fb3c58
Replacing Anaconda logo by its svg
datapythonista Sep 13, 2019
5f82a92
Fixing nested list
datapythonista Sep 13, 2019
f14ec6f
Applying new changes from copied pages (contributing and ecosystem)
datapythonista Sep 13, 2019
7083141
Adding that pandas is open source to the short description
datapythonista Sep 13, 2019
86d949e
Remove link to interactive try pandas page in install, since the page…
datapythonista Sep 13, 2019
a44581d
blackify code
datapythonista Sep 13, 2019
7303c30
Making the existing logo a link
datapythonista Sep 13, 2019
c65a2b3
Reducing the size of the install page images
datapythonista Sep 13, 2019
f4040c1
Fixing image in installation page
datapythonista Sep 13, 2019
10ae55c
Reducing size of book cover
datapythonista Sep 13, 2019
5106196
Removing logo and letting choose from the url hash
datapythonista Sep 13, 2019
289a58a
Minor improvements to the styles
datapythonista Sep 13, 2019
6b2517a
Better quality image of the book
datapythonista Sep 13, 2019
a931535
Fixing bug on ignoring files
datapythonista Sep 13, 2019
7b3a93f
Improving logo tester
datapythonista Sep 13, 2019
13825f0
Removing governance from new website
Sep 17, 2019
aca4f52
Removing contributing documentation
Sep 17, 2019
fe8c211
Merging from master
Sep 17, 2019
916544f
Addressing review comments
Sep 17, 2019
532a2f7
Adding note about serving the website using an http server
Sep 17, 2019
d7436fe
Hidding logo if not present, and removing last screenshot of the inst…
Sep 17, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
set -o pipefail
if [[ "$AZURE" == "true" ]]; then
# we exclude all c/cpp files as the c/cpp files of pandas code base are tested when Linting .c and .h files
! grep -n '--exclude=*.'{svg,c,cpp,html} --exclude-dir=env -RI "\s$" * | awk -F ":" '{print "##vso[task.logissue type=error;sourcepath=" $1 ";linenumber=" $2 ";] Tailing whitespaces found: " $3}'
! grep -n '--exclude=*.'{svg,c,cpp,html,js} --exclude-dir=env -RI "\s$" * | awk -F ":" '{print "##vso[task.logissue type=error;sourcepath=" $1 ";linenumber=" $2 ";] Tailing whitespaces found: " $3}'
else
! grep -n '--exclude=*.'{svg,c,cpp,html} --exclude-dir=env -RI "\s$" * | awk -F ":" '{print $1 ":" $2 ":Tailing whitespaces found: " $3}'
! grep -n '--exclude=*.'{svg,c,cpp,html,js} --exclude-dir=env -RI "\s$" * | awk -F ":" '{print $1 ":" $2 ":Tailing whitespaces found: " $3}'
fi
RET=$(($RET + $?)) ; echo $MSG "DONE"
fi
Expand Down
6 changes: 6 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ dependencies:
- nbsphinx
- pandoc

# web (jinja2 is also needed, but it's also an optional pandas dependency)
- markdown
- feedparser
- pyyaml
- requests

# testing
- boto3
- botocore>=1.11
Expand Down
4 changes: 4 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ numpydoc>=0.9.0
nbconvert>=5.4.1
nbsphinx
pandoc
markdown
feedparser
pyyaml
requests
boto3
botocore>=1.11
hypothesis>=3.82
Expand Down
12 changes: 12 additions & 0 deletions web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Directory containing the pandas website (hosted at https://pandas.io).

The website sources are in `web/pandas/`, which also include a `config.yml` file
containing the settings to build the website. The website is generated with the
command `./pandas_web.py pandas`. See `./pandas_web.py --help` and the header of
the script for more information and options.

After building the website, to navigate it, it is needed to access the web using
an http server (a not open the local files with the browser, since the links and
the image sources are absolute to where they are served from). The easiest way
to run an http server locally is to run `python -m http.server` from the
`web/build/` directory.
85 changes: 85 additions & 0 deletions web/pandas/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-27880019-2']); _gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the same one as for the docs?

<!-- Google Analytics -->
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-27880019-2', 'auto');
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
<!-- End Google Analytics -->

(or is there a reason the above is better? then we can update the docs ones)

Also, can this go at the bottom scripts? Or is there a good reason to load this first?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied the one from the website, didn't know the docs had a different one.

I followed Google instructions on where to place it, they say immediately after the <head> tag.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recently update the docs one, it was on my to do list to also update the website but didn't get to that yet ... (kind of proving your point here :-))

})();
</script>
<title>pandas - Python Data Analysis Library</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous">
{% for stylesheet in static.css %}
<link rel="stylesheet"
href="{{ base_url }}{{ stylesheet }}">
{% endfor %}
</head>
<body>
<header>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#nav-content" aria-controls="nav-content" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

{% if static.logo %}<a class="navbar-brand" href="{{ base_url }}/"><img alt="" src="{{ base_url }}{{ static.logo }}"/></a>{% endif %}

<div class="collapse navbar-collapse" id="nav-content">
<ul class="navbar-nav">
{% for item in navbar %}
{% if not item.has_subitems %}
<li class="nav-item">
<a class="nav-link" href="{% if not item.target.startswith("http") %}{{ base_url }}{% endif %}{{ item.target }}">{{ item.name }}</a>
</li>
{% else %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle"
data-toggle="dropdown"
id="{{ item.slug }}"
href="#"
role="button"
aria-haspopup="true"
aria-expanded="false">{{ item.name }}</a>
<div class="dropdown-menu" aria-labelledby="{{ item.slug }}">
{% for subitem in item.target %}
<a class="dropdown-item" href="{% if not subitem.target.startswith("http") %}{{ base_url }}{% endif %}{{ subitem.target }}">{{ subitem.name }}</a>
{% endfor %}
</div>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</nav>
</header>
<main role="main">
<div class="container">
{% block body %}{% endblock %}
</div>
</main>
<footer class="container pt-4 pt-md-5 border-top">
<p class="float-right">
<a href="#">Back to top</a>
</p>
<p>
© 2009 - 2019, pandas team
jorisvandenbossche marked this conversation as resolved.
Show resolved Hide resolved
</p>
</footer>

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
</body>
</html>
14 changes: 14 additions & 0 deletions web/pandas/blog.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% extends "layout.html" %}

{% block body %}
{% for post in blog.posts %}
<div class="card">
<div class="card-body">
<h3 class="card-title"><a href="{{post.link }}" target="_blank">{{ post.title }}</a></h3>
<h6 class="card-subtitle">Source: {{ post.feed }} | Author: {{ post.author }} | Published: {{ post.published.strftime("%b %d, %Y") }}</h6>
<div class="card-text">{{ post.summary }}</div>
<a class="card-link" href="{{post.link }}" target="_blank">Read</a>
</div>
</div>
{% endfor %}
{% endblock %}
86 changes: 86 additions & 0 deletions web/pandas/community/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# About pandas

## History of development

In 2008, _pandas_ development began at [AQR Capital Management](http://www.aqr.com).
By the end of 2009 it had been [open sourced](http://en.wikipedia.org/wiki/Open_source),
and is actively supported today by a community of like-minded individuals around the world who
contribute their valuable time and energy to help make open source _pandas_
possible. Thank you to [all of our contributors](team.html).

Since 2015, _pandas_ is a [NumFOCUS sponsored project](https://numfocus.org/sponsored-projects).
This will help ensure the success of development of _pandas_ as a world-class open-source project.

### Timeline

- **2008**: Development of _pandas_ started
- **2009**: _pandas_ becomes open source
- **2012**: First edition of _Python for Data Analysis_ is published
- **2015**: _pandas_ becomes a [NumFOCUS sponsored project](https://numfocus.org/sponsored-projects)
- **2018**: First in-person core developer sprint

## Library Highlights

- A fast and efficient **DataFrame** object for data manipulation with
integrated indexing;

- Tools for **reading and writing data** between in-memory data structures and
different formats: CSV and text files, Microsoft Excel, SQL databases, and
the fast HDF5 format;

- Intelligent **data alignment** and integrated handling of **missing data**:
gain automatic label-based alignment in computations and easily manipulate
messy data into an orderly form;

- Flexible **reshaping** and pivoting of data sets;

- Intelligent label-based **slicing**, **fancy indexing**, and **subsetting**
of large data sets;

- Columns can be inserted and deleted from data structures for **size
mutability**;

- Aggregating or transforming data with a powerful **group by** engine
allowing split-apply-combine operations on data sets;

- High performance **merging and joining** of data sets;

- **Hierarchical axis indexing** provides an intuitive way of working with
high-dimensional data in a lower-dimensional data structure;

- **Time series**-functionality: date range generation and frequency
conversion, moving window statistics, moving window linear regressions, date
shifting and lagging. Even create domain-specific time offsets and join time
series without losing data;

- Highly **optimized for performance**, with critical code paths written in
[Cython](http://www.cython.org/) or C.

- Python with *pandas* is in use in a wide variety of **academic and
commercial** domains, including Finance, Neuroscience, Economics,
Statistics, Advertising, Web Analytics, and more.

## Mission

_pandas_ aims to be the fundamental high-level building block for doing practical,
real world data analysis in Python.
Additionally, it has the broader goal of becoming the most powerful and flexible
open source data analysis / manipulation tool available in any language.

## Vision

A world where data analytics and manipulation software is:

- Accessible to everyone
- Free for users to use and modify
- Flexible
- Powerful
- Easy to use
- Fast

## Values

Is in the core of _pandas_ to be respectful and welcoming with everybody,
users, contributors and the broader community. Regardless of level of experience,
gender, gender identity and expression, sexual orientation, disability,
personal appearance, body size, race, ethnicity, age, religion, or nationality.
46 changes: 46 additions & 0 deletions web/pandas/community/citing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Citing pandas

## Citing

If you use _pandas_ for a scientific publication, we would appreciate citations to one of the following papers:

- [Data structures for statistical computing in python](http://conference.scipy.org/proceedings/scipy2010/pdfs/mckinney.pdf),
McKinney, Proceedings of the 9th Python in Science Conference, Volume 445, 2010.

@inproceedings{mckinney2010data,
title={Data structures for statistical computing in python},
author={Wes McKinney},
booktitle={Proceedings of the 9th Python in Science Conference},
volume={445},
pages={51--56},
year={2010},
organization={Austin, TX}
}


- [pandas: a foundational Python library for data analysis and statistics](https://www.scribd.com/document/71048089/pandas-a-Foundational-Python-Library-for-Data-Analysis-and-Statistics),
McKinney, Python for High Performance and Scientific Computing, Volume 14, 2011.

@article{mckinney2011pandas,
title={pandas: a foundational Python library for data analysis and statistics},
author={Wes McKinney},
journal={Python for High Performance and Scientific Computing},
volume={14},
year={2011}
}

## Brand and logo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we have a new logo, this probably deserves it's own apge


When using the project name _pandas_, please use it in lower case, even at the beginning of a sentence.

The official logo of _pandas_ is:

![]({{ base_url }}/static/img/pandas.svg)

You can download a `svg` version of the logo [here]({{ base_url }}/static/img/pandas.svg).

When using the logo, please follow the next directives:

- Leave enough margin around the logo
- Do not distort the logo by changing its proportions
- Do not place text or other elements on top of the logo
63 changes: 63 additions & 0 deletions web/pandas/community/coc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic
addresses, without explicit permission
* Other unethical or unprofessional conduct

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

By adopting this Code of Conduct, project maintainers commit themselves to
fairly and consistently applying these principles to every aspect of managing
this project. Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.

A working group of community members is committed to promptly addressing any
reported issues. The working group is made up of pandas contributors and users.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the working group by e-mail (pandas-coc@googlegroups.com).
Messages sent to this e-mail address will not be publicly visible but only to
the working group members. The working group currently includes

<ul>
{% for person in maintainers.coc %}
<li>{{ person }}</li>
{% endfor %}
</ul>

All complaints will be reviewed and investigated and will result in a response
that is deemed necessary and appropriate to the circumstances. Maintainers are
obligated to maintain confidentiality with regard to the reporter of an
incident.

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.3.0, available at
[http://contributor-covenant.org/version/1/3/0/][version],
and the [Swift Code of Conduct][swift].

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/3/0/
[swift]: https://swift.org/community/#code-of-conduct

Loading