npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

coral-island-crop-scrape

v1.0.2

Published

Inlcuded are files in order to scrape coral island wiki for crops and their potential profits/sell prices/ etc

Downloads

45

Readme

coral-island-crop-scrape

The following is an importable library that provides scraped data of all crops of the coral island wiki including usable enums and types.

Crop Structure and Samples

Currently you can import cropv1 for the following data as an array of Crop

Adding to project

 yarn add coral-island-crop-scrape

In your project you should be able to import as needed:

import { EnumCropType, crops } from "coral-island-crop-scrape";

Notes

  • PO means payed off only relevant for saplings
  • PPD means pay per day
  • PPD assumes perfect harvest times.
  • PPD for any Artisan field (i.e., Jar, Honey, Aged, etc.) assumes that you are able to process the item at that artisan step synchronously. Let's say you get an apple tree and 3 apples. The artisan field assumes all 3 apples will be processed in 3 separate jars simultaneously, for example.
  • Each Artisan step takes into account any previous process time when calculating PPD. So if the orchid takes 12 days to grow, then 3 days to process to honey, then aged PPD will be: profit/(12 + 3 + aged process time)
  • All saplings ignore their growthTime when calculating PPD. This was to reduce complexity. Assumes they are planted and grown before their harvestable seasons.

V1 Types

Grades = Record<EnumGrades, number>;

SellPrice extends Grades {}
Profit extends Grades {}
PayPerDay extends Grades {}

Profitability {
  sellPrice: SellPrice;
  sellPriceImproved: SellPrice;
  profit: Profit;
  profitImproved: Profit;
  payPerDay: PayPerDay;
  payPerDayImproved: PayPerDay;
  payPerDayPO: PayPerDay | null;
  payPerDayPOImproved: PayPerDay | null;
  profitPO: Profit | null;
  profitPOImproved: Profit | null;
}

Artisan {
  process: `${EnumProcess}`;
  cropCost: number;
  timeToProcess: number;
  pastProcessTime?: number;
  cropLifeSpan: number;
  totalPossibleHarvests: number;
  quantityPerHarvest: number;
  profitability: Profitability;
  handlePayedOff?: boolean;
  totalProcessTime: number;
}

BaseCrop {
  name: string;
  cropCost: number;
  cropType: `${EnumCropType}`;
  seedType: `${EnumSeedType}`;
  growthTime: number;
  seasons: `${EnumSeasons}`[];
  profitability: Profitability;
  quantityPerHarvest: number;
  regrowthTime?: number;
  totalPossibleHarvests: number;
  handlePayedOff?: boolean;
  totalProcessTime: number;
}

ArtisianCropParts = Partial<Record<EnumProcess, Artisan>>;

Crop extends BaseCrop, ArtisianCropParts {}

