|
| 1 | +# dataanalysiscompare |
| 2 | +[](https://badge.fury.io/py/dataanalysiscompare) |
| 3 | +[](https://opensource.org/licenses/MIT) |
| 4 | +[](https://pepy.tech/project/dataanalysiscompare) |
| 5 | +[](https://www.linkedin.com/in/eugene-evstafev-716669181/) |
| 6 | + |
| 7 | + |
| 8 | +**dataanalysiscompare** is a lightweight Python package that helps you quickly compare four popular data‑analysis tools—**Excel**, **Power BI**, **SQL**, and **Python**—based on your specific needs, project requirements, or skill level. By leveraging a language model (LLM) under the hood, the package returns a clear, standardized comparison that includes key differentiators, best‑use cases, learning curves, and integration capabilities. |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +## ✨ Features |
| 13 | + |
| 14 | +- **Instant, structured comparison** of Excel, Power BI, SQL, and Python. |
| 15 | +- Works with the default **ChatLLM7** model (no extra setup required) or any other LangChain‑compatible LLM you prefer. |
| 16 | +- Simple API: just pass a natural‑language description of your use case. |
| 17 | +- Returns a list of strings that can be easily displayed, logged, or further processed. |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## 📦 Installation |
| 22 | + |
| 23 | +```bash |
| 24 | +pip install dataanalysiscompare |
| 25 | +``` |
| 26 | + |
| 27 | +--- |
| 28 | + |
| 29 | +## 🚀 Quick Start |
| 30 | + |
| 31 | +```python |
| 32 | +from dataanalysiscompare import dataanalysiscompare |
| 33 | + |
| 34 | +# Simple call using the default LLM (ChatLLM7) |
| 35 | +user_query = """ |
| 36 | +I have a medium‑sized sales dataset in CSV format. |
| 37 | +I need to clean the data, create visual dashboards, and share insights with my team. |
| 38 | +I have basic Excel skills but want something more powerful. |
| 39 | +""" |
| 40 | +result = dataanalysiscompare(user_input=user_query) |
| 41 | + |
| 42 | +for line in result: |
| 43 | + print(line) |
| 44 | +``` |
| 45 | + |
| 46 | +### Output (example) |
| 47 | + |
| 48 | +``` |
| 49 | +- Excel: Great for quick calculations and ad‑hoc analysis but limited for large datasets. |
| 50 | +- Power BI: Excellent for interactive dashboards and sharing reports; steeper learning curve. |
| 51 | +- SQL: Ideal for querying large relational datasets; requires knowledge of SQL syntax. |
| 52 | +- Python: Most flexible; powerful libraries (pandas, matplotlib, seaborn) but higher learning curve. |
| 53 | +... |
| 54 | +``` |
| 55 | + |
| 56 | +--- |
| 57 | + |
| 58 | +## 🛠️ Advanced Usage |
| 59 | + |
| 60 | +### Providing Your Own LLM |
| 61 | + |
| 62 | +If you prefer to use a different LangChain LLM (e.g., OpenAI, Anthropic, Google Gemini), simply pass the instantiated model via the `llm` argument. |
| 63 | + |
| 64 | +#### OpenAI Example |
| 65 | + |
| 66 | +```python |
| 67 | +from langchain_openai import ChatOpenAI |
| 68 | +from dataanalysiscompare import dataanalysiscompare |
| 69 | + |
| 70 | +llm = ChatOpenAI(model="gpt-4o-mini") |
| 71 | +response = dataanalysiscompare( |
| 72 | + user_input="I need to automate monthly reporting from a PostgreSQL database.", |
| 73 | + llm=llm |
| 74 | +) |
| 75 | +print(response) |
| 76 | +``` |
| 77 | + |
| 78 | +#### Anthropic Example |
| 79 | + |
| 80 | +```python |
| 81 | +from langchain_anthropic import ChatAnthropic |
| 82 | +from dataanalysiscompare import dataanalysiscompare |
| 83 | + |
| 84 | +llm = ChatAnthropic(model_name="claude-3-haiku-20240307") |
| 85 | +response = dataanalysiscompare( |
| 86 | + user_input="My team wants a low‑code solution for building interactive charts.", |
| 87 | + llm=llm |
| 88 | +) |
| 89 | +print(response) |
| 90 | +``` |
| 91 | + |
| 92 | +#### Google Gemini Example |
| 93 | + |
| 94 | +```python |
| 95 | +from langchain_google_genai import ChatGoogleGenerativeAI |
| 96 | +from dataanalysiscompare import dataanalysiscompare |
| 97 | + |
| 98 | +llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash") |
| 99 | +response = dataanalysiscompare( |
| 100 | + user_input="I need to integrate data from Excel and a MySQL database into a single dashboard.", |
| 101 | + llm=llm |
| 102 | +) |
| 103 | +print(response) |
| 104 | +``` |
| 105 | + |
| 106 | +### Supplying a Custom API Key for LLM7 |
| 107 | + |
| 108 | +The default LLM7 free‑tier limits are sufficient for most usage. If you need higher limits, provide your own API key: |
| 109 | + |
| 110 | +```python |
| 111 | +from dataanalysiscompare import dataanalysiscompare |
| 112 | + |
| 113 | +response = dataanalysiscompare( |
| 114 | + user_input="Describe the best data‑analysis tool for a beginner who wants to learn data science.", |
| 115 | + api_key="YOUR_LLM7_API_KEY" |
| 116 | +) |
| 117 | +print(response) |
| 118 | +``` |
| 119 | + |
| 120 | +You can also set the environment variable `LLM7_API_KEY` and omit the `api_key` argument. |
| 121 | + |
| 122 | +--- |
| 123 | + |
| 124 | +## 📋 Function Signature |
| 125 | + |
| 126 | +```python |
| 127 | +def dataanalysiscompare( |
| 128 | + user_input: str, |
| 129 | + api_key: Optional[str] = None, |
| 130 | + llm: Optional[BaseChatModel] = None |
| 131 | +) -> List[str]: |
| 132 | + """ |
| 133 | + Compare Excel, Power BI, SQL, and Python based on the provided user description. |
| 134 | +
|
| 135 | + Parameters |
| 136 | + ---------- |
| 137 | + user_input: str |
| 138 | + Natural‑language description of the data‑analysis needs, project, or skill level. |
| 139 | + llm: Optional[BaseChatModel] |
| 140 | + A LangChain LLM instance to use. If omitted, the default ChatLLM7 is used. |
| 141 | + api_key: Optional[str] |
| 142 | + API key for LLM7. If omitted, the function looks for the LLM7_API_KEY environment |
| 143 | + variable or falls back to the free tier. |
| 144 | +
|
| 145 | + Returns |
| 146 | + ------- |
| 147 | + List[str] |
| 148 | + A list of strings containing the comparative insights. |
| 149 | + """ |
| 150 | +``` |
| 151 | + |
| 152 | +--- |
| 153 | + |
| 154 | +## 🧩 Dependencies |
| 155 | + |
| 156 | +- `langchain-core` |
| 157 | +- `langchain-llm7` |
| 158 | +- `llmatch-messages` |
| 159 | +- `re`, `os`, `typing` (standard library) |
| 160 | + |
| 161 | +All dependencies are installed automatically with the package. |
| 162 | + |
| 163 | +--- |
| 164 | + |
| 165 | +## 📖 Documentation & Support |
| 166 | + |
| 167 | +- **Source code / Issues:** <https://github....> |
| 168 | +- **LLM7 documentation:** <https://pypi.org/project/langchain-llm7/> |
| 169 | +- **LangChain docs:** <https://docs.langchain.com/> |
| 170 | + |
| 171 | +If you encounter any problems or have feature requests, please open an issue on GitHub. |
| 172 | + |
| 173 | +--- |
| 174 | + |
| 175 | +## 👤 Author |
| 176 | + |
| 177 | +**Eugene Evstafev** |
| 178 | +📧 Email: [hi@euegne.plus](mailto:hi@euegne.plus) |
| 179 | +🐙 GitHub: [chigwell](https://github.com/chigwell) |
| 180 | + |
| 181 | +--- |
| 182 | + |
| 183 | +## 📜 License |
| 184 | + |
| 185 | +This project is licensed under the MIT License – see the `LICENSE` file for details. |
0 commit comments