diff --git a/moderne_visualizations_misc/java_versions.ipynb b/moderne_visualizations_misc/java_versions_by_sourceset.ipynb similarity index 96% rename from moderne_visualizations_misc/java_versions.ipynb rename to moderne_visualizations_misc/java_versions_by_sourceset.ipynb index c112349..3c8b88b 100644 --- a/moderne_visualizations_misc/java_versions.ipynb +++ b/moderne_visualizations_misc/java_versions_by_sourceset.ipynb @@ -9,7 +9,7 @@ "source": [ "from code_data_science import data_table as dt\n", "\n", - "df = dt.read_csv(\"../samples/java_versions.csv\")\n", + "df = dt.read_csv(\"../samples/java_versions_by_sourceset.csv\")\n", "df.head()" ] }, diff --git a/moderne_visualizations_misc/java_versions_in_use.ipynb b/moderne_visualizations_misc/java_versions_in_use.ipynb new file mode 100644 index 0000000..46ef7bc --- /dev/null +++ b/moderne_visualizations_misc/java_versions_in_use.ipynb @@ -0,0 +1,88 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "63746256-381d-43ab-a2f7-1acc9e891e8b", + "metadata": {}, + "outputs": [], + "source": [ + "from code_data_science import data_table as dt\n", + "\n", + "df = dt.read_csv(\"../samples/java_versions_in_use.csv\")\n", + "df.head()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "701147ab-62bd-490f-8a26-8ad1dd80f4d7", + "metadata": {}, + "outputs": [], + "source": [ + "data = df.drop(\n", + " columns=[\n", + " \"repositoryOrigin\",\n", + " \"repositoryPath\",\n", + " \"repositoryBranch\",\n", + " \"scmType\",\n", + " \"repositoryLink\",\n", + " \"targetVersion\",\n", + " ]\n", + ")\n", + "data" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5e2e8d84-4b3e-4374-ab5d-9fd14f9a22fc", + "metadata": {}, + "outputs": [], + "source": [ + "versions = (\n", + " data.groupby([\"sourceVersion\"], as_index=True)\n", + " .value_counts()\n", + " .fillna(0)\n", + ")\n", + "versions" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2cf3f3f6-2d72-4cdd-8243-50a37be78cfb", + "metadata": {}, + "outputs": [], + "source": [ + "import code_data_science.palette as palette\n", + "import matplotlib.pyplot as plt\n", + "\n", + "colors = palette.qualitative()[:3]\n", + "\n", + "ax = versions.plot.bar(colormap=plt.cm.colors.ListedColormap(colors))" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/moderne_visualizations_misc/specs/java_versions.yml b/moderne_visualizations_misc/specs/java_versions_by_sourceset.yml similarity index 100% rename from moderne_visualizations_misc/specs/java_versions.yml rename to moderne_visualizations_misc/specs/java_versions_by_sourceset.yml diff --git a/moderne_visualizations_misc/specs/java_versions_in_use.yml b/moderne_visualizations_misc/specs/java_versions_in_use.yml new file mode 100644 index 0000000..df32bfe --- /dev/null +++ b/moderne_visualizations_misc/specs/java_versions_in_use.yml @@ -0,0 +1,7 @@ +--- +type: specs.moderne.io/v1beta/visualization +name: io.moderne.JavaVersionsInUse +displayName: Java versions in use +description: This report shows the distribution of Java versions in use. +recipe: org.openrewrite.java.migrate.search.FindJavaVersion +dataTable: org.openrewrite.java.migrate.table.JavaVersionTable diff --git a/samples/java_versions.csv b/samples/java_versions_by_sourceset.csv similarity index 100% rename from samples/java_versions.csv rename to samples/java_versions_by_sourceset.csv diff --git a/samples/java_versions_in_use.csv b/samples/java_versions_in_use.csv new file mode 100644 index 0000000..8c994ff --- /dev/null +++ b/samples/java_versions_in_use.csv @@ -0,0 +1,38 @@ +repositoryOrigin,repositoryPath,repositoryBranch,scmType,repositoryLink,sourceVersion,targetVersion +github.com,"openrewrite/rewrite-cucumber-jvm",main,GITHUB,"https://github.com/openrewrite/rewrite-cucumber-jvm/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-cucumber-jvm",main,GITHUB,"https://github.com/openrewrite/rewrite-cucumber-jvm/blob/main",17,17 +github.com,"openrewrite/rewrite-kubernetes",main,GITHUB,"https://github.com/openrewrite/rewrite-kubernetes/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-third-party",main,GITHUB,"https://github.com/openrewrite/rewrite-third-party/blob/main",17,17 +github.com,"openrewrite/rewrite-concourse",main,GITHUB,"https://github.com/openrewrite/rewrite-concourse/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-concourse",main,GITHUB,"https://github.com/openrewrite/rewrite-concourse/blob/main",17,17 +github.com,"openrewrite/rewrite-liberty",main,GITHUB,"https://github.com/openrewrite/rewrite-liberty/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-liberty",main,GITHUB,"https://github.com/openrewrite/rewrite-liberty/blob/main",17,17 +github.com,"openrewrite/rewrite-polyglot",main,GITHUB,"https://github.com/openrewrite/rewrite-polyglot/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-polyglot",main,GITHUB,"https://github.com/openrewrite/rewrite-polyglot/blob/main",17,17 +github.com,"openrewrite/rewrite-templating",main,GITHUB,"https://github.com/openrewrite/rewrite-templating/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-kotlin",main,GITHUB,"https://github.com/openrewrite/rewrite-kotlin/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-kotlin",main,GITHUB,"https://github.com/openrewrite/rewrite-kotlin/blob/main",17,17 +github.com,"openrewrite/rewrite-maven-plugin",main,GITHUB,"https://github.com/openrewrite/rewrite-maven-plugin/blob/main",8,8 +github.com,"openrewrite/rewrite-maven-plugin",main,GITHUB,"https://github.com/openrewrite/rewrite-maven-plugin/blob/main",17,17 +github.com,"openrewrite/rewrite-generative-ai",main,GITHUB,"https://github.com/openrewrite/rewrite-generative-ai/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-generative-ai",main,GITHUB,"https://github.com/openrewrite/rewrite-generative-ai/blob/main",17,17 +github.com,openrewrite/rewrite-sql,main,GITHUB,"https://github.com/openrewrite/rewrite-sql/blob/main",1.8,1.8 +github.com,openrewrite/rewrite-sql,main,GITHUB,"https://github.com/openrewrite/rewrite-sql/blob/main",17,17 +github.com,"openrewrite/rewrite-micrometer",main,GITHUB,"https://github.com/openrewrite/rewrite-micrometer/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-micrometer",main,GITHUB,"https://github.com/openrewrite/rewrite-micrometer/blob/main",17,17 +github.com,"openrewrite/rewrite-static-analysis",main,GITHUB,"https://github.com/openrewrite/rewrite-static-analysis/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-static-analysis",main,GITHUB,"https://github.com/openrewrite/rewrite-static-analysis/blob/main",17,17 +github.com,"openrewrite/rewrite-javascript",main,GITHUB,"https://github.com/openrewrite/rewrite-javascript/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-javascript",main,GITHUB,"https://github.com/openrewrite/rewrite-javascript/blob/main",17,17 +github.com,"openrewrite/rewrite-gradle-plugin",main,GITHUB,"https://github.com/openrewrite/rewrite-gradle-plugin/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-gradle-plugin",main,GITHUB,"https://github.com/openrewrite/rewrite-gradle-plugin/blob/main",17,17 +github.com,"openrewrite/rewrite-gradle-tooling-model",main,GITHUB,"https://github.com/openrewrite/rewrite-gradle-tooling-model/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-gradle-tooling-model",main,GITHUB,"https://github.com/openrewrite/rewrite-gradle-tooling-model/blob/main",17,17 +github.com,"openrewrite/rewrite-openapi",main,GITHUB,"https://github.com/openrewrite/rewrite-openapi/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-openapi",main,GITHUB,"https://github.com/openrewrite/rewrite-openapi/blob/main",17,17 +github.com,openrewrite/rewrite,main,GITHUB,"https://github.com/openrewrite/rewrite/blob/main",21,21 +github.com,openrewrite/rewrite,main,GITHUB,"https://github.com/openrewrite/rewrite/blob/main",11,11 +github.com,"openrewrite/rewrite-okhttp",main,GITHUB,"https://github.com/openrewrite/rewrite-okhttp/blob/main",17,17 +github.com,"openrewrite/rewrite-migrate-java",main,GITHUB,"https://github.com/openrewrite/rewrite-migrate-java/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-ai-search",main,GITHUB,"https://github.com/openrewrite/rewrite-ai-search/blob/main",1.8,1.8 +github.com,"openrewrite/rewrite-ai-search",main,GITHUB,"https://github.com/openrewrite/rewrite-ai-search/blob/main",17,17 \ No newline at end of file