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

ac-stalk-market-analyzer

v1.0.1

Published

Animal Crossing Stalk Market Analyzer

Downloads

10

Readme

Animal Crossing Stalk Market Analyzer

Animal Crossing games feature a weekly "stalk market" with a simple premise: purchase turnips on Sunday, then figure out when to (hopefully) sell them for a profit before the following Sunday. This is a simple library to help predict when you should sell your turnips!

The logic contained within this library was inspired by this stalk market guide on Thonky: https://www.thonky.com/animal-crossing-new-leaf/stalk-market

Intro to selling

Turnip sell prices update twice a day, once at store opening and another one at 12pm. Assuming the store is closed on Sundays, that gives twelve opportunities to record turnip pricing throughout the week:

      M  T  W  T  F  S
 6am  1  3  5  7  9  11
12pm  2  4  6  8  10 12

If turnips are not sold by 6am on the following Sunday, they spoil and lose all value!

Figuring out when to sell

After recording a few sell prices, pass them into this library's analyze() method:

import analyze from 'ac-stalk-market-analyzer';

const prices = [73, 72, 69, 80, 92, 112, 98, 95, 35, 32, 20, 17];
const pattern = analyze(prices);

The return value will be one of the following strings:

"spikeBig"

A series of three increases, with the third increase being the maximum sell price. The following two decreases are higher than the average sell price, giving you an opportunity to realize a smaller return before the remaining price decreases rob you of an opportunity for profit.

"spikeSmall"

This pattern is similar to spikeBig, but is a series of four increases followed by only a single decrease higher than the average, before decreasing from there on.

"decreasing"

Every sell price change is lower than the one before. If no increase occurs throughout the week, you should sell by Thursday afternoon.

"random"

Pricing is unpredictable. Pricing will likely jump randomly between 50 and 200 bells.

"unknown"

There's not enough pricing data to determine a pattern. This is common when some prices are not recorded. The library may still be able to detect a pattern even if you skip recording a couple of prices, though!