• code,  data science

    Setup Your Local Data Warehouse Content

    In last week’s post, I showed you how to get a free SQL database by setting up a MySQL database server on your desktop. Now, it’s time to finish setting up your local data warehouse that you can use it to practice your SQL chops. We will use data that is posted on data.world to fill out our data warehouse. The first dataset is from the WICHE organization and shows you student enrollments and graduations in K-12 schools. This is a dataset that I uploaded to data.world years ago and I use it in demos like this. We will also download a file with information on US states so we…

  • code,  data science

    Get this Free SQL Database

    For a long time, I’ve wanted to published guides to the programming languages that I use. Last week, I started by writing up quick notes on SQL but it occurred to me that you will need a SQL database to follow along. So I found a free SQL database system that you can download right now. Download MAMP The program that you need is called MAMP and you can download that here. Take care to download the correct version for your operating system. MAMP makes it easy to install these three open-source products: Apache, MySQL, and PHP. MySQL is the free SQL database, but you need all three working set…

  • code

    Basic SQL Notes

    Here are my notes on SQL. This Notes series is meant to be light on narrative but heavy on code samples that you can copy and paste. At some point, if there is demand I will provide posts that explain what is actually happening. Datasets are located here https://data.world/mattjcamp/wiche-enrollment-projections and you can follow along right in the Data World web app. This project has two data tables: wiche_graduate_projections.csv and state_table.csv. Select All Columns From Table Essentially the simplest SQL query that you can write that returns records from a table. Join Two Tables Use JOIN or INNER JOIN to combine two tables when you only want records that appear in…

  • code,  covid-19

    Local Covid-19 Dashboard

    When I need a Data Science tool beyond vanilla SQL I usually reach for RStudio. There is no denying that R is fast and painless for doing statistical analysis, but it’s quirky and falls far out of the norms of coding and that’s always bugged me. So I’ve been debating making a switch. Lately, I’ve been experimenting with Python programming. Python is a very popular general-purpose programming language that is used in Data Science, but it’s also used to make apps, websites, and services. I’m particularly interested in using this language along with AWS services to publish small web APIs and things like that. But, I need to learn the…

  • code,  data science

    D3 Experiments

    D3 is a Javascript library used for data visualization. You can use this tool to make your webpage data driven. Essentially, you bind your data to components on your website including SVG elements. Here is code that will create a simple D3 bar chart based on an array of numbers. This will create a very simple bar graph using the numbers in the array to determine the height of the bar. In order for this visualization to be displayed on my webpage here, we need to have a div with an id of “plot” and we need to import the D3 library. So this is a very simple example that…

  • code

    On Launching a New Website

    I already broke my own rule. A few weeks ago, I posted that I was going to focus 100% on re-developing my app development skills. I was totally into the idea of running a web version of my iOS app I wrote in 2008 off the WordPress REST API. But, life happens and I realize that my time away from the 9-5 is running out and I need to prioritize. I’ve learned a lot about web development over the past two months and in particular CSS and WordPress. So I want to get a  chance to put those skills into play while I have the chance. I also want to…

  • code

    SSH Connection with Private Key

    Download private key (ends in .pem) Navigate to folder location where you stored the key Open terminal Set the key’s file permissions: chmod 600 [key_filename.pem] Use SSH command to log into your remote computer: ssh -i [key_filename.pem] [username]@[IP Address]

  • code

    Use Gulp to Automate WordPress Builds

    As you are working on building a custom WordPress site you may start to find that you need to bundle up your JavaScript and CSS code into a format that your theme can use. Code that you write in modules will not get included into your theme unless you manually build the new files before testing your site. But, you can use Gulp to automatically build these files for you. Then you can make changes to your code and see the results reflected on your local build. This makes iteratively building your web app way faster. Here’s how you do it: Get these four files from Brad Schiff’s Github account:…