This walkthrough goes through the steps of taking data from a MySQL database using RMySQL and loading it into an existing Socrata table using write.Socrata
from RSocrata
This walkthrough assumes that you already have an instance of MySQL running on your machine. If that is not the case please stop and install that before continuing.
Step 1: Install Packages
Step 2: Connect to MySQL instance
Create constants so that R can access MySQL instance
Step 3: Write to Data Frame
Use con
to write to data.frame
Step 4: Identify Destination Dataset
Ensure that you have a Socrata dataset with proper fields and proper datatypes to write to. Capture the 4x4 ID for the dataset you want to publish to.
Step 5: Publish to Your Dataset
Step 6: Done!
Enjoy your new dataset!