{ "info": { "author": "Juan Manuel Perez & German Villacorta", "author_email": "juanmapf97@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6" ], "description": "# Extensive Language for Data Analysis (ELDA)\n\n## About ELDA\n### Vision / Purpose\nExtensive Language for Data Analysis is born with the vision of providing a tool for data analysis that results from a commitment in equal parts between the learning of a programming language focused on data analysis, and the efficient handling of data for processing in useful calculations for anyone with context in data science. All this with the purpose that the language serves as a facilitator for users without technological context in the adoption of analysis tools, thus being a bridge between people with mathematical knowledge but without programming knowledge to the use of more robust data analysis and manipulation tools.\n\nAs a result of this, two main conclusions can be drawn. First, it is not expected that language users have prior knowledge about programming of any kind, since it is expected that this knowledge can be obtained through the use of it. And second, once the basic knowledge about the programming oriented to the data analysis is achieved, calculations can be made with enough depth for the language to be considered useful in the prototyping of more robust solutions.\n\n### Main objective\nThe objective of E.L.D.A is to be a facilitator for people with no programming experience who wish to do basic statistical calculations such as: mean, variance, standard deviation, clustering, data classification, graph plotting, etc. It aims to shorten the gap between people with and without experience in technology such as graduates and students.\n\u00a0\nELDA belongs to the same category of languages as R, MATLAB and Octave, which allow matrix manipulation and data mapping. The difference between these languages that are more established and our project is that ELDA does not intend to do everything that these languages do; Analysis of time series, for example, are things that are beyond the scope of this compiler. The main purpose of our compiler is to be the first step in the transition to use these languages.\n\n## Quick Reference Manual\n\n### Installation\nSince ELDA is a language completely developed over python, it is distributed as a pyhton package and hence available\nthrough the package manager PIP.\n\nTo install ELDA, simply run:\n```\npip install elda\n```\n\nThis will install all required packages and make the language compiler and virtual machine available through a command\nline interface. This command has 2 parts: The compilation and the execution, to compile a program run:\n```bash\nelda -c \n```\n\nThis will generate an object file with the `.eo` extension and the same name as your program. To execute it, simply run:\n```bash\nelda -e \n```\n*NOTE*: Depending on your existing python setup, the first time that elda is called may take some time to execute.\nThis is due to matplotlib (which is used under the hood) caching some files needed to execute and will only happen\nonce.\n\n### Language Examples\nAn ELDA program is heavily structured, with declarations, statements and returns all following a set order. For example,\nto create a recursive fibonacci program, the return value should be stored and return should be called only once at the \nend of the function, like so:\n```\nint fibonacci(int x) {\n int return_value;\n if (x == 0) {\n return_value = 0;\n }\n if (x == 1) {\n return_value = 1;\n }\n if (x != 0 and x != 1) {\n return_value = fibonacci(x-1) + fibonacci(x-2);\n }\n return return_value;\n}\n\nvoid main() {\n out(fibonacci(10));\n}\n```\n### Array handling\nTo declare arrays with ELDA, you must add the size of the array *after* the type declaration but *before* the variable id.\nFor example, a simple program that handles matrixes:\n```\nint[5] vectorA = [1,2,3,4,5];\nint[5] vectorB = [5,4,3,2,1];\n\nint[5][5] matrixA = [[1,2,3,4,5],[6,7,8,9,10],[11,12,13,14,15],[16,17,18,19,20],[21,22,23,24,25]];\nint[5][5] matrixB = [[1,2,3,4,5],[6,7,8,9,10],[11,12,13,14,15],[16,17,18,19,20],[21,22,23,24,25]];\n\nint[5][5] mult;\nint[5][5] trans;\nint[5] sum;\n\nvoid print_matrix(int w) {\n string row = \"\";\n for i with range(0, 5) {\n for j with range(0, 5) {\n if (w == 1) {\n row = row + mult[i][j] + \" \";\n } else {\n row = row + trans[i][j] + \" \";\n }\n }\n out(row);\n row = \"\";\n }\n}\n\nvoid print_vector() {\n string row = \"\";\n for i with range(0, 5) {\n row = row + sum[i] + \" \";\n }\n out(row);\n row = \"\";\n}\n\nvoid multiply_matrixes() {\n for i with range(0, 5) {\n for j with range(0, 5) {\n for k with range(0, 5) {\n mult[i][j] = mult[i][j] + matrixA[i][k] * matrixB[k][j];\n }\n }\n }\n print_matrix(1);\n}\n\nvoid sum_vectors() {\n for i with range(0, 5) {\n sum[i] = vectorA[i] + vectorB[i];\n }\n print_vector();\n}\n\nvoid transpose_matrix() {\n for i with range(0, 5) {\n for j with range(0, 5) {\n trans[j][i] = matrixA[i][j];\n }\n }\n print_matrix(2);\n}\n\nvoid main() {\n out(\"Matrix multiplication of 5x5\");\n multiply_matrixes();\n\n out(\"Vector sum\");\n sum_vectors();\n\n out(\"Transposed matrix of matrixA\");\n transpose_matrix();\n}\n```\nLastly, ELDA comes with some analysis functions out of the box. This functions can be used by simply calling them\nfrom anywhere inside the program, and since they are part of the language, no module or import is required.\n```\nint[50] x = [4, 5, 7, 8, 11, 14, 16, 18, 19, 20, 25, 27, 28, 33, 34, 35, 37, 38, 41, 43, 44, 45, 48, 49, 50, 52, 53, 55, 56, 58, 63, 64, 66, 67, 71, 73, 74, 76, 79, 81, 83, 84, 85, 86, 87, 90, 92, 94, 96, 100];\nint[50] y = [2, 4, 5, 6, 10, 11, 12, 13, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 34, 35, 37, 40, 41, 45, 46, 50, 51, 52, 54, 57, 59, 60, 61, 64, 65, 66, 69, 70, 78, 82, 83, 85, 86, 91, 92, 95, 97, 98, 99];\n\nint[50] reg_x;\nint[50] reg_y;\n\nint[50][2] xy;\n\nvoid display_data(int v) {\n\tif (v == 1) {\n\t\tout(\"Data for x\");\n\t\tout(\"Min of x: \" + min(x));\n\t\tout(\"Max of x: \" + max(x));\n\t\tout(\"Mean of x: \" + mean(x));\n\t\tout(\"Median of x: \" + median(x));\n\t\tout(\"Std deviation of x: \" + std(x));\n\t\tout(\"Variance of x: \" + var(x));\n\t} else {\n\t\tout(\"Data for y\");\n\t\tout(\"Min of y: \" + min(y));\n\t\tout(\"Max of y: \" + max(y));\n\t\tout(\"Mean of y: \" + mean(y));\n\t\tout(\"Median of y: \" + median(y));\n\t\tout(\"Std deviation of y: \" + std(y));\n\t\tout(\"Variance of y: \" + var(y));\n\t}\n}\n\nvoid compute_linear_regression() {\n\tfloat[2] reg_params = linear_regression(x, y);\n\tint val_x = 2;\n\tstring res = \"Linear function: \" + reg_params[0];\n\tres = res + \"x + \" + reg_params[1];\n\n\tout(res);\n\tfor i with range(0, 50) {\n\t\treg_x[i] = val_x;\n\t\treg_y[i] = reg_params[0] * val_x + reg_params[1];\n\t\tval_x = val_x + 2;\n\t}\n\tgraph(reg_x, reg_y, \"plot\");\n}\n\nvoid compute_logistic_regression() {\n\tfloat[2] reg_params = logistic_regression(x, y);\n\n\tout(\"Logistic Regression parameters: \");\n\tout(reg_params[0]);\n\tout(reg_params[1]);\n}\n\nvoid populate_xy() {\n\tfor i with range(0, size(x)) {\n\t\txy[i][0] = x[i];\n\t\txy[i][1] = y[i];\n\t}\n}\n\nvoid compute_kmeans() {\n\tfloat[2][2] centers = k_means(2, xy);\n\tfloat[2] val_x;\n\tfloat[2] val_y;\n\n\tval_x[0] = centers[0][0];\n\tval_y[0] = centers[0][1];\n\tval_x[1] = centers[1][0];\n\tval_y[1] = centers[1][1];\n\n\tout(\"First center at: \");\n\tout(\"X: \" + val_x[0]);\n\tout(\"Y: \" + val_y[0]);\n\n\tout(\"Second center at: \");\n\tout(\"X: \" + val_x[1]);\n\tout(\"Y: \" + val_y[1]);\n\n\tgraph(val_x, val_y, \"scatter\");\n}\n\nvoid main() {\n\tdisplay_data(1);\n\tout(\"----------------------\");\n\tdisplay_data(2);\n\n\tgraph(x, y, \"scatter\");\n\n\tcompute_linear_regression();\n\tcompute_logistic_regression();\n\n\tpopulate_xy();\n\tcompute_kmeans();\n}\n```\n### Available Special Functions\n\n- mean(arr) - Compute the mean of an array of data\n - arr: a one dimensional array.\n - returns: a float with the mean of the array. \n\n- min(arr) - Get the minimum value on an array\n - arr: a one dimensional array.\n - returns: a float with the minimum value of the array.\n\n- max(arr) - Get the maximum value on an array\n - arr: a one dimensional array.\n - returns: a float with the maximum value of the array.\n\n- median(arr) - Get the median value on an array\n - arr: a one dimensional array.\n - returns: a float with the median value of the array.\n\n- var(arr) - Get the variance value on an array\n - arr: a one dimensional array.\n - returns: a float with the variance value of the array.\n\n- std(arr) - Get the standard deviation value on an array\n - arr: a one dimensional array.\n - returns: a float with the standard deviation value of the array.\n\n- linear_regression(arr_x, arr_y) - Get the linear regression parameters given two arrays representing x values and y\nvalues.\n - arr_x: a one dimensional array.\n - arr_y: a one dimensional array.\n - returns: an array with the regression parameters.\n\n- logistic_regression(arr_x, arr_y) - Get the logistic regression parameters given two arrays representing x values and y\nvalues.\n - arr_x: a one dimensional array.\n - arr_y: a one dimensional array.\n - returns: an array with the regression parameters.\n\n- k_means(k, arr_xy) - Get the k cluster centers given one array representing x and y value pairs.\n - k: an int representing the number of clusters.\n - arr_xy: a two dimensional array represnting x and y value pairs. Ex: [[1, 2], [2, 3], [4, 5]].\n - returns: an array with the cluster centers c and y coordinates.\n\n- size(arr) - Get the size of an array\n - arr: a one dimensional or two dimensional array.\n - returns: an int with the size of the array.\n\n- type(var) - Get the type of the variable as a string\n - arr: a variable, cannot be an array.\n - returns: a string with the type name.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Germanvp/ELDA", "keywords": "language data project", "license": "", "maintainer": "", "maintainer_email": "", "name": "elda", "package_url": "https://pypi.org/project/elda/", "platform": "", "project_url": "https://pypi.org/project/elda/", "project_urls": { "Homepage": "https://github.com/Germanvp/ELDA" }, "release_url": "https://pypi.org/project/elda/0.1.0/", "requires_dist": [ "ply", "numpy", "pandas", "matplotlib", "sklearn" ], "requires_python": ">=3", "summary": "A data analysis focused language built with Python", "version": "0.1.0" }, "last_serial": 5241259, "releases": { "0.0.8": [ { "comment_text": "", "digests": { "md5": "ca0e000ba747e1cea13f32669721b0f8", "sha256": "ed2cb9f2987ee61331e92c8009e8a569c4b625acb5281c2b7cf1316d3920ba71" }, "downloads": -1, "filename": "elda-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "ca0e000ba747e1cea13f32669721b0f8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 30499, "upload_time": "2019-05-07T15:56:50", "url": "https://files.pythonhosted.org/packages/04/83/bff8f2393b54f22a716412ef7ce34b08b901f40366e902934f0dc8b7897c/elda-0.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4fd91dcb29f1cc81b4ddc5b10b1546ba", "sha256": "b449ed15e2412818abb923bffd9e555b052eaa7f87f94cd227d193d7dd532b07" }, "downloads": -1, "filename": "elda-0.0.8.tar.gz", "has_sig": false, "md5_digest": "4fd91dcb29f1cc81b4ddc5b10b1546ba", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 27154, "upload_time": "2019-05-07T15:56:52", "url": "https://files.pythonhosted.org/packages/d4/6a/17a3391fae9ba0340dce0917d8ddf499e20c8002a5c2e526fffcdd4cf82e/elda-0.0.8.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "21dbad2fd30d41ba943b51ca85fcec84", "sha256": "abbd49ccbbf3ac54c41afc23409b21e85e8b44ebf0245af3486e75b25ee4f244" }, "downloads": -1, "filename": "elda-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "21dbad2fd30d41ba943b51ca85fcec84", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 34574, "upload_time": "2019-05-08T04:02:19", "url": "https://files.pythonhosted.org/packages/de/e0/e598cddc88ddb0710b5bcdbb7ba6ce639a2aac0fd4fe33499eaeb380b502/elda-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e1bcd4b4326b8ac1479db1c296e107e", "sha256": "d26ac7a66aa476900b1e438981af679eb681a0b6e73fb3baa3a1bfe5295a6c2d" }, "downloads": -1, "filename": "elda-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4e1bcd4b4326b8ac1479db1c296e107e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 34312, "upload_time": "2019-05-08T04:02:21", "url": "https://files.pythonhosted.org/packages/26/2d/d88a26474ac0f11b5aa7a7d92b1fb7aaa5d1b3c0ff4c93a24061f504cfdd/elda-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "21dbad2fd30d41ba943b51ca85fcec84", "sha256": "abbd49ccbbf3ac54c41afc23409b21e85e8b44ebf0245af3486e75b25ee4f244" }, "downloads": -1, "filename": "elda-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "21dbad2fd30d41ba943b51ca85fcec84", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 34574, "upload_time": "2019-05-08T04:02:19", "url": "https://files.pythonhosted.org/packages/de/e0/e598cddc88ddb0710b5bcdbb7ba6ce639a2aac0fd4fe33499eaeb380b502/elda-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e1bcd4b4326b8ac1479db1c296e107e", "sha256": "d26ac7a66aa476900b1e438981af679eb681a0b6e73fb3baa3a1bfe5295a6c2d" }, "downloads": -1, "filename": "elda-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4e1bcd4b4326b8ac1479db1c296e107e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 34312, "upload_time": "2019-05-08T04:02:21", "url": "https://files.pythonhosted.org/packages/26/2d/d88a26474ac0f11b5aa7a7d92b1fb7aaa5d1b3c0ff4c93a24061f504cfdd/elda-0.1.0.tar.gz" } ] }