Skip to content

Commit

Permalink
final presentation nb and shape data; omit file check in pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pmayd committed Feb 4, 2024
1 parent 5bcf57f commit 412fea7
Show file tree
Hide file tree
Showing 9 changed files with 3,291 additions and 15 deletions.
11 changes: 9 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-added-large-files
- id: check-merge-conflict
- repo: https://github.com/pycqa/isort
rev: 5.12.0
Expand All @@ -34,6 +33,14 @@ repos:
hooks:
- id: build-docs
name: "Check if documentation compiles"
args: ['--cache-dir', 'docs/build/doctrees', '--html-dir', 'docs/build/html', '--source-dir', 'docs/source']
args:
[
"--cache-dir",
"docs/build/doctrees",
"--html-dir",
"docs/build/html",
"--source-dir",
"docs/source",
]
language_version: python3
additional_dependencies: [myst-parser]
1 change: 1 addition & 0 deletions nb/data/VG2500_LAN.cpg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
Binary file added nb/data/VG2500_LAN.dbf
Binary file not shown.
1 change: 1 addition & 0 deletions nb/data/VG2500_LAN.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PROJCS["ETRS_1989_UTM_Zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",9.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0],AUTHORITY["EPSG",25832]]
Binary file added nb/data/VG2500_LAN.shp
Binary file not shown.
Binary file added nb/data/VG2500_LAN.shx
Binary file not shown.
Binary file added nb/data/vg2500_12-31.utm32s.shape.zip
Binary file not shown.
3,249 changes: 3,249 additions & 0 deletions nb/presentation.ipynb

Large diffs are not rendered by default.

44 changes: 31 additions & 13 deletions nb/presentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,25 @@

import pystatis

# %% [markdown]
# # CorrelAid
#
# https://www.correlaid.org/en/about/
#
# ## Our Mission
#
# CorrelAid is a **non-profit community of data science enthusiasts** who want to change the world using data science. We dedicate our work to the humans, initiatives and organizations that strive to make the world a better place.
#
# We value open knowledge management and transparency in our work wherever possible while complying with GDPR regulations and following strong principles of data ethics.
#
# ## Our Work
#
# Our work is based on three pillars:
#
# 1. **Using data**: We enable data analysts and scientists to apply their knowledge for the common good and social organizations to increase their impact on society by **conducting pro-bono data for good (Data4Good) projects** and providing consulting on data topics.
# 2. **Education**: We strongly believe in sharing our knowledge. It is not for nothing that we have chosen "education" as our association's official purpose. This is why we offer numerous education formats for nonprofits and volunteers. In addition, we share our knowledge, code, and materials publicly.
# 3. **Community**: Our community is the basis of our work. We unite data scientists of different backgrounds and experience levels. We organize ourselves both online and on-site within our CorrelAidX local groups.

# %% [markdown]
# # Pystatis presentation
#
Expand Down Expand Up @@ -52,12 +71,6 @@
results = pystatis.Find(query="Abfall", db_name="regio")
results.run()

# %% [markdown]
# After running `.run()` for the first time, we can also print a summary, using `.summary()`

# %%
results.summary()

# %% [markdown]
# If interested in specific object, can run `results.tables`, `results.statistics`, or `results.variables` directly.

Expand Down Expand Up @@ -142,7 +155,7 @@

# %%
# Regionalstatistik
t = pystatis.Table(name="71327-01-05-4")
t = pystatis.Table(name="21311-01-01-4")
t.get_data()
t.data

Expand All @@ -161,6 +174,13 @@
t.get_data(startyear=2000)
t.data

# %% [markdown]
# ## Advanced features
#
# - Caching
# - Handling background jobs
# - Cubes

# %% [markdown]
# ## Jonas

Expand All @@ -170,13 +190,11 @@
# - regional differences (at the level of federal states)

# %%
# Should we add this to poetry?
# conda install geopandas
# conda install matplotlib

import geopandas
# # !pip install geopandas
# # !pip install matplotlib

# %%
import geopandas
import pandas as pd
from matplotlib import pyplot as plt

Expand Down Expand Up @@ -269,7 +287,7 @@

# %%

path_to_data = "vg2500_12-31.utm32s.shape/vg2500/VG2500_LAN.shp"
path_to_data = "./data/VG2500_LAN.shp"
gdf = geopandas.read_file(path_to_data)


Expand Down

0 comments on commit 412fea7

Please sign in to comment.