Skip to content

Commit bcb9cf7

Browse files
authored
Merge pull request #127 from lucasrodes/develop
documentation improvements
2 parents 0715386 + 3f8a1e0 commit bcb9cf7

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

docs/source/about.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ First contact with whatstk
1717
:func:`from_source <whatstk._chat.BaseChat.from_source>` to be implemented. This method loads and parses the source
1818
chat file into a pandas.DataFrame.
1919

20-
Below, we use the WhatsApp implementation, i.e. :class:`WhatsAppChat <whatstk.WhatsAppChat>`, to load `LOREM chat
20+
Below, we use method :func:`df_from_txt_whatsapp <whatstk.whatsapp.parser.df_from_txt_whatsapp>` to load `LOREM chat
2121
<http://raw.githubusercontent.com/lucasrodes/whatstk/develop/chats/whatsapp/lorem.txt>`_. To test it with your own
2222
chat, simply :ref:`export it as a txt file<Export chat>` to your computer and then use class argument ``filepath``, as
2323
shown in the following example.
2424

2525

2626
.. code-block:: python
2727
28-
>>> from whatstk.whatsapp.objects import WhatsAppChat
28+
>>> from whatstk import df_from_txt_whatsapp
2929
>>> from whatstk.data import whatsapp_urls
30-
>>> chat = WhatsAppChat.from_source(filepath=whatsapp_urls.LOREM)
31-
>>> chat.df.head(5)
30+
>>> df = df_from_txt_whatsapp(filepath=whatsapp_urls.LOREM)
31+
>>> df.head(5)
3232
date username message
3333
0 2020-01-15 02:22:56 Mary Nostrud exercitation magna id.
3434
1 2020-01-15 03:33:01 Mary Non elit irure irure pariatur exercitation. 🇩🇰
@@ -60,7 +60,7 @@ Clone the project from the `official repository <https://github.com/lucasrodes/w
6060
6161
Extensions
6262
^^^^^^^
63-
To use Google Drive or Chat Generation support, install the library along with the corresponding extensions:
63+
To use :ref:`Google Drive <Load WhatsApp chat from Google Drive>` or Chat Generation support, install the library along with the corresponding extensions:
6464

6565
.. code-block:: bash
6666

docs/source/code_examples/interventions_count.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ Count of characters sent per user
6363
Now, instead of counting the number of interventions we might want to explore the number of characters sent. Note that a
6464
user might send tons of messages with few words, whereas another user might send few messages with tons of words.
6565
Depending on your analysis you might prefer exploring interventions or number of characters. Getting the number of
66-
characters sent per user can be done using ``msg_len=True`` when calling function
66+
characters sent per user can be done using ``msg_length=True`` when calling function
6767
:func:`user_interventions_count_linechart <whatstk.FigureBuilder.user_interventions_count_linechart>`.
6868

6969
In the following we explore the cumulative number of characters sent per user.
7070

7171
.. code-block:: python
7272
73-
>>> fig = fb.user_interventions_count_linechart(msg_len=True, cumulative=True, title='Characters sent by user (cumulative)')
73+
>>> fig = fb.user_interventions_count_linechart(msg_length=True, cumulative=True, title='Characters sent by user (cumulative)')
7474
>>> plot(fig)
7575
7676

docs/source/code_examples/load_chat.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Load WhatsApp chat
44
Once you have :doc:`exported <../getting_started/export_chat>` a chat it is time to load it in python.
55

66
In this example we load the example `LOREM chat <http://raw.githubusercontent.com/lucasrodes/whatstk/
7-
develop/chats/whatsapp/lorem.txt>`_, which is available online, using library class :class:`WhatsAppChat
7+
main/chats/whatsapp/lorem.txt>`_, which is available online, using library class :class:`WhatsAppChat
88
<whatstk.WhatsAppChat>`.
99

1010
.. code-block:: python

docs/source/code_examples/load_chat_multiple.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ You can also load a chat using multiple source files. You might want to use this
55
from the same chat over the years.
66

77
In the example below, we load chats
8-
`LOREM1 <http://raw.githubusercontent.com/lucasrodes/whatstk/develop/chats/whatsapp/lorem-merge-part1.txt>`_ and `LOREM2 <http://raw.githubusercontent.com/lucasrodes/whatstk/develop/chats/whatsapp/lorem-merge-part2.txt>`_.
8+
`LOREM1 <http://raw.githubusercontent.com/lucasrodes/whatstk/main/chats/whatsapp/lorem-merge-part1.txt>`_ and `LOREM2 <http://raw.githubusercontent.com/lucasrodes/whatstk/develop/main/whatsapp/lorem-merge-part2.txt>`_.
99

1010
.. code-block:: python
1111
@@ -17,8 +17,8 @@ Rename usernames
1717
----------------
1818

1919
In the example here, chat `LOREM1
20-
<http://raw.githubusercontent.com/lucasrodes/whatstk/develop/chats/whatsapp/lorem-merge-part1.txt>`_ and chat `LOREM2
21-
<http://raw.githubusercontent.com/lucasrodes/whatstk/develop/chats/whatsapp/lorem-merge-part2.txt>`_ contain slightly
20+
<http://raw.githubusercontent.com/lucasrodes/whatstk/main/chats/whatsapp/lorem-merge-part1.txt>`_ and chat `LOREM2
21+
<http://raw.githubusercontent.com/lucasrodes/whatstk/main/chats/whatsapp/lorem-merge-part2.txt>`_ contain slightly
2222
different usernames. In particular, in chat LOREM2, user *Mary* appears as *Maria* and *Maria2*:
2323

2424
.. code-block:: python

0 commit comments

Comments
 (0)