Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.
/ kmldata Public archive

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.