User:Wizmut

Below is some source code to assist in making tables and graphs.

The language I use is the R (programming language). I sometimes pull data directly from a url, but will download large files or files not directly downloadable.

After I have finalized a csv file, I do some touching up in Excel/Sheets/Libre to get the formatting just right. I then use a tool to convert spreadsheet data into wikitext.

US electricity
This code pulls data directly from the Energy Information Administration.

Used in these articles:
 * List of U.S. states by electricity production
 * List of U.S. states by renewable electricity production

US state map code
The following code creates some treemaps and maps of the US that illustrate the data in the tables created above.

World electricity data tables and graphs
This code pulls data directly from the Ember (non-profit organisation).

Used in these articles:
 * List of countries by electricity production
 * List of countries by renewable electricity production (not implemented yet)
 * Geothermal power
 * Hydroelectricity
 * Solar power by country
 * Wind power by country

Country map code
The following code creates some treemaps and maps of the US that illustrate the data in the tables created above.

US state crime
This code uses data downloaded from the Federal Bureau of Investigation.

Used in these articles:


 * List of U.S. states and territories by intentional homicide rate
 * List of U.S. states and territories by violent crime rate

US state death
This code uses data downloaded from the Centers for Disease Control.

Used in these articles:


 * List of U.S. states and territories by intentional homicide rate
 * Gun death and violence in the United States by state

US county death
This code uses data downloaded from County Health Rankings.

Used in these articles:


 * List of U.S. states and territories by intentional homicide rate
 * Gun death and violence in the United States by state