HashNuke / postgres-tryouts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

postgres-tryouts

Create the database for the rest of the experiments.

# Create the database for the rest of the adventure
psql -c 'create database tryouts'

To prepare the Product Hunt dataset

  • The Product Hunt dataset can be downloaded here.
  • Look for the PostsForExploration.csv file to download.
  • Run the script below to convert the CSV into insert statements
psql -d tryouts producthunt-schema.sql
python producthunt.py PostsForExploration.csv

To prepare the MoMA dataset

This is the data set of Artists and Artworks by Museum of Modern Art available on GitHub.

In order to download this dataset, please ensure that you have the following installed:

After Git LFS is installed, ensure to run git lfs install command to install Git LFS for your computer user account before cloning the dataset below.

# To install Git LFS for your user account
git lfs install

# Download the MoMA dataset
git clone git@github.com:MuseumofModernArt/collection.git moma-collection

# Load the schema for the dataset into the database
psql -d tryouts < moma-schema.sql
python3 moma-artists.py moma-collection/Artists.json
python3 moma-artworks.py moma-collection/Artworks.json
psql -d tryouts < moma-artist-contributions.sql

About


Languages

Language:Python 100.0%