Skip to content

Commit

Permalink
update presentation nb
Browse files Browse the repository at this point in the history
  • Loading branch information
pmayd committed Jan 30, 2024
1 parent bdba72c commit 96f0bc1
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions nb/presentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# - Statistics: statistics is the larger collections of tables on the topic, finds the ones with keyword in title
# - Variables: variables are the values (DE: Merkmal) in columns of the tables, find ones with keyword in label
#
# Returns the titles of relevant tables/statistics/variables and their [EVAS](https://www.destatis.de/DE/Service/Bibliothek/Abloesung-Fachserien/uebersicht-fs.html) number – useful tool to look these up (EVAS is necessary for the Table method)
# Returns the titles of relevant tables/statistics/variables and their [EVAS](https://www.destatis.de/DE/Service/Bibliothek/Abloesung-Fachserien/uebersicht-fs.html) number – useful tool to look these up (EVAS is necessary for the Table method)
#
# 1. call Find using a keyword `query=<keyword>` and specifying a database `db_name=<genesis|zensus|regio>`
# 2. actually query the API and print the results using `.run()`
Expand All @@ -68,22 +68,22 @@
# Add `.df` to convert to a dataframe for easier handling.

# %%
results.tables.df
results.tables.df

# %% [markdown]
# We can then access the relevant codes with `.get_code([#])`. Doing this returns a list of codes from specified rows which may be useful to run in the Table method.

# %%
results.tables.get_code([0,1,2])
results.tables.get_code([0, 1, 2])

# %% [markdown]
# To then check that the object has the relevant data, we can preview the columns using the `.meta_data()` method.

# %%
results.tables.get_metadata([1,2])
results.tables.get_metadata([1, 2])

# %% [markdown]
# The `pystatis.Find` is a useful search tool to browse the database by any keyword. It is quicker than downloading a table and does not need the EVAS number to run.
# The `pystatis.Find` is a useful search tool to browse the database by any keyword. It is quicker than downloading a table and does not need the EVAS number to run.
#
# Use this to identify the tables of interest and to look up their EVAS as to use in the further analysis with a `pystatis.Table` method.

Expand Down Expand Up @@ -150,10 +150,25 @@
t.data

# %% [markdown]
# The `get_data()` method supports all parameters that you can pass to the API, like `startyear`, `endyear` or `timeslicec`
# The `get_data()` method supports all parameters that you can pass to the API, like `startyear`, `endyear` or `timeslices`

# %%
# GENESIS
t = pystatis.Table(name="43311-0001")
t.get_data(startyear=2000)
t.data

# %% [markdown]
# ## Jonas

# %% [markdown]
#

# %% [markdown]
# ## Outlook

# %% [markdown]
# - `quality=on`

# %% [markdown]
#

0 comments on commit 96f0bc1

Please sign in to comment.