Skip to content

Commit

Permalink
Push discussion of API key to the end. (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
vengroff committed Mar 22, 2024
1 parent 5bd7b66 commit 8b1bff8
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions docs/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,6 @@ or `poetry <https://python-poetry.org/>`_ to manage
your dependencies, then you can add ``censusdis`` the
same way you would add any other dependency.

Census API Key (Optional Initially)
-----------------------------------

The Census API that ``censusdis`` calls requires the use of an API
key unless you are doing only a relatively small number of queries.
Luckily, the key is free and easy to get, and once you have one in
a file in the right place on your machine ``censusdis`` will automatically
use it with every call to the Census API.

To obtain a key, visit `this page <https://api.census.gov/data/key_signup.html>`_.
The key will be sent to you be email. It will be a long string of numbers
and letters. Make a directory called ``.censusdis`` in your home directory,
then inside that directory create a text file called ``api_key.txt``. The file
should have just one line, and you should paste the key you got via email
into it. Once this is done, all ``censusdis`` calls to the Census API will
use this key.

Making Your First Query
-----------------------

Expand Down Expand Up @@ -566,6 +549,29 @@ There are additional more advanced examples and
additional maps and visualizations,
presented in more `Demo Notebooks <./notebooks.html>`_.

Census API Key (Optional Initially)
-----------------------------------

The Census API that ``censusdis`` calls recommends the use of an API
key. But chances are you were able to make it through all of the examples
above without one. This is because
until you are doing a large number of queries, you don't need
one. But
once you are doing a large number of queries or putting `censusdis` into
a production pipeline, you should return to this section and obtain a key.

Luckily, the key is free and easy to get, and once you have a key in
a file in the right place on your machine ``censusdis`` will automatically
use it with every call to the Census API.

To obtain a key, visit `this page <https://api.census.gov/data/key_signup.html>`_.
The key will be sent to you be email. It will be a long string of numbers
and letters. Make a directory called ``.censusdis`` in your home directory,
then inside that directory create a text file called ``api_key.txt``. The file
should have just one line, and you should paste the key you got via email
into it. Once this is done, all ``censusdis`` calls to the Census API will
use this key.

Help and Issues
---------------

Expand Down

0 comments on commit 8b1bff8

Please sign in to comment.