Created
March 16, 2017 13:01
-
-
Save janpipek/848b3aa5aa6fddf7398f811970558fd9 to your computer and use it in GitHub Desktop.
Convert a certain Munro table into more digestible
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
munros = pd.read_csv("../physt/example/munrotab_v6.csv", encoding="latin-1") | |
munros = munros[munros["Post 1997"] == "MUN"] | |
munros["name"] = munros["Name"] | |
munros["height"] = munros["Height (m)"] | |
from bng_to_latlon import OSGB36toWGS84 | |
munros["lat"], munros["long"] = tuple(zip(*[OSGB36toWGS84(*pair) for pair in (zip(munros.xcoord, munros.ycoord))])) | |
munros = munros[["name", "height", "long", "lat"]].reset_index(drop=True) | |
munros.to_csv("../physt/example/munros.csv") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment