Skip to content

Instantly share code, notes, and snippets.

AlexandraKapp

Block or report user

Report or block AlexandraKapp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View berliner_bezirksgrenzen.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View geo_tools.md
View common_pandas_commands.md

merge two dfs on specific key

df.set_index('key').join(df2.set_index('key'))

get datetime from String

pd.to_datetime(df['date'],format='%Y-%m-%d')

get weekday of datetime

@AlexandraKapp
AlexandraKapp / pypi_package.md
Last active Oct 9, 2019
Upload Package to PyPI
View pypi_package.md

Upload Package to PyPI

  1. create package distribution python setup.py sdist bdist_wheel

  2. Test if Package is without errors twine check dist/*

  3. upload package python -m twine upload dist/*

@AlexandraKapp
AlexandraKapp / data_to_plr.py
Created Sep 23, 2019
Merge data with Berlin Planungsraeume
View data_to_plr.py
import geopandas as gpd
import pandas as pd
from shapely.geometry import Point
plr = gpd.read_file('data/lor_planungsraeume.geojson', encoding='utf-8')
df = pd.read_csv('data/DATAFILE.csv', sep=";", dtype={'PLR_CODES':str}, na_values=['OTHER_NAN_VALUES'])
df.set_index('PLR_CODES', inplace=True)
data = df.join(plr.set_index('spatial_name'), rsuffix='_r')
View command_line.md

add paths to .bashsrc

echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your/custom/path/' >> ~/.bashrc

show hidden files

ls -la ~/ | more
View docker-geocoder.md

How to setup a geocoder api on your local computer

  1. Setup docker on your local machine and install Docker desktop
  2. Clone the nominitim-docker v3.0.0 repo:
git clone https://github.com/mediagis/nominatim-docker/tree/master/3.0

​ 3. Modify the Dockerfile and set your url to PBF

View berlin-s-bahn-ring.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View keybase.md

Keybase proof

I hereby claim:

  • I am alexandrakapp on github.
  • I am lxndrkp (https://keybase.io/lxndrkp) on keybase.
  • I have a public key ASCopZ4j7uQl1baFtmohzoVTx-LgAMOXRbCJMyf2tMTcdgo

To claim this, I am signing this object:

You can’t perform that action at this time.