{"id":13936383,"url":"https://github.com/kayak/fireant","last_synced_at":"2025-07-19T21:32:33.040Z","repository":{"id":48391990,"uuid":"65020729","full_name":"kayak/fireant","owner":"kayak","description":"Data analysis and reporting tool for quick access to custom charts and tables in Jupyter Notebooks and in the shell.","archived":false,"fork":false,"pushed_at":"2024-01-11T21:34:15.000Z","size":2439,"stargazers_count":120,"open_issues_count":5,"forks_count":20,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-05-30T00:42:11.068Z","etag":null,"topics":["aggregated","analysis","analytics","bi","builder","business","data","database","fireant","juypter","mysql","oracle","pandas","postgres","python","query","rdbms","science","sql","vertica"],"latest_commit_sha":null,"homepage":"http://fireant.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kayak.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-05T13:30:51.000Z","updated_at":"2025-01-18T21:55:06.000Z","dependencies_parsed_at":"2023-11-07T14:25:18.295Z","dependency_job_id":"d3582820-c9b1-48c7-86dd-fef53d500d50","html_url":"https://github.com/kayak/fireant","commit_stats":{"total_commits":902,"total_committers":14,"mean_commits":64.42857142857143,"dds":"0.42793791574279383","last_synced_commit":"f172c3f4117ece1240d62575b57e7485484764a8"},"previous_names":[],"tags_count":93,"template":false,"template_full_name":null,"purl":"pkg:github/kayak/fireant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayak%2Ffireant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayak%2Ffireant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayak%2Ffireant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayak%2Ffireant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kayak","download_url":"https://codeload.github.com/kayak/fireant/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayak%2Ffireant/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266019657,"owners_count":23864916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aggregated","analysis","analytics","bi","builder","business","data","database","fireant","juypter","mysql","oracle","pandas","postgres","python","query","rdbms","science","sql","vertica"],"created_at":"2024-08-07T23:02:37.061Z","updated_at":"2025-07-19T21:32:28.031Z","avatar_url":"https://github.com/kayak.png","language":"Python","readme":"FireAnt - Analytics and Reporting\n=================================\n\n.. _intro_start:\n\n|BuildStatus|  |CoverageStatus|  |Codacy|  |Docs|  |PyPi|  |License|\n\n\n|Brand| is a a data analysis tool used for quickly building charts, tables, reports, and dashboards. It defines a schema for configuring metrics and dimensions which removes most of the leg work of writing queries and formatting charts. |Brand| even works great with Jupyter notebooks and in the Python shell providing quick and easy access to your data.\n\n.. _intro_end:\n\nRead more at http://fireant.readthedocs.io/en/latest/\n\nInstallation\n------------\n\n.. _installation_start:\n\nTo install |Brand|, run the following command in the terminal:\n\n.. code-block:: bash\n\n    pip install fireant\n\n\n.. _installation_end:\n\nIntroduction\n------------\n\n|Brand| arose out of an environment where several different teams, each working with data sets often with crossover, were individually building their own dashboard platforms. |Brand| was developed as a centralized way of building dashboards without the legwork.\n\n|Brand| is used to create configurations of data sets using |FeatureDataSet| which backs a database table containing analytics and defines sets of |FeatureField|. A |FeatureField| can be used to group data by properties, such as a timestamp, an account, a device type, etc, or to render quantifiers such as clicks, ROI, conversions into a widget such as a chart or table.\n\nA |FeatureDataSet| exposes a rich builder API that allows a wide range of queries to be constructed that can be rendered as several widgets. A |FeatureDataSet| can be used directly in a Jupyter_ notebook, eliminating the need to write repetitive custom queries and render the data in visualizations.\n\nData Sets\n---------\n\n|FeatureDataSet| are the core component of |Brand|. A |FeatureDataSet| is a representation of a data set and is used to execute queries and transform result sets into widgets such as charts or tables.\n\nA |FeatureDataSet| requires only a couple of definitions in order to use: A database connector, a database table, join tables, and dimensions and metrics. Metrics and Dimension definitions tell |Brand| how to query and use data in widgets. Once a dataset is created, it's query API can be used to build queries with just a few lines of code selecting which dimensions and metrics to use and how to filter the data.\n\n.. _dataset_example_start:\n\nInstantiating a Data Set\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n.. code-block:: python\n\n    from fireant.dataset import *\n    from fireant.database import VerticaDatabase\n    from pypika import Tables, functions as fn\n\n    vertica_database = VerticaDatabase(user='myuser', password='mypassword')\n    analytics, customers = Tables('analytics', 'customers')\n\n    my_dataset = DataSet(\n        database=vertica_database,\n        table=analytics,\n        fields=[\n            Field(\n                # Non-aggregate definition\n                alias='customer',\n                definition=customers.id,\n                label='Customer'\n            ),\n            Field(\n                # Date/Time type, also non-aggregate\n                alias='date',\n                definition=analytics.timestamp,\n                type=DataType.date,\n                label='Date'\n            ),\n            Field(\n                # Text type, also non-aggregate\n                alias='device_type',\n                definition=analytics.device_type,\n                type=DataType.text,\n                label='Device_type'\n            ),\n            Field(\n                # Aggregate definition (The SUM function aggregates a group of values into a single value)\n                alias='clicks',\n                definition=fn.Sum(analytics.clicks),\n                label='Clicks'\n            ),\n            Field(\n                # Aggregate definition (The SUM function aggregates a group of values into a single value)\n                alias='customer-spend-per-clicks',\n                definition=fn.Sum(analytics.customer_spend / analytics.clicks),\n                type=DataType.number,\n                label='Spend / Clicks'\n            )\n        ],\n        joins=[\n            Join(customers, analytics.customer_id == customers.id),\n        ],\n\n.. _dataset_example_end:\n\n.. _dataset_query_example_start:\n\nBuilding queries with a Data Set\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nUse the ``query`` property of a data set instance to start building a data set query. A data set query allows method calls to be chained together to select what should be included in the result.\n\nThis example uses the data set defined above\n\n.. code-block:: python\n\n   from fireant import Matplotlib, Pandas, day\n\n    matplotlib_chart, pandas_df = my_dataset.data \\\n         .dimension(\n            # Select the date dimension with a daily interval to group the data by the day applies to\n            # dimensions are referenced by `dataset.fields.{alias}`\n            day(my_dataset.fields.date),\n\n            # Select the device_type dimension to break the data down further by which device it applies to\n            my_dataset.fields.device_type,\n         ) \\\n         .filter(\n            # Filter the result set to data to the year of 2018\n            my_dataset.fields.date.between(date(2018, 1, 1), date(2018, 12, 31))\n         ) \\\n         # Add a week over week reference to compare data to values from the week prior\n         .reference(WeekOverWeek(dataset.fields.date))\n         .widget(\n            # Add a matpotlib chart widget\n            Matplotlib()\n               # Add axes with series to the chart\n               .axis(Matplotlib.LineSeries(dataset.fields.clicks))\n\n               # metrics are referenced by `dataset.metrics.{alias}`\n               .axis(Matplotlib.ColumnSeries(\n                   my_dataset.fields['customer-spend-per-clicks']\n               ))\n         ) \\\n         .widget(\n            # Add a pandas data frame table widget\n            Pandas(\n                my_dataset.fields.clicks,\n                my_dataset.fields['customer-spend-per-clicks']\n            )\n         ) \\\n         .fetch()\n\n    # Display the chart\n    matplotlib_chart.plot()\n\n    # Display the chart\n    print(pandas_df)\n\n.. _dataset_query_example_end:\n\nLicense\n-------\n\nCopyright 2020 KAYAK Germany, GmbH\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n\nCrafted with ♥ in Berlin.\n\n.. _license_end:\n\n\n.. _available_badges_start:\n\n.. |BuildStatus| image:: https://travis-ci.org/kayak/fireant.svg?branch=master\n   :target: https://travis-ci.org/kayak/fireant\n.. |CoverageStatus| image:: https://coveralls.io/repos/kayak/fireant/badge.svg?branch=master\u0026service=github\n   :target: https://coveralls.io/github/kayak/fireant?branch=master\n.. |Codacy| image:: https://api.codacy.com/project/badge/Grade/832b5a7dda8949c3b2ede28deada4569\n   :target: https://www.codacy.com/app/twheys/fireant\n.. |Docs| image:: https://readthedocs.org/projects/fireant/badge/?version=latest\n   :target: http://fireant.readthedocs.io/en/latest/\n.. |PyPi| image:: https://img.shields.io/pypi/v/fireant.svg?style=flat\n   :target: https://pypi.python.org/pypi/fireant\n.. |License| image:: https://img.shields.io/hexpm/l/plug.svg?maxAge=2592000\n   :target: http://www.apache.org/licenses/LICENSE-2.0\n\n.. _available_badges_end:\n\n.. _appendix_start:\n\n.. |Brand| replace:: *fireant*\n\n.. |FeatureDataSet| replace:: *DataSet*\n.. |FeatureField| replace:: *Field*\n.. |FeatureFilter| replace:: *Filter*\n.. |FeatureReference| replace:: *Reference*\n.. |FeatureOperation| replace:: *Operation*\n\n.. |ClassDataSet| replace:: ``fireant.DataSet \u003cfireant.dataset.klass.DataSet\u003e``\n.. |ClassDatabase| replace:: ``fireant.database.Database \u003cfireant.database.base.Database\u003e``\n.. |ClassJoin| replace:: ``fireant.Join \u003cfireant.dataset.joins.Join\u003e``\n.. |ClassMetric| replace:: ``fireant.Field \u003cfireant.dataset.fields.Field\u003e``\n.. |ClassThreadPoolConcurrencyMiddleware| replace:: ``fireant.middleware.ThreadPoolConcurrencyMiddleware \u003cfireant.middleware.concurrency.ThreadPoolConcurrencyMiddleware\u003e``\n.. |ClassBaseConcurrencyMiddleware| replace:: ``fireant.middleware.BaseConcurrencyMiddleware \u003cfireant.middleware.concurrency.BaseConcurrencyMiddleware\u003e``\n\n.. |ClassBooleanDimension| replace:: ``fireant.dataset.dimensions.BooleanDimension``\n.. |ClassContDimension| replace:: ``fireant.dataset.dimensions.ContinuousDimension``\n.. |ClassDateDimension| replace:: ``fireant.dataset.dimensions.DatetimeDimension``\n.. |ClassCatDimension| replace:: ``fireant.dataset.dimensions.CategoricalDimension``\n.. |ClassUniqueDimension| replace:: ``fireant.dataset.dimensions.UniqueDimension``\n.. |ClassDisplayDimension| replace:: ``fireant.dataset.dimensions.DisplayDimension``\n\n.. |ClassFilter| replace:: ``fireant.dataset.filters.Filter``\n.. |ClassComparatorFilter| replace:: ``fireant.dataset.filters.ComparatorFilter``\n.. |ClassBooleanFilter| replace:: ``fireant.dataset.filters.BooleanFilter``\n.. |ClassContainsFilter| replace:: ``fireant.dataset.filters.ContainsFilter``\n.. |ClassExcludesFilter| replace:: ``fireant.dataset.filters.ExcludesFilter``\n.. |ClassRangeFilter| replace:: ``fireant.dataset.filters.RangeFilter``\n.. |ClassPatternFilter| replace:: ``fireant.dataset.filters.PatternFilter``\n.. |ClassAntiPatternFilter| replace:: ``fireant.dataset.filters.AntiPatternFilter``\n\n.. |ClassReference| replace:: ``fireant.dataset.references.Reference``\n\n.. |ClassWidget| replace:: ``fireant.widgets.base.Widget``\n.. |ClassPandasWidget| replace:: ``fireant.widgets.pandas.Pandas``\n.. |ClassHighChartsWidget| replace:: ``fireant.widgets.highcharts.HighCharts \u003cfireant.widgets.highcharts.HighCharts\u003e``\n.. |ClassHighChartsSeries| replace:: ``fireant.widgets.highcharts.Series \u003cfireant.widgets.chart_base.Series\u003e``\n\n.. |ClassOperation| replace:: ``fireant.dataset.operations.Operation``\n\n.. |ClassVerticaDatabase| replace:: ``fireant.database.VerticaDatabase``\n.. |ClassMySQLDatabase| replace:: ``fireant.database.MySQLDatabase``\n.. |ClassPostgreSQLDatabase| replace:: ``fireant.database.PostgreSQLDatabase``\n.. |ClassRedshiftDatabase| replace:: ``fireant.database.RedshiftDatabase``\n\n.. |ClassDatetimeInterval| replace:: ``fireant.DatetimeInterval \u003cfireant.dataset.intervals.DatetimeInterval\u003e``\n\n.. |ClassTable| replace:: ``pypika.Table``\n.. |ClassTables| replace:: ``pypika.Tables``\n\n.. _PyPika: https://github.com/kayak/pypika/\n.. _Pandas: http://pandas.pydata.org/\n.. _Jupyter: http://jupyter.org/\n.. _Matplotlib: http://matplotlib.org/\n.. _HighCharts: http://www.highcharts.com/\n.. _React-Table: https://react-table.js.org/\n\n.. _appendix_end:\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkayak%2Ffireant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkayak%2Ffireant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkayak%2Ffireant/lists"}