Giter Club home page Giter Club logo

homeratio's Introduction

Homeratio

This python script calculates how many days you have lived in different places and plots them as a bar graph or pie chart. It can plot the data with varying spatial resolution. These can for example be; continent, country, state, region, city, street, address. These can be specified in the first row of the csv file. Check the files under ./examples for example data files.

The script require data in a csv format with labels as the first column. It also requires the start date in the first column and the end date in the second column and that each line has the same number of columns. The script also require the date format YYYY-MM-DD. The rest of the columns can have whatever labels you want and how many want, i.e the csv file can have any number of columns but a minimum of 3. The end date can also have the alternative form "present" in which the script is using the current date as end date.

The date format, the 'present' tag, as well as the column positions of the end and start date can easily be changed in config.py if necessary.

Example output

Example 1

The output from the script can have the following appearance. These images are created with data from examples/example_data1.csv.

Pie chart showing the percentage per city

Pie chart with the percentage of days spent in the different cities.

Bar graph showing the percentage per city

Bar graph of the same data as above.

Bar graph showing the days per city

Bar graph showing the number of days instead of percentage.

Example 2

These images are genererated with the examples/example_data2.csv file and illustrates grouping on different labels.

Pie chart showing the percentage per continent

Pie chart showing the percentage of days living on three different continents

Pie chart showing the percentage per continent

Pie chart showing the percentage of days living in 5 different countries

Pie chart showing the percentage per continent

Pie chart showing the percentage of days living in 7 different cities

Setup

Install the dependencies with:

pip install -r requirements.txt

Example of how to run the script. For more info use argument -h:

python3 homeratio.py examples/example_data1.csv city

homeratio's People

Contributors

dawierha avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.