Skip to content

Transform a dataframe to KML file and vice-versa!

License

Notifications You must be signed in to change notification settings

dankkom/kmldata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kmldata - transform table data into a KML file and vice versa

tests Coverage Status

Installation

kmldata isn't published on PyPI yet. Install it from GitHub repository:

pip install git+https://github.com/dankkom/kmldata#egg=kmldata

Usage

First import kmldata

import kmldata

We can transform a Pandas DataFrame into a KML file.

import pandas as pd


data = pd.read_csv("data.csv")
opt = kmldata.Options(
    lat="Latitude",
    lon="Longitude",
    altitude="Altitude",
)
kml = kmldata.make_kml(data, opt)
kmldata.save_kml(kml, "data.kml")
df = kmldata.read_kml("data.kml")

License

This package is licensed under GNU GPLv3.