V1 Sample Crop

  {
    cropCost: 75,
    totalPossibleHarvests: 1,
    quantityPerHarvest: 1,
    totalProcessTime: 8,
    handlePayedOff: false,
    profitability: {
      sellPrice: {
        base: 130,
        bronze: 150,
        silver: 194,
        gold: 195,
        osmium: 260,
      },
      sellPriceImproved: {
        base: 150,
        bronze: 172,
        silver: 194,
        gold: 224,
        osmium: 299,
      },
      profit: {
        base: 55,
        bronze: 75,
        silver: 119,
        gold: 120,
        osmium: 185,
      },
      profitImproved: {
        base: 75,
        bronze: 97,
        silver: 119,
        gold: 149,
        osmium: 224,
      },
      profitPO: null,
      profitPOImproved: null,
      payPerDay: {
        base: 6.875,
        bronze: 9.375,
        silver: 14.875,
        gold: 15,
        osmium: 23.125,
      },
      payPerDayImproved: {
        base: 9.375,
        bronze: 12.125,
        silver: 14.875,
        gold: 18.625,
        osmium: 28,
      },
      payPerDayPO: null,
      payPerDayPOImproved: null,
    },
    name: 'Orchid',
    seasons: ['fall'],
    growthTime: 8,
    cropType: 'flower',
    seedType: 'seed',
    regrowthTime: 0,
    honey: {
      cropCost: 75,
      totalPossibleHarvests: 1,
      quantityPerHarvest: 1,
      totalProcessTime: 10,
      handlePayedOff: false,
      profitability: {
        sellPrice: {
          base: 390,
          bronze: 450,
          silver: 505,
          gold: 585,
          osmium: 780,
        },
        sellPriceImproved: {
          base: 448,
          bronze: 517,
          silver: 580,
          gold: 672,
          osmium: 896,
        },
        profit: {
          base: 315,
          bronze: 375,
          silver: 430,
          gold: 510,
          osmium: 705,
        },
        profitImproved: {
          base: 373,
          bronze: 442,
          silver: 505,
          gold: 597,
          osmium: 821,
        },
        profitPO: null,
        profitPOImproved: null,
        payPerDay: {
          base: 31.5,
          bronze: 37.5,
          silver: 43,
          gold: 51,
          osmium: 70.5,
        },
        payPerDayImproved: {
          base: 37.3,
          bronze: 44.2,
          silver: 50.5,
          gold: 59.7,
          osmium: 82.1,
        },
        payPerDayPO: null,
        payPerDayPOImproved: null,
      },
      process: 'honey',
      timeToProcess: 2,
      cropLifeSpan: 8,
      pastProcessTime: 0,
    },
    aged: {
      cropCost: 75,
      totalPossibleHarvests: 1,
      quantityPerHarvest: 1,
      totalProcessTime: 16,
      handlePayedOff: false,
      profitability: {
        sellPrice: {
          base: 1755,
          bronze: 2025,
          silver: 2275,
          gold: 2635,
          osmium: 3510,
        },
        sellPriceImproved: {
          base: 2018,
          bronze: 2328,
          silver: 2616,
          gold: 3030,
          osmium: 4036,
        },
        profit: {
          base: 1680,
          bronze: 1950,
          silver: 2200,
          gold: 2560,
          osmium: 3435,
        },
        profitImproved: {
          base: 1943,
          bronze: 2253,
          silver: 2541,
          gold: 2955,
          osmium: 3961,
        },
        profitPO: null,
        profitPOImproved: null,
        payPerDay: {
          base: 105,
          bronze: 121.875,
          silver: 137.5,
          gold: 160,
          osmium: 214.6875,
        },
        payPerDayImproved: {
          base: 121.4375,
          bronze: 140.8125,
          silver: 158.8125,
          gold: 184.6875,
          osmium: 247.5625,
        },
        payPerDayPO: null,
        payPerDayPOImproved: null,
      },
      process: 'aged',
      timeToProcess: 6,
      cropLifeSpan: 8,
      pastProcessTime: 2,
    },
  },

Enums

The following are the exported enums:

EnumSeedType {
  SEED = 'seed',
  SEEDLING = 'seedling',
  SAPLING = 'sapling',
}

EnumCropType {
  FLOWER = 'flower',
  FRUIT = 'fruit',
  VEGETABLE = 'vegetable',
  GRAIN = 'grain',
}

EnumSeasons {
  SPRING = 'spring',
  SUMMER = 'summer',
  FALL = 'fall',
  WINTER = 'winter',
}

EnumProcess {
  HONEY = 'honey',
  OIL = 'oil',
  KEG = 'keg',
  JAR = 'jar',
  AGED = 'aged',
  CHEESE = 'cheese',
  LOOM = 'loom',
  MILL = 'mill',
}

EnumGrades {
  BASE = 'base',
  BRONZE = 'bronze',
  SILVER = 'silver',
  GOLD = 'gold',
  OSMIUM = 'osmium',
}

Contributing

Versioning

  • If you make any changes to scrape functions. Please update version.
    • change Major version if there are changes to the resulting crops object shape. I.E new fields, removed fields (2.0.0)
    • Change minor version if object shape remains the same but calculations get updated. (1.1.0)
    • Change patch version only if refreshing data. I.E re-running scrape as new crops were added.

Running Scrape

  1. Install tsx
  2. Run yarn generate-crops to proudce updated crops file